com.carrotsearch.junitbenchmarks
Annotation Type BenchmarkOptions


@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface BenchmarkOptions

Benchmark options applicable to methods annotated as tests.


Optional Element Summary
 int benchmarkRounds
          Sets the number of benchmark rounds for the test.
 boolean callgc
           
 int concurrency
          Specifies the number of threads that should execute the benchmarked method in parallel.
 int warmupRounds
          Sets the number of warmup rounds for the test.
 

callgc

public abstract boolean callgc
Returns:
Call System.gc() before each test. This may slow down the tests in a significant way, so disabling it is sensible in most cases.
Default:
false

warmupRounds

public abstract int warmupRounds
Sets the number of warmup rounds for the test. If negative, the default is taken from global options.

Default:
-1

benchmarkRounds

public abstract int benchmarkRounds
Sets the number of benchmark rounds for the test. If negative, the default is taken from global options.

Default:
-1

concurrency

public abstract int concurrency
Specifies the number of threads that should execute the benchmarked method in parallel. This is a tricky thing to do and you should know what you're doing (because concurrent execution will affect GC and other measurements).

Allowed values:

Default:
-1


Copyright © 2011 Carrot Search s.c.. All Rights Reserved.