changeset 369:1e5aee4ef63b

JMHSample_06: mention fail-on-error.
author shade
date Thu, 23 Jan 2014 17:01:24 +0400
parents b313d460af7a
children e0ea136144d7
files jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_06_FixtureLevel.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_06_FixtureLevel.java	Thu Jan 23 03:00:52 2014 +0400
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_06_FixtureLevel.java	Thu Jan 23 17:01:24 2014 +0400
@@ -72,7 +72,9 @@
      * ============================== HOW TO RUN THIS TEST: ====================================
      *
      * You can see measureRight() yields the result, and measureWrong() fires
-     * the assert at the end of first iteration!
+     * the assert at the end of first iteration! This will not generate the results
+     * for measureWrong(). You can also prevent JMH for proceeding further by
+     * requiring "fail on error".
      *
      * You can run this test:
      *
@@ -81,6 +83,8 @@
      *    $ java -ea -jar target/microbenchmarks.jar ".*JMHSample_06.*" -wi 5 -i 5 -f 1
      *    (we requested 5 warmup/measurement iterations, single fork)
      *
+     *    You can optionally supply -foe to fail the complete run.
+     *
      * b) Via the Java API:
      */
 
@@ -91,6 +95,7 @@
                 .measurementIterations(5)
                 .forks(1)
                 .jvmArgs("-ea")
+                .shouldFailOnError(false) // switch to "true" to fail the complete run
                 .build();
 
         new Runner(opt).run();