ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: Ignite-perftest - Put from system thread.
Date Fri, 13 Nov 2015 15:45:12 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-perftest d18fc7f2f -> df9cc29dc


Ignite-perftest - Put from system thread.


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

Branch: refs/heads/ignite-perftest
Commit: df9cc29dcf14c7ddb0c6d11ca625b06c1c1220c7
Parents: d18fc7f
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Fri Nov 13 18:45:08 2015 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Nov 13 18:45:08 2015 +0300

----------------------------------------------------------------------
 .../yardstick/cache/IgnitePutTxBenchmark.java   | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/df9cc29d/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxBenchmark.java
index c31ca75..799e89c 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxBenchmark.java
@@ -17,10 +17,7 @@
 
 package org.apache.ignite.yardstick.cache;
 
-import java.util.concurrent.Callable;
 import org.apache.ignite.*;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.yardstick.cache.model.*;
 
 import java.util.*;
@@ -29,21 +26,12 @@ import java.util.*;
  * Ignite benchmark that performs transactional put operations.
  */
 public class IgnitePutTxBenchmark extends IgniteCacheAbstractBenchmark {
-    private Callable<IgniteFuture> testCallable = new Callable<IgniteFuture>()
{
-        @Override public IgniteFuture call() throws Exception {
-            int key = nextRandom(args.range());
-
-            // Implicit transaction is used.
-            IgniteCache<Integer, Object> cache0 = cache.withAsync();
-            cache0.put(key, new SampleValue(key));
-
-            return cache0.future();
-        }
-    };
-
     /** {@inheritDoc} */
     @Override public boolean test(Map<Object, Object> ctx) throws Exception {
-        ((IgniteKernal)ignite()).context().closure().callLocalSafe(testCallable, true).get().get();
+        int key = nextRandom(args.range());
+
+        // Implicit transaction is used.
+        cache.put(key, new SampleValue(key));
 
         return true;
     }


Mime
View raw message