|
37 | 37 |
|
38 | 38 |
|
39 | 39 | @Warmup(iterations = 3, time = 100, timeUnit = TimeUnit.MILLISECONDS) |
40 | | -@Measurement(iterations = 10, time = 100, timeUnit = TimeUnit.MILLISECONDS) |
| 40 | +@Measurement(iterations = 10, time = 3000, timeUnit = TimeUnit.MILLISECONDS) |
41 | 41 | @Fork(1) |
42 | 42 | @BenchmarkMode(Mode.Throughput) |
43 | 43 | @OutputTimeUnit(TimeUnit.NANOSECONDS) |
@@ -66,24 +66,29 @@ public void setUp() { |
66 | 66 | @Benchmark |
67 | 67 | public final void onlyOneTokenPerFragment(Blackhole blackhole) { |
68 | 68 | Iterable<String> tokens = sut.extract(singleTokenPerFragment); |
| 69 | + tokens.forEach(blackhole::consume); |
69 | 70 | blackhole.consume(tokens); |
70 | 71 | } |
71 | 72 |
|
72 | 73 | @Benchmark |
73 | 74 | public final void multipleTokenPerFragment(Blackhole blackhole) { |
74 | 75 | Iterable<String> tokens = sut.extract(multipleTokensPerFragment); |
| 76 | + tokens.forEach(blackhole::consume); |
75 | 77 | blackhole.consume(tokens); |
76 | 78 | } |
77 | 79 |
|
78 | 80 | @Benchmark |
79 | 81 | public final void multipleTokensCrossingMultipleFragments(Blackhole blackhole) { |
80 | 82 | Iterable<String> tokens = sut.extract(multipleTokensSpreadMultipleFragments_1); |
| 83 | + tokens.forEach(t -> {}); |
81 | 84 | blackhole.consume(tokens); |
82 | 85 |
|
83 | 86 | tokens = sut.extract(multipleTokensSpreadMultipleFragments_2); |
| 87 | + tokens.forEach(t -> {}); |
84 | 88 | blackhole.consume(tokens); |
85 | 89 |
|
86 | 90 | tokens = sut.extract(multipleTokensSpreadMultipleFragments_3); |
| 91 | + tokens.forEach(blackhole::consume); |
87 | 92 | blackhole.consume(tokens); |
88 | 93 | } |
89 | 94 | } |
0 commit comments