changeset 231:67f0961f1811

Update the Blackhole sample to match the current interface.
author shade
date Wed, 06 Nov 2013 14:36:40 +0100
parents 31265352e637
children f57a932c81b8
files jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_09_Blackholes.java
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_09_Blackholes.java	Tue Nov 05 17:18:09 2013 +0100
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_09_Blackholes.java	Wed Nov 06 14:36:40 2013 +0100
@@ -83,15 +83,13 @@
      * This demonstrates Option B:
      *
      * Use explicit Blackhole objects, and sink the values there.
-     * Caveat: you can use the Blackhole only once. Each distinct result should be fed
-     * into the distinct Blackhole. (Background: Blackhole is just another @State object,
-     * bundled with JMH).
+     * (Background: Blackhole is just another @State object, bundled with JMH).
      */
 
     @GenerateMicroBenchmark
-    public void measureRight_2(BlackHole bh1, BlackHole bh2) {
-        bh1.consume(Math.log(x1));
-        bh2.consume(Math.log(x2));
+    public void measureRight_2(BlackHole bh) {
+        bh.consume(Math.log(x1));
+        bh.consume(Math.log(x2));
     }
 
     /*