changeset 34:6cecb6d42aa5

Minor cleanup in OpsPerInvocation handling code.
author shade
date Mon, 13 May 2013 16:57:35 +0400
parents 096b979871ab
children 5b0b56531fc0
files jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java	Sun May 12 17:42:15 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java	Mon May 13 16:57:35 2013 +0400
@@ -780,10 +780,10 @@
             writer.println(ident(3) + emitCall(method, states) + ';');
             invocationEpilog(writer, 2, method, states, true);
 
-            writer.println("            operations += " + opsPerInv + "L;");
+            writer.println("            operations++;");
             writer.println("        } while(!ld.isDone);");
             writer.println("        long stopTime = System.nanoTime();");
-            writer.println("        return new RawResultPair(operations, (stopTime - startTime) - pauseTime);");
+            writer.println("        return new RawResultPair(operations * " + opsPerInv + "L, (stopTime - startTime) - pauseTime);");
             writer.println("    }");
             writer.println();
         }
@@ -874,10 +874,10 @@
             writer.println(ident(3) + emitCall(method, states) + ';');
             invocationEpilog(writer, 3, method, states, true);
 
-            writer.println("            operations += " + opsPerInv + "L;");
+            writer.println("            operations++;");
             writer.println("        } while(!ld.isDone);");
             writer.println("        long end = System.nanoTime();");
-            writer.println("        return new RawResultPair(operations, (end - start) - pauseTime);");
+            writer.println("        return new RawResultPair(operations * " + opsPerInv + "L, (end - start) - pauseTime);");
             writer.println("    }");
             writer.println();
         }