netty5/microbench/src/main/java/io/netty
Alex Blewitt 52169cba95 Replace accumulation with blackhole.consume (#9275)
Motivation:

SpotJMHBugs reports that accumulating a value as a way of eliding dead code
elimination may be inadvisable, as discussed in
`JMHSample_34_SafeLooping::measureWrong_2`. Change the test so that it consumes
the response with `Blackhole::consume` instead.

Modifications:

- Replace addition of results with explicit `blackhole.consume()` call

Result:

Tests work as before, but with different benchmark numbers.
2019-06-25 21:47:07 +02:00
..
buffer Documented non-usage of BlackHole::consume on ByteBufAccessBenchmark (#9279) 2019-06-25 14:52:21 +02:00
handler/codec Replace accumulation with blackhole.consume (#9275) 2019-06-25 21:47:07 +02:00
microbench Replace accumulation with blackhole.consume (#9275) 2019-06-25 21:47:07 +02:00
microbenchmark/common Update NetUtilBenchmark (#7826) 2018-03-31 08:27:08 +02:00