The benchmark is not taking into account nanoTime granularity (#9033)
Motivation: Results are just wrong for small delays. Modifications: Switching to AvarageTime avoid to rely on OS nanoTime granularity. Result: Uncontended low delay results are not reliable
This commit is contained in:
parent
09faa72296
commit
fb50847e39
@ -49,7 +49,7 @@ public class AbstractReferenceCountedByteBufBenchmark extends AbstractMicrobench
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@BenchmarkMode(Mode.SampleTime)
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
public boolean retainReleaseUncontended() {
|
||||
buf.retain();
|
||||
@ -58,9 +58,9 @@ public class AbstractReferenceCountedByteBufBenchmark extends AbstractMicrobench
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@BenchmarkMode(Mode.SampleTime)
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
@GroupThreads(6)
|
||||
@GroupThreads(4)
|
||||
public boolean retainReleaseContended() {
|
||||
buf.retain();
|
||||
Blackhole.consumeCPU(delay);
|
||||
|
Loading…
Reference in New Issue
Block a user