Fixture&State settings and impact on measurement (original) (raw)
Yann Le Tallec ylt at letallec.org
Fri May 17 10:56:47 PDT 2013
- Previous message: hg: code-tools/jmh: Workaround: split the arguments to feed the framework correctly via --jvmargs and annotations.
- Next message: Fixture&State settings and impact on measurement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
Here is a trivial benchmark:
@State(Scope.Thread) @OutputTimeUnit(TimeUnit.NANOSECONDS) public class StateAndFixture { @Setup(Level.Iteration) public void setup() {}
@GenerateMicroBenchmark(BenchmarkType.AverageTimePerOp)
public void baseline() {}
}
Here are the average run times measured on my machine with different settings:
@State(Scope.Thread) / @Setup(Level.Iteration) => 0.6 ns @State(Scope.Benchmark) / @Setup(Level.Iteration) => 0.6 ns @State(Scope.Thread) / @Setup(Level.Invocation) => 11 ns @State(Scope.Benchmark) / @Setup(Level.Invocation) => 19 ns
Is this the expected behaviour? Should one simply adjust actual measurements by subtracting those numbers(i.e. is this a fixed and stable overhead)?
Many thanks, Yann
- Previous message: hg: code-tools/jmh: Workaround: split the arguments to feed the framework correctly via --jvmargs and annotations.
- Next message: Fixture&State settings and impact on measurement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]