Package org.jamesii.core.util

Examples of org.jamesii.core.util.StopWatch.start()


    if (rngSeed != null) {
      SimSystem.getRNGGenerator().setSeed(rngSeed);
    }
    StopWatch watch = new StopWatch();
    perfRecorder.start();
    watch.start();
    experiment.execute();
    watch.stop();
    perfRecorder.stop();
    elapsedTime = watch.elapsedSeconds();
    return elapsedTime;
View Full Code Here


    List<Double> performances = new ArrayList<>();
    for (Map<String, Object> parameterSetup : setup.getSecondValue()) {
      System.err.println("Executing: " + Strings.dispMap(parameterSetup));
      StopWatch sw = new StopWatch();
      sw.start();
      BaseExperiment exp = new BaseExperiment();
      exp.getFixedModelParameters().putAll(parameterSetup);
      exp.setModelLocation(exploration.getExperiment().getModelLocation());
      exp.setDefaultSimStopTime(defaultSimStopTime);
      exp.execute();
View Full Code Here

            pb.addSubBl(ParallelComputationTaskRunnerFactory.NUM_CORES, 1);
            be.setTaskRunnerFactory(new ParameterizedFactory<TaskRunnerFactory>(
                new AdaptiveTaskRunnerFactory(), pb));

            StopWatch sw = new StopWatch();
            sw.start();
            be.execute();
            sw.stop();
            System.err.println("Execution Time:" + sw.elapsedMilliseconds());
            execTimes.add(sw.elapsedMilliseconds() / 1000.0);
            System.err.println("Execution Times:"
View Full Code Here

    int distrib = 3;

    StopWatch sw = new StopWatch();

    sw.start();

    for (int i = 0; i < 100000; i++) {

      double rand = Math.random();
View Full Code Here

   */
  public void testWallClock() {
    StopWatch watch = new StopWatch();
    gaps.setFitness(new SimpleFitness());
    gaps.setNumIndividuals(NUM_OF_IND);
    watch.start();
    gaps.setAbortCriterion(new WallClockTimeAbort(MILLISECONDS));
    gaps.portfolio(problemDescription);
    watch.stop();
    assertEquals(
        "Test should run " + MILLISECONDS + " but runs "
View Full Code Here

    ListOrAbort abortList = new ListOrAbort();
    abortList.addCriterion(new GenerationCountAbort(GEN_COUNT));
    abortList.addCriterion(new MaxFitnessAbort(MAXIMIZE_FITNESS));

    StopWatch watch = new StopWatch();
    watch.start();

    abortList.addCriterion(new WallClockTimeAbort(MILLISECONDS));
    gaps.setAbortCriterion(abortList);
    gaps.portfolio(problemDescription);
    watch.stop();
View Full Code Here

    // stop watch used to find out the number of milliseconds elapsed
    StopWatch sw = new StopWatch();
    double e = 0.;
    do {
      c++;
      sw.start();
      for (int i = 0; i < OPS; i++) {
        // double e = 2.1 + 4.4;
        e /= 3d;
        e += 4.4e100d;
        e *= e;
View Full Code Here

    long l = 0;

    do {

      c++;
      sw.start();
      for (int i = 0; i < OPS; i++) {
        l /= 3l;
        l += 100987988798789l;
        l *= l;
        l -= 2l;
View Full Code Here

    int il = 0;

    do {
      c++;

      sw.start();
      for (int i = 0; i < OPS; i++) {
        il /= 3;
        il += 10098;
        il *= il;
        il -= 2;
View Full Code Here

    System.gc();
    try {
      println("Memory (): " + Runtime.getRuntime().totalMemory() + " : "
          + Runtime.getRuntime().freeMemory());
      StopWatch sw = new StopWatch();
      sw.start();
      IModel model = createModel();
      sw.stop();
      result.modelCreation = sw.elapsedSeconds();
      println("Seconds needed for creating the model: " + sw.elapsedSeconds());
      println("Memory (model - [total:free]): "
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.