ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [08/18] ignite git commit: added near eviction policy for yardstick
Date Thu, 17 Sep 2015 10:09:40 GMT
added near eviction policy for yardstick


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

Branch: refs/heads/ignite-gg-10760
Commit: 8e2520474fdf6e073a54e5d8a23b32fb266d5b4c
Parents: 6bd0f8f
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Tue Sep 15 17:09:23 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Tue Sep 15 17:09:23 2015 +0300

----------------------------------------------------------------------
 .../yardstick/IgniteBenchmarkArguments.java     | 24 ++++++++++----------
 .../org/apache/ignite/yardstick/IgniteNode.java | 12 +++++++---
 2 files changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8e252047/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
index 9710443..6e9059d 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
@@ -53,6 +53,10 @@ public class IgniteBenchmarkArguments {
     private boolean nearCacheFlag = false;
 
     /** */
+    @Parameter(names = {"-ncs", "--nearCacheSize"}, description = "Near cache size")
+    private int nearCacheSize;
+
+    /** */
     @Parameter(names = {"-wom", "--writeOrderMode"}, description = "Write ordering mode")
     private CacheAtomicWriteOrderMode orderMode;
 
@@ -81,10 +85,6 @@ public class IgniteBenchmarkArguments {
     private String restTcpHost;
 
     /** */
-    @Parameter(names = {"-ss", "--syncSend"}, description = "Synchronous send")
-    private boolean syncSnd;
-
-    /** */
     @Parameter(names = {"-r", "--range"}, description = "Key range")
     private int range = 1_000_000;
 
@@ -162,6 +162,13 @@ public class IgniteBenchmarkArguments {
     }
 
     /**
+     * @return Near cache size ({@code 0} for unlimited).
+     */
+    public int getNearCacheSize() {
+        return nearCacheSize;
+    }
+
+    /**
      * @return Synchronization.
      */
     public CacheWriteSynchronizationMode syncMode() {
@@ -211,13 +218,6 @@ public class IgniteBenchmarkArguments {
     }
 
     /**
-     * @return {@code True} if sending is synchronous.
-     */
-    public boolean isSyncSend() {
-        return syncSnd;
-    }
-
-    /**
      * @return Key range, from {@code 0} to this number.
      */
     public int range() {
@@ -278,4 +278,4 @@ public class IgniteBenchmarkArguments {
     @Override public String toString() {
         return GridToStringBuilder.toString(IgniteBenchmarkArguments.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/8e252047/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
index 8c3bc45..ea3bd07 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
@@ -86,8 +86,14 @@ public class IgniteNode implements BenchmarkServer {
             if (cl)
                 c.setClientMode(true);
 
-            if (args.isNearCache())
-                cc.setNearConfiguration(new NearCacheConfiguration());
+            if (args.isNearCache()) {
+                NearCacheConfiguration nearCfg = new NearCacheConfiguration();
+
+                if (args.getNearCacheSize() != 0)
+                    nearCfg.setNearEvictionPolicy(new LruEvictionPolicy(args.getNearCacheSize()));
+
+                cc.setNearConfiguration(nearCfg);
+            }
 
             cc.setWriteSynchronizationMode(args.syncMode());
 
@@ -204,4 +210,4 @@ public class IgniteNode implements BenchmarkServer {
     public Ignite ignite() {
         return ignite;
     }
-}
\ No newline at end of file
+}


Mime
View raw message