@Test
 public void invokeAPI() throws RunnerException {
   for (int c = 0; c < Fixtures.repetitionCount(); c++) {
     Options opt =
         new OptionsBuilder()
             .include(Fixtures.getTestMask(this.getClass()))
             .warmupBatchSize(10)
             .measurementBatchSize(10)
             .build();
     new Runner(opt).run();
   }
 }
 @Test
 public void invokeAPI() throws RunnerException {
   for (int c = 0; c < Fixtures.repetitionCount(); c++) {
     Options opt =
         new OptionsBuilder()
             .include(Fixtures.getTestMask(this.getClass()))
             .shouldFailOnError(true)
             .forks(0)
             .build();
     new Runner(opt).run();
   }
 }
Exemplo n.º 3
0
 @Benchmark
 @BenchmarkMode(Mode.All)
 @Warmup(iterations = 0)
 @Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
 public void test1() {
   Fixtures.work();
   sameVM = true;
 }
 @Benchmark
 @BenchmarkMode(Mode.All)
 @Warmup(iterations = 0)
 @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
 @Threads(4)
 public void test(MyState state) {
   Assert.assertEquals("Run", 1, state.value);
   Fixtures.work();
 }
 @Benchmark
 @BenchmarkMode(Mode.All)
 @Warmup(iterations = 0)
 @Measurement(iterations = 2, time = 100, timeUnit = TimeUnit.MILLISECONDS)
 @Fork(1)
 @Threads(2)
 public void test() {
   Fixtures.work();
   countInvocations.incrementAndGet();
 }
Exemplo n.º 6
0
  @Test
  public void invokeAPI() throws RunnerException {
    Options opt =
        new OptionsBuilder()
            .include(Fixtures.getTestMask(this.getClass()))
            .shouldFailOnError(true)
            .build();
    new Runner(opt).run();

    Assert.assertEquals(false, sameVM);
  }