ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [25/48] ignite git commit: WIP on local benchmarks: added profiler option.
Date Mon, 01 Feb 2016 14:27:20 GMT
WIP on local benchmarks: added profiler option.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fb206c5b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fb206c5b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fb206c5b

Branch: refs/heads/ignite-2454
Commit: fb206c5bc0c8059cbcc8e503391cf0d8b8962c7d
Parents: 79db260
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Jan 29 12:33:35 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Jan 29 12:33:35 2016 +0300

----------------------------------------------------------------------
 modules/benchmarks/pom.xml                        |  2 +-
 .../jmh/cache/JmhCachePutBenchmark.java           |  2 ++
 .../jmh/runner/JmhIdeBenchmarkRunner.java         | 18 ++++++++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fb206c5b/modules/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/benchmarks/pom.xml b/modules/benchmarks/pom.xml
index e735491..7dbc66f 100644
--- a/modules/benchmarks/pom.xml
+++ b/modules/benchmarks/pom.xml
@@ -36,7 +36,7 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <jmh.version>1.11.1</jmh.version>
+        <jmh.version>1.11.3</jmh.version>
         <javac.target>1.6</javac.target>
         <uberjar.name>benchmarks</uberjar.name>
     </properties>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb206c5b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
index 1bc24af..848e7ce 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/cache/JmhCachePutBenchmark.java
@@ -23,6 +23,7 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.internal.benchmarks.jmh.runner.JmhIdeBenchmarkRunner;
 import org.apache.ignite.internal.benchmarks.model.IntValue;
 import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.profile.GCProfiler;
 
 import java.util.concurrent.ThreadLocalRandom;
 
@@ -107,6 +108,7 @@ public class JmhCachePutBenchmark extends JmhCacheAbstractBenchmark {
             .measurementIterations(60)
             .classes(JmhCachePutBenchmark.class)
             .output(output + ".jmh.log")
+            .profilers(GCProfiler.class)
             .jvmArguments(
                 "-Xms4g",
                 "-Xmx4g",

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb206c5b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
index d92a879..af84862 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/runner/JmhIdeBenchmarkRunner.java
@@ -54,6 +54,9 @@ public class JmhIdeBenchmarkRunner {
     /** Amount of threads. */
     private int threads;
 
+    /** Profilers. */
+    private Class[] profilers;
+
     /**
      * Create new runner.
      *
@@ -160,6 +163,16 @@ public class JmhIdeBenchmarkRunner {
     }
 
     /**
+     * @param profilers Profilers.
+     * @return This instance.
+     */
+    public JmhIdeBenchmarkRunner profilers(Class... profilers) {
+        this.profilers = profilers;
+
+        return this;
+    }
+
+    /**
      * Get prepared options builder.
      *
      * @return Options builder.
@@ -189,6 +202,11 @@ public class JmhIdeBenchmarkRunner {
         if (output != null)
             builder.output(output);
 
+        if (profilers != null) {
+            for (Class profiler : profilers)
+                builder.addProfiler(profiler);
+        }
+
         return builder;
     }
 


Mime
View raw message