changeset 967:3c1528368e9f

runners: print shorter message about profilers consuming stdout/stderr.
author shade
date Mon, 18 Aug 2014 16:49:50 +0400
parents c941eda8b87f
children ed4b2a0461b2
files jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Mon Aug 18 16:35:06 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Mon Aug 18 16:49:50 2014 +0400
@@ -568,11 +568,11 @@
                     }
                     out.println("");
 
-                    if (!printOut) {
-                        out.println("# Profilers consume stdout from target VM, use -v " + VerboseMode.EXTRA + " to copy to console");
-                    }
-                    if (!printErr) {
-                        out.println("# Profilers consume stderr from target VM, use -v " + VerboseMode.EXTRA + " to copy to console");
+                    List<String> consumed = new ArrayList<String>();
+                    if (!printOut) consumed.add("stdout");
+                    if (!printErr) consumed.add("stderr");
+                    if (!consumed.isEmpty()) {
+                        out.println("# Profilers consume " + Utils.join(consumed, " and ") + " from target VM, use -v " + VerboseMode.EXTRA + " to copy to console");
                     }
                 }