Package bb.util

Examples of bb.util.Benchmark


        return interpreter.execute("(+ 1 2)");
      }
    };
   
    Benchmark benchmark = new Benchmark(task);
 
    System.out.println(benchmark.toStringFull());
   
    PerformanceStore.store("performance - simpleAddition.csv", benchmark);
   
    Assert.assertTrue(benchmark.getMean() < 0.0006);
  }
View Full Code Here


        return interpreter.execute("(quicksort '(1 8 7 5 3 6 2 9 0 4))");
      }
    };
   
    Benchmark benchmark = new Benchmark(task);
 
    System.out.println(benchmark.toStringFull());
   
    PerformanceStore.store("performance - quicksort.csv", benchmark);
   
    Assert.assertTrue(benchmark.getMean() < 0.9);
  }
View Full Code Here

        return interpreter.execute("(fac 8)");
      }
    };
   
    Benchmark benchmark = new Benchmark(task);
 
    System.out.println(benchmark.toStringFull());
   
    PerformanceStore.store("performance - factorial.csv", benchmark);
   
    Assert.assertTrue(benchmark.getMean() < 0.02);
  }
View Full Code Here

        return 1 + 2;
      }
    };
   
    Benchmark benchmark = new Benchmark(task);
 
    System.out.println(benchmark.toStringFull());
   
    PerformanceStore.store("control - simpleAddition.csv", benchmark);
   
    Assert.assertTrue(benchmark.getMean() < 0.00006);
  }
View Full Code Here

       
        return array;
      }
    };
   
    Benchmark benchmark = new Benchmark(task);
 
    System.out.println(benchmark.toStringFull());
   
    PerformanceStore.store("control - quicksort.csv", benchmark);
   
    Assert.assertTrue(benchmark.getMean() < 0.9);
  }
View Full Code Here

       
            return fact;
      }
    };
   
    Benchmark benchmark = new Benchmark(task);
 
    System.out.println(benchmark.toStringFull());
   
    PerformanceStore.store("control - factorial.csv", benchmark);
   
    Assert.assertTrue(benchmark.getMean() < 0.02);
  }
View Full Code Here

        new Main().execute(1);
      }
    };
   
    Benchmark benchmark = new Benchmark(task);
    System.out.println(benchmark.toStringFull());
   
    task = new Runnable() {

      public void run() {

        new Main().execute(2);
      }
    };
   
    benchmark = new Benchmark(task);
    System.out.println(benchmark.toStringFull());
   
    task = new Runnable() {

      public void run() {

        new Main().execute(3);
      }
    };
   
    benchmark = new Benchmark(task);
    System.out.println(benchmark.toStringFull());
   
    task = new Runnable() {

      public void run() {

        new Main().execute(4);
      }
    };
   
    benchmark = new Benchmark(task);
    System.out.println(benchmark.toStringFull());
   
    task = new Runnable() {

      public void run() {

        new Main().execute(8);
      }
    };
   
    benchmark = new Benchmark(task);
    System.out.println(benchmark.toStringFull());
   
    task = new Runnable() {

      public void run() {

        new Main().execute(16);
      }
    };
   
    benchmark = new Benchmark(task);
    System.out.println(benchmark.toStringFull());
   
    task = new Runnable() {

      public void run() {

        new Main().execute(32);
      }
    };
   
    benchmark = new Benchmark(task);
    System.out.println(benchmark.toStringFull());
  }
View Full Code Here

TOP

Related Classes of bb.util.Benchmark

Copyright © 2018 www.massapicom. 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.