Author: manik.surtani(a)jboss.com
Date: 2009-03-05 07:24:26 -0500 (Thu, 05 Mar 2009)
New Revision: 7856
Added:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RC.xml
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RR.xml
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/config.sh
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/commons-logging.jar
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/horizon.jar
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jboss-common-core.jar
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jboss-logging-spi.jar
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jcip-annotations.jar
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jgroups.jar
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jta.jar
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/org/
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/org/cachebench/
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/org/cachebench/cachewrappers/
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/org/cachebench/cachewrappers/HorizonWrapper.java
Modified:
benchmarks/benchmark-fwk/trunk/build.xml
benchmarks/benchmark-fwk/trunk/runAllLocal.sh
Log:
Added Horizon
Modified: benchmarks/benchmark-fwk/trunk/build.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/build.xml 2009-03-05 11:44:03 UTC (rev 7855)
+++ benchmarks/benchmark-fwk/trunk/build.xml 2009-03-05 12:24:26 UTC (rev 7856)
@@ -248,18 +248,18 @@
</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}"
+ <target name="compile.module.horizon" depends="fwk"
+ description="Compile module Horizon">
+ <mkdir dir="./classes/production/horizon"/>
+ <javac destdir="./classes/production/horizon"
debug="${compiler.debug}"
nowarn="${compiler.generate.no.warnings}"
fork="true">
<classpath>
- <fileset dir="./cache-products/starobrno/lib"
includes="*.jar"/>
+ <fileset dir="./cache-products/Horizon-1.0.0/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"/>
+ <src path="./cache-products/Horizon-1.0.0/src"/>
</javac>
</target>
@@ -268,7 +268,7 @@
</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.ehcache150,
compile.module.ehcache160, compile.module.whirlycache101, compile.module.jbosscache300,
compile.module.coherence331, compile.module.starobrno"
+ depends="clean, fwk, compile.module.jbosscache140,
compile.module.jbosscache200, compile.module.pojocache220, compile.module.jbosscache210,
compile.module.jbosscache220, compile.module.terracotta250, compile.module.ehcache150,
compile.module.ehcache160, compile.module.whirlycache101, compile.module.jbosscache300,
compile.module.coherence331, compile.module.horizon"
description="build all"/>
<target name="checkClusterAddresses" depends="fwk"
Added: benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RC.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RC.xml
(rev 0)
+++
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RC.xml 2009-03-05
12:24:26 UTC (rev 7856)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<horizon
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:horizon:config:1.0">
+ <default>
+ <locking concurrencyLevel="5000"
isolationLevel="READ_COMMITTED" />
+ </default>
+</horizon>
Added: benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RR.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RR.xml
(rev 0)
+++
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/conf/local-RR.xml 2009-03-05
12:24:26 UTC (rev 7856)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<horizon
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:horizon:config:1.0">
+ <default>
+ <locking concurrencyLevel="5000"
isolationLevel="REPEATABLE_READ" />
+ </default>
+</horizon>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/config.sh (from rev
7854, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/config.sh)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/config.sh
(rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/config.sh 2009-03-05
12:24:26 UTC (rev 7856)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#see "$CACHE_ROOT/cache-products/cache.sh" for details
+
+THIS_DIR="./cache-products/Horizon-1.0.0"
+
+#setting up classpath
+for JAR in $THIS_DIR/lib/*
+do
+ CLASSPATH=$CLASSPATH:$JAR
+done
+
+CLASSPATH="$CLASSPATH:./classes/production/horizon"
+CLASSPATH="$CLASSPATH:$THIS_DIR/conf"
+#--classpath was set
+
+#additional JVM options
+JVM_OPTIONS="$JVM_OPTIONS -Djava.net.preferIPv4Stack=true"
+JVM_OPTIONS="$JVM_OPTIONS
-DcacheBenchFwk.cacheWrapperClassName=org.cachebench.cachewrappers.HorizonWrapper"
Added:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/commons-logging.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/horizon.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/horizon.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jboss-common-core.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jboss-common-core.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jboss-logging-spi.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jboss-logging-spi.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jcip-annotations.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jcip-annotations.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jgroups.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jgroups.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jta.jar
===================================================================
(Binary files differ)
Property changes on:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/lib/jta.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/org/cachebench/cachewrappers/HorizonWrapper.java
===================================================================
---
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/org/cachebench/cachewrappers/HorizonWrapper.java
(rev 0)
+++
benchmarks/benchmark-fwk/trunk/cache-products/Horizon-1.0.0/src/org/cachebench/cachewrappers/HorizonWrapper.java 2009-03-05
12:24:26 UTC (rev 7856)
@@ -0,0 +1,106 @@
+package org.cachebench.cachewrappers;
+
+import org.cachebench.CacheWrapper;
+import org.horizon.Cache;
+import org.horizon.factories.DefaultCacheFactory;
+import org.horizon.manager.CacheManager;
+import org.horizon.manager.DefaultCacheManager;
+
+import javax.transaction.TransactionManager;
+import java.util.Map;
+import java.util.List;
+
+public class HorizonWrapper implements CacheWrapper
+{
+ CacheManager cacheManager;
+ Cache cache;
+ TransactionManager tm;
+ boolean started = false;
+ String config;
+
+ public void init(Map parameters) throws Exception
+ {
+ config = (String) parameters.get("config");
+ setUp();
+ }
+
+ public void setUp() throws Exception
+ {
+ if (!started)
+ {
+ cacheManager = new DefaultCacheManager(config);
+ // use the default cache
+ cache = cacheManager.getCache();
+ started = true;
+ }
+ }
+
+ public void tearDown() throws Exception
+ {
+ if (started)
+ {
+ cacheManager.stop();
+ started = false;
+ }
+ }
+
+ public void put(List<String> path, Object key, Object value) throws Exception
+ {
+ cache.put(key, value);
+ }
+
+ public Object get(List<String> path, Object key) throws Exception
+ {
+ return cache.get(key);
+ }
+
+ public void empty() throws Exception
+ {
+ cache.clear();
+ }
+
+ public int getNumMembers()
+ {
+ return cacheManager.getMembers() == null ? 0 : cacheManager.getMembers().size();
+ }
+
+ public String getInfo()
+ {
+ return cache.getVersion();
+ }
+
+ public Object getReplicatedData(List<String> path, String key) throws Exception
+ {
+ return get(null, key);
+ }
+
+ public Object startTransaction()
+ {
+ if (tm == null) return null;
+ try
+ {
+ tm.begin();
+ return tm.getTransaction();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void endTransaction(boolean successful)
+ {
+ if (tm == null) return;
+ try
+ {
+ if (successful)
+ tm.commit();
+ else
+ tm.rollback();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Modified: benchmarks/benchmark-fwk/trunk/runAllLocal.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/runAllLocal.sh 2009-03-05 11:44:03 UTC (rev 7855)
+++ benchmarks/benchmark-fwk/trunk/runAllLocal.sh 2009-03-05 12:24:26 UTC (rev 7856)
@@ -7,12 +7,18 @@
export PLAIN_JVM_OPTIONS="${JVM_OPTIONS}
-DcacheBenchFwk.fwkCfgFile=cachebench-local.xml -Xms2g -Xmx2g"
unset JVM_OPTIONS && export JVM_OPTIONS="${PLAIN_JVM_OPTIONS}
-DcacheBenchFwk.productSuffix=(3.0.3.GA)"
./runLocalNode.sh jbosscache-3.0.0 mvcc-local-RC.xml
+unset JVM_OPTIONS && export JVM_OPTIONS="${PLAIN_JVM_OPTIONS}
-DcacheBenchFwk.productSuffix=(3.0.3.GA)"
+./runLocalNode.sh jbosscache-3.0.0 mvcc-local-RR.xml
unset JVM_OPTIONS && export JVM_OPTIONS="${PLAIN_JVM_OPTIONS}"
./runLocalNode.sh ehcache-1.5.0 ehcache-local.xml
unset JVM_OPTIONS && export JVM_OPTIONS="${PLAIN_JVM_OPTIONS}
-DcacheBenchFwk.productSuffix=(1.6.0.Beta3)"
./runLocalNode.sh ehcache-1.6.0 ehcache-local.xml
unset JVM_OPTIONS && export JVM_OPTIONS="${PLAIN_JVM_OPTIONS}"
./runLocalNode.sh whirlycache-1.0.1
+unset JVM_OPTIONS && export JVM_OPTIONS="${PLAIN_JVM_OPTIONS}
-DcacheBenchFwk.productSuffix=(1.0.0.M1)"
+./runLocalNode.sh Horizon-1.0.0 local-RC.xml
+unset JVM_OPTIONS && export JVM_OPTIONS="${PLAIN_JVM_OPTIONS}
-DcacheBenchFwk.productSuffix=(1.0.0.M1)"
+./runLocalNode.sh Horizon-1.0.0 local-RR.xml
mkdir output
mv data* ./output