[jbosscache-commits] JBoss Cache SVN: r6306 - in benchmarks/benchmark-fwk/trunk: cache-products/ehcache-1.4.1/src/org/cachebench/cachewrappers and 13 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Jul 16 12:03:20 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-07-16 12:03:20 -0400 (Wed, 16 Jul 2008)
New Revision: 6306

Added:
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/AbstractCacheTest.java
Removed:
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/SerializableCacheWrapper.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableAbstractSuperclass.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomType.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeSubclassOfAbstract.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithAssocs.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithStatics.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithTransient.java
Modified:
   benchmarks/benchmark-fwk/trunk/cache-products/coherence-3.2.2/src/org/cachebench/cachewrappers/CoherenceWrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/src/org/cachebench/cachewrappers/EHCacheWrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-1.4.1/src/org/cachebench/cachewrappers/JBossCacheWrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/src/org/cachebench/cachewrappers/TerracottaWrapper.java
   benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheTest.java
   benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheWrapper.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheWrapper.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/Configuration.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/ReplicationOccursTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/AssociationsTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/CustomClassTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SimpleTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/StaticsTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SubclassTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/TransientTest.java
   benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java
Log:
* Updated tests to use a more "fair" path generation outside of what is being measured.  Cache impls may decide whether they want to use the path info or not.
* Removed SerializableCacheWrapper and related unused junk

Modified: benchmarks/benchmark-fwk/trunk/cache-products/coherence-3.2.2/src/org/cachebench/cachewrappers/CoherenceWrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/coherence-3.2.2/src/org/cachebench/cachewrappers/CoherenceWrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/coherence-3.2.2/src/org/cachebench/cachewrappers/CoherenceWrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,14 +1,12 @@
 package org.cachebench.cachewrappers;
 
+import com.tangosol.net.CacheFactory;
+import com.tangosol.net.NamedCache;
 import org.cachebench.CacheWrapper;
 
 import java.util.Map;
 
-import com.tangosol.net.NamedCache;
-import com.tangosol.net.CacheFactory;
-
 /**
- *
  * Pass in a -Dtangosol.coherence.localhost=IP_ADDRESS
  *
  * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
@@ -33,12 +31,12 @@
       cache.release();
    }
 
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
       cache.put(key, value);
    }
 
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
       return cache.get(key);
    }
@@ -58,8 +56,8 @@
       return cache.keySet().toString();
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
-      return get(key);
+      return get(path, key);
    }
 }

Modified: benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/src/org/cachebench/cachewrappers/EHCacheWrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/src/org/cachebench/cachewrappers/EHCacheWrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/src/org/cachebench/cachewrappers/EHCacheWrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -11,6 +11,7 @@
 
 import java.io.Serializable;
 import java.net.URL;
+import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
 
@@ -134,7 +135,7 @@
    /* (non-Javadoc)
    * @see org.cachebench.CacheWrapper#put(java.lang.Object, java.lang.Object)
    */
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
       putSerializable((Serializable) key, (Serializable) value);
    }
@@ -142,7 +143,7 @@
    /* (non-Javadoc)
    * @see org.cachebench.CacheWrapper#get(java.lang.Object)
    */
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
       Object s = getSerializable((Serializable) key);
       if (s instanceof Element)
@@ -162,8 +163,8 @@
       return cache.getKeys().toString() + " remote peers: " + manager.getCachePeerListener().getBoundCachePeers();
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
-      return get(key);
+      return get(path, key);
    }
 }

Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-1.4.1/src/org/cachebench/cachewrappers/JBossCacheWrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-1.4.1/src/org/cachebench/cachewrappers/JBossCacheWrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-1.4.1/src/org/cachebench/cachewrappers/JBossCacheWrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -6,8 +6,7 @@
 import org.jboss.cache.PropertyConfigurator;
 import org.jboss.cache.TreeCache;
 
-import java.util.Map;
-import java.util.HashMap;
+import java.util.*;
 
 
 /**
@@ -42,14 +41,14 @@
         tree.destroyService();
     }
 
-    public void put(Object key, Object value) throws Exception
+    public void put(List<String> l, Object key, Object value) throws Exception
     {
         HashMap map = new HashMap(1);
         map.put( key, value );
             tree.put(key.toString(), map);
     }
 
-    public Object get(Object key) throws Exception
+    public Object get(List<String> l, Object key) throws Exception
     {
             return tree.get( key.toString() );
 
@@ -70,7 +69,7 @@
       return tree.printDetails();
    }
 
-   public Object getReplicatedData(String key)
+   public Object getReplicatedData(List<String> l, String key)
    {
       return null;   
    }

Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.0.0/src/org/cachebench/cachewrappers/JBossCache200Wrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -11,6 +11,7 @@
 import org.jboss.cache.marshall.NodeData;
 
 import java.net.URL;
+import java.util.List;
 import java.util.Map;
 
 public class JBossCache200Wrapper implements CacheWrapper
@@ -40,17 +41,14 @@
       cache.stop();
    }
 
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
-      // make sure the threads don't conflict!
-      Fqn f = new Fqn("test", key);
-      cache.put(f, key, value);
+      cache.put(new Fqn(path, true), key, value);
    }
 
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
-      Fqn f = new Fqn("test", key);
-      return cache.get(f, key);
+      return cache.get(new Fqn(path, true), key);
    }
 
    public void empty() throws Exception
@@ -69,14 +67,14 @@
       return "Num direct children: " + cache.getRoot().getChildren().size();
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
       CacheSPI cacheSpi = (CacheSPI) cache;
-      GravitateResult result = cacheSpi.gravitateData(new Fqn("test", key), true);
+      GravitateResult result = cacheSpi.gravitateData(new Fqn(path, true), true);
       if (!result.isDataFound())
       {
          //totall replication?
-         return get(key);
+         return get(path, key);
       }
       NodeData nodeData = result.getNodeData().get(0);
       return nodeData.getAttributes().get(key);

Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -10,6 +10,7 @@
 import org.jboss.cache.buddyreplication.GravitateResult;
 import org.jboss.cache.marshall.NodeData;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -41,17 +42,15 @@
       cache.stop();
    }
 
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
-      // make sure the threads don't conflict!
-      Fqn f = new Fqn("test", key);
-      cache.put(f, key, value);
+
+      cache.put(new Fqn(path, true), key, value);
    }
 
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
-      Fqn f = new Fqn("test", key);
-      return cache.get(f, key);
+      return cache.get(new Fqn(path, true), key);
    }
 
    public void empty() throws Exception
@@ -70,14 +69,14 @@
       return "Num direct children: " + cache.getRoot().getChildren().size();
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
       CacheSPI cacheSpi = (CacheSPI) cache;
-      GravitateResult result = cacheSpi.gravitateData(new Fqn("test", key), true);
+      GravitateResult result = cacheSpi.gravitateData(new Fqn(path, true), true);
       if (!result.isDataFound())
       {
          //totall replication?
-         return get(key);
+         return get(path, key);
       }
       NodeData nodeData = result.getNodeData().get(0);
       return nodeData.getAttributes().get(key);

Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -11,6 +11,7 @@
 import org.jboss.cache.buddyreplication.GravitateResult;
 import org.jboss.cache.marshall.NodeData;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -42,17 +43,14 @@
       cache.stop();
    }
 
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
-      // make sure the threads don't conflict!
-      Fqn f = new Fqn("test", key);
-      cache.put(f, key, value);
+      cache.put(Fqn.fromList(path), key, value);
    }
 
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
-      Fqn f = new Fqn("test", key);
-      return cache.get(f, key);
+      return cache.get(Fqn.fromList(path), key);
    }
 
    public void empty() throws Exception
@@ -71,14 +69,14 @@
       return "Num direct children: " + cache.getRoot().getChildren().size();
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
       CacheSPI cacheSpi = (CacheSPI) cache;
-      GravitateResult result = cacheSpi.gravitateData(new Fqn("test", key), true, new InvocationContext());
+      GravitateResult result = cacheSpi.gravitateData(Fqn.fromList(path), true, new InvocationContext());
       if (!result.isDataFound())
       {
          //totall replication?
-         return get(key);
+         return get(path, key);
       }
       NodeData nodeData = result.getNodeData().get(0);
       return nodeData.getAttributes().get(key);

Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -8,6 +8,7 @@
 import org.jboss.cache.Fqn;
 import org.jboss.cache.config.Option;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -36,17 +37,14 @@
       cache.stop();
    }
 
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
-      // make sure the threads don't conflict!
-      Fqn f = Fqn.fromElements("test", key);
-      cache.put(f, key, value);
+      cache.put(Fqn.fromList(path), key, value);
    }
 
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
-      Fqn f = Fqn.fromElements("test", key);
-      return cache.get(f, key);
+      return cache.get(Fqn.fromList(path), key);
    }
 
    public void empty() throws Exception
@@ -65,11 +63,10 @@
       return "Num direct children: " + cache.getRoot().getChildren().size();
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
       Option option = cache.getInvocationContext().getOptionOverrides();
       option.setForceDataGravitation(true);
-      Fqn<String> fqn = Fqn.fromElements("test", key);
-      return cache.get(fqn, key);
+      return cache.get(Fqn.fromList(path), key);
    }
 }

Modified: benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/src/org/cachebench/cachewrappers/TerracottaWrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/src/org/cachebench/cachewrappers/TerracottaWrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/src/org/cachebench/cachewrappers/TerracottaWrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -2,12 +2,13 @@
 
 import org.cachebench.CacheWrapper;
 
+import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
-import java.util.HashMap;
 
 /**
  * Cache wrapper for Terracotta 2.3.0
- *
+ * <p/>
  * Using the terracotta-cache package on http://www.terracotta.org/confluence/display/labs/Terracotta+Cache
  *
  * @author <a href="manik at jboss.org">Manik Surtani</a>
@@ -21,9 +22,9 @@
    {
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
-      return get(key);
+      return get(path, key);
    }
 
    public void setUp() throws Exception
@@ -32,23 +33,23 @@
 
    public void tearDown() throws Exception
    {
-      synchronized(cache)
+      synchronized (cache)
       {
          cache.clear();
       }
    }
 
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
-      synchronized(cache)
+      synchronized (cache)
       {
          cache.put(key, value);
       }
    }
 
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
-      synchronized(cache)
+      synchronized (cache)
       {
          return cache.get(key);
       }
@@ -56,7 +57,7 @@
 
    public void empty() throws Exception
    {
-      synchronized(cache)
+      synchronized (cache)
       {
          cache.clear();
       }
@@ -69,7 +70,7 @@
 
    public String getInfo()
    {
-      synchronized(cache)
+      synchronized (cache)
       {
          return "There are " + cache.size() + " objects in cache";
       }

Modified: benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -14,13 +14,13 @@
       w.setUp();
       String k = "k", v = "v";
 
-      w.put(k, v);
+      w.put(null, k, v);
 
-      System.out.println("Value is " + w.get(k));
+      System.out.println("Value is " + w.get(null, k));
 
       w.empty();
 
-      System.out.println("Value is " + w.get(k));
+      System.out.println("Value is " + w.get(null, k));
 
    }
 }
\ No newline at end of file

Modified: benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheWrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheWrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/cache-products/whirlycache-1.0.1/src/org/cachebench/cachewrappers/WhirlyCacheWrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -6,6 +6,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.cachebench.CacheWrapper;
 
+import java.util.List;
 import java.util.Map;
 
 
@@ -47,7 +48,7 @@
    /* (non-Javadoc)
    * @see org.cachebench.CacheWrapper#put(java.lang.Object, java.lang.Object)
    */
-   public void put(Object key, Object value) throws Exception
+   public void put(List<String> path, Object key, Object value) throws Exception
    {
       cache.store(key, value);
    }
@@ -55,7 +56,7 @@
    /* (non-Javadoc)
    * @see org.cachebench.CacheWrapper#get(java.lang.Object)
    */
-   public Object get(Object key) throws Exception
+   public Object get(List<String> path, Object key) throws Exception
    {
       return cache.retrieve(key);
    }
@@ -70,8 +71,8 @@
       return cache.toString();
    }
 
-   public Object getReplicatedData(String key) throws Exception
+   public Object getReplicatedData(List<String> path, String key) throws Exception
    {
-      return get(key);
+      return get(path, key);
    }
 }
\ No newline at end of file

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheWrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheWrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheWrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,6 +1,6 @@
 package org.cachebench;
 
-import java.util.Properties;
+import java.util.List;
 import java.util.Map;
 
 
@@ -41,20 +41,21 @@
     * as a black box, and is what is timed, so it should be implemented in the most efficient (or most
     * realistic) way possible.
     *
+    * @param path
     * @param key
     * @param value
     */
-   void put(Object key, Object value) throws Exception;
+   void put(List<String> path, Object key, Object value) throws Exception;
 
    /**
     * Similar to put, get wraps up an operation related to retrieving an object from the cache.  As in the
     * case of put, this too is treated as a black box and is timed, and should be implemented in the most
     * efficient/realistic way possible.
     *
-    * @param key
-    * @return The value pertaining to the key in cache
+    * @param path
+    * @param key  @return The value pertaining to the key in cache
     */
-   Object get(Object key) throws Exception;
+   Object get(List<String> path, Object key) throws Exception;
 
    /**
     * This is called after each test type (if emptyCacheBetweenTests is set to true in cachebench.xml) and is
@@ -77,5 +78,5 @@
     * structure, but use some additional structure to do this (replication tree, in the case of buddy replication).
     * This method is a hook for handling this situations.
     */
-   public Object getReplicatedData(String key) throws Exception;
+   public Object getReplicatedData(List<String> path, String key) throws Exception;
 }

Deleted: benchmarks/benchmark-fwk/trunk/src/org/cachebench/SerializableCacheWrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/SerializableCacheWrapper.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/SerializableCacheWrapper.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,27 +0,0 @@
-package org.cachebench;
-
-import java.io.Serializable;
-
-
-/**
- * @author Manik Surtani (manik at surtani.org)
- * @version $Id: SerializableCacheWrapper.java,v 1.4 2007/04/18 19:09:29 msurtani Exp $
- */
-public interface SerializableCacheWrapper extends CacheWrapper
-{
-   /**
-    * Similar to get, only uses serializable objects
-    *
-    * @param key The key of the value in cache.
-    * @return The value in cache.
-    */
-   Object getSerializable(Serializable key) throws Exception;
-
-   /**
-    * Similar to put, only uses serializable objects
-    *
-    * @param key   The serializable key in which the value will be saved.
-    * @param value The serializable value be saved.
-    */
-   void putSerializable(Serializable key, Serializable value) throws Exception;
-}

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/Configuration.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/Configuration.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/Configuration.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -10,6 +10,7 @@
  */
 public class Configuration
 {
+   private int maxTreeDepth;
    private int sampleSize;
    private int sleepBetweenTests;
    private boolean gcBetweenTestsEnabled;
@@ -113,6 +114,16 @@
       this.clusterConfig = clusterConfig;
    }
 
+   public int getMaxTreeDepth()
+   {
+      return maxTreeDepth;
+   }
+
+   public void setMaxTreeDepth(int maxTreeDepth)
+   {
+      this.maxTreeDepth = maxTreeDepth;
+   }
+
    public TestCase getTestCase(String testCaseName)
    {
       for (TestCase testCase : getTestCases())

Deleted: benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableAbstractSuperclass.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableAbstractSuperclass.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableAbstractSuperclass.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,18 +0,0 @@
-package org.cachebench.testobjects;
-
-import java.io.Serializable;
-import java.util.Date;
-
-
-/**
- * @author Manik Surtani (manik at surtani.org)
- * @version $Id: SerializableAbstractSuperclass.java,v 1.2 2007/03/13 14:50:45 msurtani Exp $
- */
-public abstract class SerializableAbstractSuperclass implements Serializable
-{
-   protected String myString = "MyString";
-   protected int myInt = 5;
-   protected float myFloat = 5.0f;
-   protected long myLong = 5l;
-   protected Date myDate = new Date();
-}

Deleted: benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomType.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomType.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomType.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,18 +0,0 @@
-package org.cachebench.testobjects;
-
-import java.io.Serializable;
-import java.util.Date;
-
-
-/**
- * @author Manik Surtani (manik at surtani.org)
- * @version $Id: SerializableCustomType.java,v 1.3 2007/03/13 14:50:45 msurtani Exp $
- */
-public class SerializableCustomType implements Serializable
-{
-   protected String subString = "subclass string";
-   protected int subInt = 5;
-   protected float subFloat = 5.0f;
-   protected long subLong = 5l;
-   protected Date subDate = new Date();
-}

Deleted: benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeSubclassOfAbstract.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeSubclassOfAbstract.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeSubclassOfAbstract.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,17 +0,0 @@
-package org.cachebench.testobjects;
-
-import java.util.Date;
-
-
-/**
- * @author Manik Surtani (manik at surtani.org)
- * @version $Id: SerializableCustomTypeSubclassOfAbstract.java,v 1.2 2007/03/13 14:50:45 msurtani Exp $
- */
-public class SerializableCustomTypeSubclassOfAbstract extends SerializableAbstractSuperclass
-{
-   protected String subString = "subclass string";
-   protected int subInt = 5;
-   protected float subFloat = 5.0f;
-   protected long subLong = 5l;
-   protected Date subDate = new Date();
-}

Deleted: benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithAssocs.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithAssocs.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithAssocs.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,24 +0,0 @@
-package org.cachebench.testobjects;
-
-import java.io.Serializable;
-import java.util.Date;
-
-
-/**
- * @author Manik Surtani (manik at surtani.org)
- * @version $Id: SerializableCustomTypeWithAssocs.java,v 1.2 2007/03/13 14:50:45 msurtani Exp $
- */
-public class SerializableCustomTypeWithAssocs implements Serializable
-{
-   protected String subString = "subclass string";
-   protected int subInt = 5;
-   protected float subFloat = 5.0f;
-   protected long subLong = 5l;
-   protected Date subDate = new Date();
-
-   // recursive assoc
-   protected CustomType assoc1 = new CustomType();
-   protected CustomType assoc2 = new CustomType();
-   protected CustomType assoc3 = new CustomType();
-}
-

Deleted: benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithStatics.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithStatics.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithStatics.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,22 +0,0 @@
-package org.cachebench.testobjects;
-
-import java.io.Serializable;
-import java.util.Date;
-
-
-/**
- * @author Manik Surtani (manik at surtani.org)
- * @version $Id: SerializableCustomTypeWithStatics.java,v 1.2 2007/03/13 14:50:45 msurtani Exp $
- */
-public class SerializableCustomTypeWithStatics implements Serializable
-{
-   protected String subString = "subclass string";
-   protected int subInt = 5;
-   protected float subFloat = 5.0f;
-   protected long subLong = 5l;
-   protected Date subDate = new Date();
-
-   protected static String stString = "static string";
-   protected static Date stDate = new Date();
-
-}

Deleted: benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithTransient.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithTransient.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/testobjects/SerializableCustomTypeWithTransient.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,21 +0,0 @@
-package org.cachebench.testobjects;
-
-import java.io.Serializable;
-import java.util.Date;
-
-
-/**
- * @author Manik Surtani (manik at surtani.org)
- * @version $Id: SerializableCustomTypeWithTransient.java,v 1.3 2007/03/13 14:50:45 msurtani Exp $
- */
-public class SerializableCustomTypeWithTransient implements Serializable
-{
-   protected String subString = "subclass string";
-   protected int subInt = 5;
-   protected float subFloat = 5.0f;
-   protected long subLong = 5l;
-   protected Date subDate = new Date();
-
-   protected transient String trString = "transient";
-   protected transient Date trDate = new Date();
-}

Added: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/AbstractCacheTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/AbstractCacheTest.java	                        (rev 0)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/AbstractCacheTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -0,0 +1,18 @@
+package org.cachebench.tests;
+
+import java.util.Arrays;
+import java.util.List;
+
+public abstract class AbstractCacheTest implements CacheTest
+{
+   /**
+    * @return a well-spaced path for a key-value pair
+    */
+   protected List<String> generatePath(String base, int sequence)
+   {
+      // use bucket sizes of 100 and a depth of 3.
+      int intermediate = sequence % 100;
+      return Arrays.asList(base, "Intermediate-" + intermediate, "Node " + sequence);
+   }
+
+}

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/ReplicationOccursTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/ReplicationOccursTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/ReplicationOccursTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -10,6 +10,7 @@
 import org.cachebench.tests.results.StatisticTestResult;
 
 import java.net.SocketAddress;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Map;
 
@@ -72,7 +73,7 @@
       {
          try
          {
-            cache.put(PREFIX + currentNodeIndex, "true");
+            cache.put(Arrays.asList(PREFIX, "" + currentNodeIndex), PREFIX + currentNodeIndex, "true");
             return;
          }
          catch (Throwable e)
@@ -185,7 +186,7 @@
       {
          try
          {
-            return cache.getReplicatedData(PREFIX + i);
+            return cache.getReplicatedData(Arrays.asList(PREFIX, "" + i), PREFIX + i);
          }
          catch (Throwable e)
          {

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -9,6 +9,7 @@
 import org.cachebench.tests.results.TestResult;
 
 import java.util.Date;
+import java.util.List;
 import java.util.Random;
 
 /**
@@ -17,7 +18,7 @@
  * @author Mircea.Markus at jboss.com
  * @since 2.2
  */
-public class SessionSimulatorTest implements CacheTest
+public class SessionSimulatorTest extends AbstractCacheTest
 {
    private static final Log log = LogFactory.getLog(SessionSimulatorTest.class);
 
@@ -77,20 +78,24 @@
       Random r = new Random();
       int randomAction;
       int randomAttribute;
-      long durrationNanos = 0;
+      long durationNanos = 0;
       for (int i = 0; i < numberOfRequests; i++)
       {
          logRunCount(i);
          randomAction = r.nextInt(100);
          randomAttribute = r.nextInt(numberOfAttributes - 1);
          byte[] buf;
+
+         String sessionEntry = getSessionEntry(randomAttribute);
+         List<String> path = generatePath(sessionId, randomAttribute);
+
          if (randomAction < readPercentage)
          { // read
             try
             {
                long start = System.nanoTime();
-               buf = (byte[]) cacheWrapper.get(getSessionEntry(randomAttribute));
-               durrationNanos += System.nanoTime() - start;
+               buf = (byte[]) cacheWrapper.get(path, sessionEntry);
+               durationNanos += System.nanoTime() - start;
                totalBytesRead += buf.length;
                reads++;
             }
@@ -105,8 +110,8 @@
             try
             {
                long start = System.nanoTime();
-               cacheWrapper.put(getSessionEntry(randomAttribute), buf);
-               durrationNanos += System.nanoTime() - start;
+               cacheWrapper.put(path, sessionEntry, buf);
+               durationNanos += System.nanoTime() - start;
                totalBytesWritten += buf.length;
                writes++;
             }
@@ -116,8 +121,8 @@
             }
          }
       }
-      long durration = this.reportNanos ? durrationNanos : durrationNanos / 1000000;
-      SessionSimulatorTestResult result = new SessionSimulatorTestResult(reads, writes, durration, totalBytesRead, totalBytesWritten);
+      long duration = this.reportNanos ? durationNanos : durationNanos / 1000000;
+      SessionSimulatorTestResult result = new SessionSimulatorTestResult(reads, writes, duration, totalBytesRead, totalBytesWritten);
       result.setTestPassed(true);
       result.setTestName(testCaseName + getNodeIndex());
       result.setTestTime(new Date());
@@ -140,7 +145,7 @@
       {
          try
          {
-            cacheWrapper.put(getSessionEntry(i), new byte[sizeOfAnAttribute]);
+            cacheWrapper.put(generatePath(sessionId, i), getSessionEntry(i), new byte[sizeOfAnAttribute]);
          }
          catch (Throwable e)
          {

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/AssociationsTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/AssociationsTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/AssociationsTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,10 +1,8 @@
 package org.cachebench.tests.simpletests;
 
 import org.cachebench.CacheWrapper;
-import org.cachebench.SerializableCacheWrapper;
-import org.cachebench.tests.results.StatisticTestResult;
 import org.cachebench.testobjects.CustomTypeWithAssocs;
-import org.cachebench.testobjects.SerializableCustomTypeWithAssocs;
+import org.cachebench.tests.results.StatisticTestResult;
 
 
 /**
@@ -25,7 +23,7 @@
    */
    public StatisticTestResult doTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads) throws Exception
    {
-      return performTestWithObjectType(testName, cache, cache instanceof SerializableCacheWrapper ? SerializableCustomTypeWithAssocs.class : CustomTypeWithAssocs.class, testCaseName, sampleSize, numThreads);
+      return performTestWithObjectType(testName, cache, CustomTypeWithAssocs.class, testCaseName, sampleSize, numThreads);
 
    }
 

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/CustomClassTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/CustomClassTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/CustomClassTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,10 +1,8 @@
 package org.cachebench.tests.simpletests;
 
 import org.cachebench.CacheWrapper;
-import org.cachebench.SerializableCacheWrapper;
-import org.cachebench.tests.results.StatisticTestResult;
 import org.cachebench.testobjects.CustomType;
-import org.cachebench.testobjects.SerializableCustomType;
+import org.cachebench.tests.results.StatisticTestResult;
 
 
 /**
@@ -24,7 +22,7 @@
    */
    public StatisticTestResult doTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads) throws Exception
    {
-      return performTestWithObjectType(testName, cache, cache instanceof SerializableCacheWrapper ? SerializableCustomType.class : CustomType.class, testCaseName, sampleSize, numThreads);
+      return performTestWithObjectType(testName, cache, CustomType.class, testCaseName, sampleSize, numThreads);
 
    }
 

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SimpleTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SimpleTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SimpleTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -4,17 +4,16 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
 import org.cachebench.CacheWrapper;
-import org.cachebench.SerializableCacheWrapper;
 import org.cachebench.config.Configuration;
 import org.cachebench.config.TestCase;
 import org.cachebench.config.TestConfig;
-import org.cachebench.tests.CacheTest;
+import org.cachebench.tests.AbstractCacheTest;
 import org.cachebench.tests.results.StatisticTestResult;
 
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectOutputStream;
-import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 import java.util.Random;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -27,7 +26,7 @@
  * @author Manik Surtani (manik at surtani.org)
  *         (C) Manik Surtani, 2004
  */
-public abstract class SimpleTest implements CacheTest
+public abstract class SimpleTest extends AbstractCacheTest
 {
    protected Log log = LogFactory.getLog(this.getClass());
    protected AtomicLong numberOfBytesPut = new AtomicLong(0);
@@ -119,7 +118,6 @@
       final String key = "baseKey";
       final DescriptiveStatistics getStats = DescriptiveStatistics.newInstance();
       final DescriptiveStatistics putStats = DescriptiveStatistics.newInstance();
-      final boolean useSerializable = cache instanceof SerializableCacheWrapper;
       Random rand = new Random();
       int modDivisor = 100 / writePercentage;
       numberOfBytesPut.set(0);
@@ -152,25 +150,16 @@
 
                      numberOfBytesPut.getAndAdd(calculateSerializedSize(value));
 
-                     if (!useSerializable)
-                     {
-                        // start your timer...
-                        long startTime = System.nanoTime();
-                        cache.put(key + cycleNumber, value);
-                        long statValue = (System.nanoTime() - startTime);
-                        putStats.addValue(statValue);
-                        if (log.isDebugEnabled()) log.debug("Time For This Put: " + statValue);
-                     }
-                     else
-                     {
-                        SerializableCacheWrapper sCache = (SerializableCacheWrapper) cache;
-                        Serializable sValue = (Serializable) value;
-                        long startTime = System.nanoTime();
-                        sCache.putSerializable(key + cycleNumber, sValue);
-                        long statValue = (System.nanoTime() - startTime);
-                        putStats.addValue(statValue);
-                        if (log.isDebugEnabled()) log.debug("Time For This Put: " + statValue);
-                     }
+                     List<String> path = generatePath(key, cycleNumber);
+                     String attributeKey = key + cycleNumber;
+
+                     // start your timer...
+                     long startTime = System.nanoTime();
+                     cache.put(path, attributeKey, value);
+                     long statValue = (System.nanoTime() - startTime);
+                     putStats.addValue(statValue);
+                     if (log.isDebugEnabled()) log.debug("Time For This Put: " + statValue);
+
                      logOperation(cycleNumber, "PUTS");
                   }
                   catch (Exception e)
@@ -191,24 +180,15 @@
                   int cycleNumber = getCount.getAndIncrement();
                   try
                   {
-                     if (!useSerializable)
-                     {
-                        // start your timer...
-                        long startTime = System.nanoTime();
-                        cache.get(key + cycleNumber);
-                        long statValue = (System.nanoTime() - startTime);
-                        getStats.addValue(statValue);
-                        if (log.isDebugEnabled()) log.debug("Time For This Get: " + statValue);
-                     }
-                     else
-                     {
-                        SerializableCacheWrapper sCache = (SerializableCacheWrapper) cache;
-                        long startTime = System.nanoTime();
-                        sCache.getSerializable(key + cycleNumber);
-                        long statValue = (System.nanoTime() - startTime);
-                        getStats.addValue(statValue);
-                        if (log.isDebugEnabled()) log.debug("Time For This Get: " + statValue);
-                     }
+                     List<String> path = generatePath(key, cycleNumber);
+                     String attributeKey = key + cycleNumber;
+
+                     // start your timer...
+                     long startTime = System.nanoTime();
+                     cache.get(path, attributeKey);
+                     long statValue = (System.nanoTime() - startTime);
+                     getStats.addValue(statValue);
+                     if (log.isDebugEnabled()) log.debug("Time For This Get: " + statValue);
                      logOperation(cycleNumber, "GETS");
                   }
                   catch (Exception e)

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/StaticsTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/StaticsTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/StaticsTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,10 +1,8 @@
 package org.cachebench.tests.simpletests;
 
 import org.cachebench.CacheWrapper;
-import org.cachebench.SerializableCacheWrapper;
-import org.cachebench.tests.results.StatisticTestResult;
 import org.cachebench.testobjects.CustomTypeWithStatics;
-import org.cachebench.testobjects.SerializableCustomTypeWithStatics;
+import org.cachebench.tests.results.StatisticTestResult;
 
 
 /**
@@ -25,7 +23,7 @@
    */
    public StatisticTestResult doTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads) throws Exception
    {
-      return performTestWithObjectType(testName, cache, cache instanceof SerializableCacheWrapper ? SerializableCustomTypeWithStatics.class : CustomTypeWithStatics.class, testCaseName, sampleSize, numThreads);
+      return performTestWithObjectType(testName, cache, CustomTypeWithStatics.class, testCaseName, sampleSize, numThreads);
    }
 
 }

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SubclassTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SubclassTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SubclassTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,10 +1,8 @@
 package org.cachebench.tests.simpletests;
 
 import org.cachebench.CacheWrapper;
-import org.cachebench.SerializableCacheWrapper;
-import org.cachebench.tests.results.StatisticTestResult;
 import org.cachebench.testobjects.CustomTypeSubclassOfAbstract;
-import org.cachebench.testobjects.SerializableCustomTypeSubclassOfAbstract;
+import org.cachebench.tests.results.StatisticTestResult;
 
 
 /**
@@ -25,7 +23,7 @@
    */
    public StatisticTestResult doTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads) throws Exception
    {
-      return performTestWithObjectType(testName, cache, cache instanceof SerializableCacheWrapper ? SerializableCustomTypeSubclassOfAbstract.class : CustomTypeSubclassOfAbstract.class, testCaseName, sampleSize, numThreads);
+      return performTestWithObjectType(testName, cache, CustomTypeSubclassOfAbstract.class, testCaseName, sampleSize, numThreads);
 
    }
 

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/TransientTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/TransientTest.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/TransientTest.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -1,10 +1,8 @@
 package org.cachebench.tests.simpletests;
 
 import org.cachebench.CacheWrapper;
-import org.cachebench.SerializableCacheWrapper;
-import org.cachebench.tests.results.StatisticTestResult;
 import org.cachebench.testobjects.CustomTypeWithTransient;
-import org.cachebench.testobjects.SerializableCustomTypeWithTransient;
+import org.cachebench.tests.results.StatisticTestResult;
 
 
 /**
@@ -24,7 +22,7 @@
    */
    public StatisticTestResult doTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads) throws Exception
    {
-      return performTestWithObjectType(testName, cache, cache instanceof SerializableCacheWrapper ? SerializableCustomTypeWithTransient.class : CustomTypeWithTransient.class, testCaseName, sampleSize, numThreads);
+      return performTestWithObjectType(testName, cache, CustomTypeWithTransient.class, testCaseName, sampleSize, numThreads);
 
    }
 }

Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java	2008-07-16 15:05:37 UTC (rev 6305)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java	2008-07-16 16:03:20 UTC (rev 6306)
@@ -4,6 +4,9 @@
 import org.apache.commons.logging.LogFactory;
 import org.cachebench.CacheWrapper;
 
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * Perfoms N puts, gets and removals, where n is configurable.
  *
@@ -18,12 +21,14 @@
    {
       Integer opCount = Integer.parseInt(getConfigParam("operationCount"));
       log.info("Cache launched, performing " + opCount + " put and get operations ");
+      List<String> path = Arrays.asList("a", "b", "c");
       for (int i = 0; i < opCount; i++)
       {
          try
          {
-            wrapper.put(String.valueOf(opCount), String.valueOf(opCount));
-         } catch (Throwable e)
+            wrapper.put(path, String.valueOf(opCount), String.valueOf(opCount));
+         }
+         catch (Throwable e)
          {
             log.warn("Exception on cache warmup", e);
          }
@@ -31,7 +36,7 @@
 
       for (int i = 0; i < opCount; i++)
       {
-         wrapper.get(String.valueOf(opCount));
+         wrapper.get(path, String.valueOf(opCount));
       }
       log.trace("Cache warmup ended!");
    }




More information about the jbosscache-commits mailing list