ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [4/6] incubator-ignite git commit: review benchmark classloader detection optimized
Date Wed, 22 Apr 2015 15:13:58 GMT
review benchmark
classloader detection optimized


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

Branch: refs/heads/ignite-774
Commit: 4e7fbad70972bf8cd859975422954f55583fa41b
Parents: 4a7479f
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Wed Apr 22 18:06:24 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Wed Apr 22 18:06:24 2015 +0300

----------------------------------------------------------------------
 .../cacheobject/IgniteCacheObjectProcessorImpl.java    |  2 +-
 .../GridCacheSortedEvictionPolicyPerformanceTest.java  | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e7fbad7/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 1f761be..fe5a356 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -277,7 +277,7 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter
impleme
                         valBytes = ctx.processor().marshal(ctx, val);
 
                     ClassLoader ldr = ctx.p2pEnabled() ?
-                        IgniteUtils.detectClass(this.val).getClassLoader() : val.getClass().getClassLoader();
+                        IgniteUtils.detectClassLoader(IgniteUtils.detectClass(this.val))
: U.gridClassLoader();
 
                      Object val = ctx.processor().unmarshal(ctx, valBytes, ldr);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e7fbad7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/GridCacheSortedEvictionPolicyPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/GridCacheSortedEvictionPolicyPerformanceTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/GridCacheSortedEvictionPolicyPerformanceTest.java
index 7864903..8d97a1e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/GridCacheSortedEvictionPolicyPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/GridCacheSortedEvictionPolicyPerformanceTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.eviction.sorted;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.eviction.fifo.*;
 import org.apache.ignite.cache.eviction.sorted.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -77,6 +78,10 @@ public class GridCacheSortedEvictionPolicyPerformanceTest extends GridCommonAbst
         ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
         ccfg.setNearConfiguration(null);
         ccfg.setEvictionPolicy(new SortedEvictionPolicy(MAX_SIZE));
+//        ccfg.setEvictionPolicy(new FifoEvictionPolicy(MAX_SIZE));
+       ccfg.setEvictSynchronized(false);
+
+        cfg.setPeerClassLoadingEnabled(false);
 
         cfg.setCacheConfiguration(ccfg);
 
@@ -97,17 +102,11 @@ public class GridCacheSortedEvictionPolicyPerformanceTest extends GridCommonAbst
 
         multithreadedAsync(new Callable<Object>() {
             @Override public Object call() throws Exception {
-                int c = MEASUREMENT_CNT;
-
-                for (; c > 0; c--) {
+                for (;;) {
                     U.sleep(1000);
 
                     info("Ops/sec: " + cnt.sumThenReset());
                 }
-
-                finished.set(true);
-
-                return null;
             }
         }, 1);
 


Mime
View raw message