Author: manik.surtani(a)jboss.com
Date: 2008-10-13 06:24:44 -0400 (Mon, 13 Oct 2008)
New Revision: 6906
Added:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RC.xml
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RR.xml
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/config.sh
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/commons-codec.jar
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jboss-common-core.jar
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jboss-logging-spi.jar
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jcip-annotations.jar
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jgroups.jar
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jta.jar
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/starobrno.jar
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/org/
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/org/cachebench/
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/org/cachebench/cachewrappers/
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/org/cachebench/cachewrappers/StarobrnoWrapper.java
Modified:
benchmarks/benchmark-fwk/trunk/build.xml
Log:
Added support for starobrno
Modified: benchmarks/benchmark-fwk/trunk/build.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/build.xml 2008-10-13 09:35:27 UTC (rev 6905)
+++ benchmarks/benchmark-fwk/trunk/build.xml 2008-10-13 10:24:44 UTC (rev 6906)
@@ -232,12 +232,27 @@
</javac>
</target>
+ <target name="compile.module.starobrno" depends="fwk"
+ description="Compile module starobrno">
+ <mkdir dir="./classes/production/starobrno"/>
+ <javac destdir="./classes/production/starobrno"
debug="${compiler.debug}"
+ nowarn="${compiler.generate.no.warnings}"
fork="true">
+ <classpath>
+ <fileset dir="./cache-products/starobrno/lib"
includes="*.jar"/>
+ <fileset dir="./lib/common" includes="*.jar"/>
+ <pathelement location="./lib/commons-logging.jar"/>
+ <pathelement location="${framework.output.dir}"/>
+ </classpath>
+ <src path="./cache-products/starobrno/src"/>
+ </javac>
+ </target>
+
<target name="clean" description="cleanup all">
<delete dir="./classes"/>
</target>
<target name="all"
- depends="clean, fwk, compile.module.jbosscache140,
compile.module.jbosscache200, compile.module.pojocache220, compile.module.jbosscache210,
compile.module.jbosscache220, compile.module.terracotta250, compile.module.ehcache159,
compile.module.whirlycache101, compile.module.jbosscache300,
compile.module.coherence331"
+ depends="clean, fwk, compile.module.jbosscache140,
compile.module.jbosscache200, compile.module.pojocache220, compile.module.jbosscache210,
compile.module.jbosscache220, compile.module.terracotta250, compile.module.ehcache159,
compile.module.whirlycache101, compile.module.jbosscache300, compile.module.coherence331,
compile.module.starobrno"
description="build all"/>
<target name="checkClusterAddresses" depends="fwk"
Copied: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RC.xml
(from rev 6905,
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RC.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RC.xml
(rev 0)
+++
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RC.xml 2008-10-13
10:24:44 UTC (rev 6906)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.0">
+ <locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"
+ concurrencyLevel="300"/>
+ <transaction
transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+ <stateRetrieval timeout="20000"
fetchInMemoryState="false"/>
+ <transport clusterName="JBossCache-Cluster"/>
+</jbosscache>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RR.xml
(from rev 6905,
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RR.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RR.xml
(rev 0)
+++
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/conf/mvcc-local-RR.xml 2008-10-13
10:24:44 UTC (rev 6906)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.0">
+ <locking isolationLevel="REPEATABLE_READ"
lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"
+ concurrencyLevel="300"/>
+ <transaction
transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+ <stateRetrieval timeout="20000"
fetchInMemoryState="false"/>
+ <transport clusterName="JBossCache-Cluster"/>
+</jbosscache>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/config.sh (from rev 6905,
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/config.sh)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/starobrno/config.sh
(rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/starobrno/config.sh 2008-10-13 10:24:44
UTC (rev 6906)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#see "$CACHE_ROOT/cache-products/cache.sh" for details
+
+THIS_DIR="./cache-products/starobrno"
+
+#setting up classpath
+for JAR in $THIS_DIR/lib/*
+do
+ CLASSPATH=$CLASSPATH:$JAR
+done
+
+CLASSPATH="$CLASSPATH:./classes/production/starobrno"
+CLASSPATH="$CLASSPATH:$THIS_DIR/conf"
+#--classpath was set
+
+#additional JVM options
+JVM_OPTIONS="$JVM_OPTIONS -Djava.net.preferIPv4Stack=true
-Djbosscache.config.validate=false"
+JVM_OPTIONS="$JVM_OPTIONS
-DcacheBenchFwk.cacheWrapperClassName=org.cachebench.cachewrappers.StarobrnoWrapper"
Added: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/commons-codec.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/commons-codec.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jboss-common-core.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jboss-common-core.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jboss-logging-spi.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jboss-logging-spi.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jcip-annotations.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jcip-annotations.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jgroups.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jgroups.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jta.jar
===================================================================
(Binary files differ)
Property changes on: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/jta.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/starobrno.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/lib/starobrno.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied:
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/org/cachebench/cachewrappers/StarobrnoWrapper.java
(from rev 6905,
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/src/org/cachebench/cachewrappers/JBossCache300Wrapper.java)
===================================================================
---
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/org/cachebench/cachewrappers/StarobrnoWrapper.java
(rev 0)
+++
benchmarks/benchmark-fwk/trunk/cache-products/starobrno/src/org/cachebench/cachewrappers/StarobrnoWrapper.java 2008-10-13
10:24:44 UTC (rev 6906)
@@ -0,0 +1,75 @@
+package org.cachebench.cachewrappers;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.cachebench.CacheWrapper;
+import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.starobrno.Cache;
+
+import java.util.List;
+import java.util.Map;
+
+public class StarobrnoWrapper implements CacheWrapper
+{
+ private Cache flatCache;
+ private Log log = LogFactory.getLog(StarobrnoWrapper.class);
+
+ public StarobrnoWrapper()
+ {
+ }
+
+ public void init(Map parameters) throws Exception
+ {
+ log.info("Creating cache with the following configuration: " +
parameters);
+ flatCache = new DefaultCacheFactory().createCache((String)
parameters.get("config"));
+ log.info("Running following JBossCacheVersion: " +
org.jboss.cache.Version.version);
+ log.info("Running following JBossCacheCodeName: " +
org.jboss.cache.Version.codename);
+ }
+
+ public void setUp() throws Exception
+ {
+ }
+
+ public void tearDown() throws Exception
+ {
+ flatCache.stop();
+ }
+
+ public void put(List<String> path, Object key, Object value) throws Exception
+ {
+ flatCache.put(key, value);
+ }
+
+ public Object get(List<String> path, Object key) throws Exception
+ {
+ return flatCache.get(key);
+ }
+
+ public void empty() throws Exception
+ {
+ flatCache.clear();
+ }
+
+ public int getNumMembers()
+ {
+ return -1; // todo
+ }
+
+ public String getInfo()
+ {
+ return "Cache size: " + flatCache.size();
+ }
+
+ public Object getReplicatedData(List<String> path, String key) throws Exception
+ {
+ return flatCache.get(key); // todo
+// if (!cache.getConfiguration().getCacheMode().isSynchronous())
+// {
+// log.info("Sleeping 5 seconds because the cache is replicated
asynchronious!");
+// Thread.sleep(5000);
+// }
+// Option option = cache.getInvocationContext().getOptionOverrides();
+// option.setForceDataGravitation(true);
+// return get(path, key);
+ }
+}
\ No newline at end of file