changeset 88:b36b2d92b9eb

Remove unnecessary trace output. Contributed-by: Sergey Kuksenko <sergey.kuksenko@oracle.com>
author shade
date Tue, 11 Jun 2013 16:55:03 +0400
parents 81994ce1bd24
children 07e6812bf81f
files jmh-core/src/main/java/org/openjdk/jmh/output/format/CsvFormat.java jmh-core/src/main/java/org/openjdk/jmh/output/format/OutputFormat.java jmh-core/src/main/java/org/openjdk/jmh/output/format/PrettyPrintFormat.java jmh-core/src/main/java/org/openjdk/jmh/output/format/SilentFormat.java jmh-core/src/main/java/org/openjdk/jmh/runner/LoopMicroBenchmarkHandler.java jmh-core/src/main/java/org/openjdk/jmh/runner/ShotMicroBenchmarkHandler.java jmh-core/src/main/java/org/openjdk/jmh/runner/options/BaseOptions.java
diffstat 7 files changed, 0 insertions(+), 127 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/format/CsvFormat.java	Tue Jun 11 12:30:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/format/CsvFormat.java	Tue Jun 11 16:55:03 2013 +0400
@@ -101,15 +101,6 @@
     }
 
     @Override
-    public void traceStartIteration() {
-        // don't print anything
-    }
-
-    @Override
-    public void traceEndIteration() {
-    }
-
-    @Override
     public void warmupIteration(BenchmarkRecord benchmark, int iteration, int threads, TimeValue warmupTime) {
         // don't print anything
     }
@@ -145,13 +136,4 @@
     public void threadSubStatistics(BenchmarkRecord name, int threads, RunResult result) {
 
     }
-
-    @Override
-    public void traceHarnessMethodInvoked(String methodName) {
-    }
-
-    @Override
-    public void traceHarnessMethodReturned(String methodName) {
-    }
-
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/format/OutputFormat.java	Tue Jun 11 12:30:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/format/OutputFormat.java	Tue Jun 11 16:55:03 2013 +0400
@@ -135,30 +135,6 @@
 
     /* ------------- SPECIAL TRACING METHODS -------------------- */
 
-    /**
-     * Format for tracing iteration start time.
-     */
-    public void traceStartIteration();
-
-    /**
-     * Format for tracing iteration end time.
-     */
-    public void traceEndIteration();
-
-    /**
-     * Format for harness method invocation diagnostic output.
-     *
-     * @param methodName method name
-     */
-    public void traceHarnessMethodInvoked(String methodName);
-
-    /**
-     * Format for harness method return diagnostic output.
-     *
-     * @param methodName method name
-     */
-    public void traceHarnessMethodReturned(String methodName);
-
     void exception(Throwable ex);
 
     /* ------------- RAW OUTPUT METHODS ------------------- */
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/format/PrettyPrintFormat.java	Tue Jun 11 12:30:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/format/PrettyPrintFormat.java	Tue Jun 11 16:55:03 2013 +0400
@@ -202,38 +202,6 @@
 
     }
 
-    @Override
-    public void traceStartIteration() {
-        if (verbose) {
-            out.println("# Iteration   started at " + new Date() + " in " + Thread.currentThread());
-            out.flush();
-        }
-    }
-
-    @Override
-    public void traceEndIteration() {
-        if (verbose) {
-            out.println("# Iteration completed at " + new Date() + " in " + Thread.currentThread());
-            out.flush();
-        }
-    }
-
-    @Override
-    public void traceHarnessMethodInvoked(String methodName) {
-        if (verbose) {
-            out.println("# Invoking " + methodName + " in " + Thread.currentThread());
-            out.flush();
-        }
-    }
-
-    @Override
-    public void traceHarnessMethodReturned(String methodName) {
-        if (verbose) {
-            out.println("# Returned from " + methodName + " in " + Thread.currentThread());
-            out.flush();
-        }
-    }
-
     protected static String getThreadsString(int t) {
         if (t > 1) {
             return "threads";
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/format/SilentFormat.java	Tue Jun 11 12:30:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/format/SilentFormat.java	Tue Jun 11 16:55:03 2013 +0400
@@ -79,14 +79,6 @@
     }
 
     @Override
-    public void traceStartIteration() {
-    }
-
-    @Override
-    public void traceEndIteration() {
-    }
-
-    @Override
     public void iterationResult(BenchmarkRecord name, int iteration, int thread, IterationResult result, Collection<ProfilerResult> profiles) {
 
     }
@@ -100,12 +92,5 @@
 
     }
 
-    @Override
-    public void traceHarnessMethodInvoked(String methodName) {
-    }
-
-    @Override
-    public void traceHarnessMethodReturned(String methodName) {
-    }
 
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/LoopMicroBenchmarkHandler.java	Tue Jun 11 12:30:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/LoopMicroBenchmarkHandler.java	Tue Jun 11 16:55:03 2013 +0400
@@ -64,7 +64,6 @@
 
     /* output options */
     private final boolean shouldFailOnError;
-    private final boolean shouldTraceBenchmarkStartStop;
 
     /**
      * Constructor
@@ -80,7 +79,6 @@
         this.method = method;
         this.shouldSynchIterations = executionParams.shouldSynchIterations();
         this.shouldFailOnError = options.shouldFailOnError();
-        this.shouldTraceBenchmarkStartStop =  options.shouldTraceBenchmarkStartStop();
     }
 
     /**
@@ -229,10 +227,6 @@
 
         private Result invokeBenchmark(Object instance, Loop loop) throws Throwable {
             Result result;
-            if (shouldTraceBenchmarkStartStop) {
-                format.traceStartIteration();
-            }
-
             if (method != null) {
                 try {
                     result = (Result) method.invoke(instance, loop);
@@ -244,11 +238,6 @@
             } else {
                 throw new IllegalStateException("Unable to find method to run");
             }
-
-            if (shouldTraceBenchmarkStartStop) {
-                format.traceEndIteration();
-            }
-
             return result;
         }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/ShotMicroBenchmarkHandler.java	Tue Jun 11 12:30:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/ShotMicroBenchmarkHandler.java	Tue Jun 11 16:55:03 2013 +0400
@@ -56,7 +56,6 @@
 
     /* output options */
     private final boolean shouldFailOnError;
-    private final boolean shouldTraceBenchmarkStartStop;
 
     /**
      * Constructor
@@ -71,7 +70,6 @@
         super(format, microbenchmark, clazz, options, executionParams);
         this.method = method;
         this.shouldFailOnError = options.shouldFailOnError();
-        this.shouldTraceBenchmarkStartStop =  options.shouldTraceBenchmarkStartStop();
     }
 
     /**
@@ -202,9 +200,6 @@
          */
         private Result invokeBenchmark(Object instance) throws Throwable {
             Result result;
-            if (shouldTraceBenchmarkStartStop) {
-                format.traceStartIteration();
-            }
 
             if (method != null) {
                 try {
@@ -218,10 +213,6 @@
                 throw new IllegalStateException("Unable to find method to run");
             }
 
-            if (shouldTraceBenchmarkStartStop) {
-                format.traceEndIteration();
-            }
-
             return result;
         }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/BaseOptions.java	Tue Jun 11 12:30:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/BaseOptions.java	Tue Jun 11 16:55:03 2013 +0400
@@ -464,24 +464,6 @@
     }
 
     /**
-     * returns true if harness should trace benchmark start/stop
-     *
-     * @return the value
-     */
-    public boolean shouldTraceBenchmarkStartStop() {
-        return traceLevel > 0;
-    }
-
-    /**
-     * return true if harness should trace Setup/tearDown
-     *
-     * @return the value
-     */
-    public boolean shouldTraceSetupTeardown() {
-        return traceLevel > 1;
-    }
-
-    /**
      * Should fail the harness on test error?
      * @return the value
      */