changeset 1280:ff933497671f

Fix typos.
author shade
date Fri, 11 Sep 2015 13:39:10 +0300
parents d24f71ad041e
children cf97af2b3938
files jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/Main.java jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/BlackholeConsecutiveTest.java jmh-core/src/test/java/org/openjdk/jmh/BlackholeTest.java
diffstat 3 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/Main.java	Fri Sep 11 01:30:26 2015 +0300
+++ b/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/Main.java	Fri Sep 11 13:39:10 2015 +0300
@@ -41,7 +41,7 @@
     public static void main(String[] args) throws RunnerException, CommandLineOptionException, IOException {
         PrintWriter pw = new PrintWriter(System.out, true);
 
-        pw.println("JMH COre Benchmark Tests");
+        pw.println("JMH Core Benchmark Tests");
         pw.println("----------------------------------------------------------------------------------------------------------");
         pw.println();
 
@@ -175,7 +175,7 @@
                 case blackhole_cpu:
                     new BlackholeConsumeCPUTest().runWith(pw, opts);
                     break;
-                case blackhole_simple:
+                case blackhole_single:
                     new BlackholeSingleTest().runWith(pw, opts);
                     break;
                 case blackhole_pipelined:
@@ -206,7 +206,7 @@
         thermal,
         helpers,
         blackhole_cpu,
-        blackhole_simple,
+        blackhole_single,
         blackhole_pipelined,
         blackhole_consec,
     }
--- a/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/BlackholeConsecutiveTest.java	Fri Sep 11 01:30:26 2015 +0300
+++ b/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/BlackholeConsecutiveTest.java	Fri Sep 11 13:39:10 2015 +0300
@@ -81,7 +81,7 @@
 
         pw.printf("%12s", "");
         for (int steps : ss) {
-            pw.printf("%16s", steps);
+            pw.printf("%20s", steps);
         }
         pw.println();
 
@@ -97,7 +97,7 @@
 
                 RunResult result = new Runner(opts).runSingle();
                 Result r = result.getPrimaryResult();
-                pw.printf("%16s", String.format("%.2f ± %.2f", r.getScore() / steps, r.getScoreError() / steps));
+                pw.printf("%20s", String.format("%.2f ± %.2f", r.getScore() / steps, r.getScoreError() / steps));
                 pw.flush();
             }
             pw.println();
--- a/jmh-core/src/test/java/org/openjdk/jmh/BlackholeTest.java	Fri Sep 11 01:30:26 2015 +0300
+++ b/jmh-core/src/test/java/org/openjdk/jmh/BlackholeTest.java	Fri Sep 11 13:39:10 2015 +0300
@@ -32,15 +32,14 @@
 
     @Test
     public void test() {
-        long tlr = 0;
-        long tlrMask = 0;
+        int tlr = 1;
+        int tlrMask = 2;
         for (int t = 0; t < 1000000000; t++) {
-            tlr = (tlr * 1664525 + 1013904223);
+            tlr = (tlr * 48271);
             if ((tlr & tlrMask) == 0) {
                 // SHOULD ALMOST NEVER HAPPEN IN MEASUREMENT
-                tlrMask = (tlrMask << 1) + 1;
-                tlr = 0;
-//                System.out.println(t);
+                tlrMask = (tlrMask << 1) + 2;
+                System.out.println(t);
             }
         }
     }