changeset 459:fda5c52fc014

API CHANGE: Make @Warmup/@Measurement/@OperationsPerInvocation accept "int"-s as parameters, not "long"-s.
author shade
date Mon, 03 Mar 2014 19:05:54 +0400
parents 08022b9c9c91
children 75e8e2c3b31f
files jmh-core-it/src/test/java/org/openjdk/jmh/it/compile/OperationsPerInvocationTest.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Measurement.java jmh-core/src/main/java/org/openjdk/jmh/annotations/OperationsPerInvocation.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Warmup.java
diffstat 4 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/compile/OperationsPerInvocationTest.java	Mon Mar 03 17:06:46 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/compile/OperationsPerInvocationTest.java	Mon Mar 03 19:05:54 2014 +0400
@@ -50,10 +50,4 @@
 
     }
 
-    @GenerateMicroBenchmark
-    @OperationsPerInvocation(Long.MAX_VALUE/2)
-    public void test4() {
-
-    }
-
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Measurement.java	Mon Mar 03 17:06:46 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Measurement.java	Mon Mar 03 19:05:54 2014 +0400
@@ -44,14 +44,14 @@
 public @interface Measurement {
 
     public static final int BLANK_ITERATIONS = -1;
-    public static final long BLANK_TIME = -1L;
+    public static final int BLANK_TIME = -1;
     public static final int BLANK_BATCHSIZE = -1;
 
     /** Amount of iterations */
     int iterations() default BLANK_ITERATIONS;
 
     /** time of each iteration */
-    long time() default BLANK_TIME;
+    int time() default BLANK_TIME;
 
     /** time unit of the time value */
     TimeUnit timeUnit() default TimeUnit.SECONDS;
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/OperationsPerInvocation.java	Mon Mar 03 17:06:46 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/OperationsPerInvocation.java	Mon Mar 03 19:05:54 2014 +0400
@@ -50,7 +50,7 @@
 
     /**
      * Annotation specifies how much to increase the operations count for each invocation of the test-method. */
-    long value() default 1;
+    int value() default 1;
 
 }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Warmup.java	Mon Mar 03 17:06:46 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Warmup.java	Mon Mar 03 19:05:54 2014 +0400
@@ -44,14 +44,14 @@
 public @interface Warmup {
 
     public static final int BLANK_ITERATIONS = -1;
-    public static final long BLANK_TIME = -1L;
+    public static final int BLANK_TIME = -1;
     public static final int BLANK_BATCHSIZE = -1;
 
     /** Amount of iterations */
     int iterations() default BLANK_ITERATIONS;
 
     /** time of each iteration */
-    long time() default BLANK_TIME;
+    int time() default BLANK_TIME;
 
     /** time unit of the time value */
     TimeUnit timeUnit() default TimeUnit.SECONDS;