Author: mircea.markus
Date: 2007-12-20 23:51:57 -0500 (Thu, 20 Dec 2007)
New Revision: 4904
Modified:
cache-bench-fwk/trunk/build.xml
cache-bench-fwk/trunk/conf/cachebench.xml
cache-bench-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java
cache-bench-fwk/trunk/src/org/cachebench/tests/SimpleTest.java
Log:
Modified: cache-bench-fwk/trunk/build.xml
===================================================================
--- cache-bench-fwk/trunk/build.xml 2007-12-21 03:02:19 UTC (rev 4903)
+++ cache-bench-fwk/trunk/build.xml 2007-12-21 04:51:57 UTC (rev 4904)
@@ -80,7 +80,7 @@
<target name="help" description="Dumps usage information">
<echo>
-This script has 2 purposes: to build AND run the CacheBenchFwk.
+This script has the purpose of building the CacheBenchFwk.
See /docs/ for more details.
Some useful targets:
@@ -286,7 +286,7 @@
<delete dir="${coherence322-plugin.testoutput.dir}"/>
</target>
- <!-- Module terracotta-2.4.8 -->
+ <!-- Module terracotta-2.5.0 -->
<dirname property="module.terracotta-plugin.basedir"
file="${ant.file}"/>
@@ -294,18 +294,17 @@
<property name="compiler.args.terracotta-plugin"
value="${compiler.args}"/>
- <property name="terracotta-plugin.output.dir"
value="${module.terracotta-plugin.basedir}/classes/production/terracotta-2.4.8"/>
- <property name="terracotta-plugin.testoutput.dir"
value="${module.terracotta-plugin.basedir}/classes/test/terracotta-2.4.8"/>
+ <property name="terracotta-plugin.output.dir"
value="${module.terracotta-plugin.basedir}/classes/production/terracotta-2.5.0"/>
+ <property name="terracotta-plugin.testoutput.dir"
value="${module.terracotta-plugin.basedir}/classes/test/terracotta-2.5.0"/>
<path id="terracotta-plugin.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="terracotta-plugin.module.classpath">
- <pathelement
location="${module.terracotta-plugin.basedir}/cache-products/terracotta-2.4.8/conf"/>
+ <pathelement
location="${module.terracotta-plugin.basedir}/cache-products/terracotta-2.5.0/conf"/>
<pathelement location="${framework.output.dir}"/>
<pathelement location="${framework.testoutput.dir}"/>
- <fileset
dir="${module.terracotta-plugin.basedir}/cache-products/terracotta-2.4.8/lib"
includes="*.jar" />
<pathelement location="${terracotta-plugin.output.dir}" />
</path>
@@ -319,15 +318,15 @@
</patternset>
<path id="terracotta-plugin.module.sourcepath">
- <dirset
dir="${module.terracotta-plugin.basedir}/cache-products/terracotta-2.4.8">
+ <dirset
dir="${module.terracotta-plugin.basedir}/cache-products/terracotta-2.5.0">
<include name="src"/>
</dirset>
</path>
- <target name="compile.module.terracotta-plugin"
depends="compile.module.terracotta-plugin.production,compile.module.terracotta-plugin.tests"
description="Compile module terracotta-2.4.8"/>
+ <target name="compile.module.terracotta-plugin"
depends="compile.module.terracotta-plugin.production,compile.module.terracotta-plugin.tests"
description="Compile module terracotta-2.5.0"/>
- <target name="compile.module.terracotta-plugin.production"
depends="compile.module.framework" description="Compile module
terracotta-2.4.8; production classes">
+ <target name="compile.module.terracotta-plugin.production"
depends="compile.module.framework" description="Compile module
terracotta-2.5.0; production classes">
<mkdir dir="${terracotta-plugin.output.dir}"/>
<javac destdir="${terracotta-plugin.output.dir}"
debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
memorymaximumsize="${compiler.max.memory}" fork="true">
<compilerarg line="${compiler.args.terracotta-plugin}"/>
@@ -338,14 +337,14 @@
</javac>
<copy todir="${terracotta-plugin.output.dir}">
- <fileset
dir="${module.terracotta-plugin.basedir}/cache-products/terracotta-2.4.8/src">
+ <fileset
dir="${module.terracotta-plugin.basedir}/cache-products/terracotta-2.5.0/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
- <target name="compile.module.terracotta-plugin.tests"
depends="compile.module.terracotta-plugin.production" description="compile
module terracotta-2.4.8; test classes" unless="skip.tests"/>
+ <target name="compile.module.terracotta-plugin.tests"
depends="compile.module.terracotta-plugin.production" description="compile
module terracotta-2.5.0; test classes" unless="skip.tests"/>
<target name="clean.module.terracotta-plugin" description="cleanup
module">
<delete dir="${terracotta-plugin.output.dir}"/>
@@ -494,72 +493,15 @@
<target name="all" depends="init, clean, compile.module.framework,
compile.module.ehcache124-plugin,
compile.module.coherence322-plugin,compile.module.jbosscache140-plugin,
compile.module.jbosscache200-plugin, compile.module.terracotta-plugin"
description="build all"/>
- <target name="setJBossCache140PluginCPRef"
if="org.cachebench.plugins.jbosscache1" description="Sets the classpath ref
for this plugin only if enabled via system property">
- <property name="plugin.classpath.ref"
value="jbosscache140-plugin.module.classpath" />
- </target>
-
- <target name="setJBossCache200PluginCPRef"
if="org.cachebench.plugins.jbosscache2" description="Sets the classpath ref
for this plugin only if enabled via system property">
- <property name="plugin.classpath.ref"
value="jbosscache200-plugin.module.classpath" />
- </target>
-
- <target name="setEHCache124PluginCPRef"
if="org.cachebench.plugins.ehcache" description="Sets the classpath ref for
this plugin only if enabled via system property">
- <property name="plugin.classpath.ref"
value="ehcache124-plugin.module.classpath" />
- </target>
-
- <target name="setTerracotta230PluginCPRef"
if="org.cachebench.plugins.terracotta" description="Sets the classpath ref
for this plugin only if enabled via system property">
- <property name="plugin.classpath.ref"
value="terracotta-plugin.module.classpath" />
- </target>
-
- <target name="setCoherence322PluginCPRef"
if="org.cachebench.plugins.coherence" description="Sets the classpath ref
for this plugin only if enabled via system property">
- <property name="plugin.classpath.ref"
value="coherence322-plugin.module.classpath" />
- </target>
-
-
- <target name="run" depends="setJBossCache140PluginCPRef,
setJBossCache200PluginCPRef, setEHCache124PluginCPRef, setTerracotta230PluginCPRef,
setCoherence322PluginCPRef">
- <!-- the classpaths here are a bit arse - you need to MANUALLY specify which
plugins to add to the classpath
- to prevent JBoss Cache 1.x and 2.x tripping over each other. -->
-
- <!-- Formats: expects system properties
- org.cachebench.plugins.jbosscache1
- org.cachebench.plugins.jbosscache2
- org.cachebench.pluins.ehcache
- org.cachebench.plugins.terracotta
- org.cachebench.plugins.coherence
- to be set to true if they need to be added to the classpath of the test.
-->
-
- <echo>Running class ${runtime.classname} with classpath ref
${plugin.classpath.ref}</echo>
-
- <java classname="${runtime.classname}" fork="${jvm.fork}"
maxmemory="${jvm.maxmem}" clonevm="true">
- <!--<bootclasspath>-->
- <!--<pathelement
location="./cache-products/terracotta-2.4.8/lib/bootstrap/boot.jar" />-->
- <!--</bootclasspath>-->
- <sysproperty key="bind.address" value="${bind.address}"
/>
- <sysproperty key="currentIndex" value="${env.NODE_INDEX}"
/>
- <sysproperty key="tangosol.coherence.localhost"
value="${tangosol.coherence.localhost}" />
- <sysproperty key="org.cachebench.debug"
value="${org.cachebench.debug}" />
- <sysproperty key="java.net.preferIPv4Stack"
value="${java.net.preferIPv4Stack}" />
- <classpath refid="framework.module.classpath" />
- <classpath refid="${plugin.classpath.ref}"/>
- </java>
- </target>
-
- <target name="runNode">
- <antcall target="run">
- <param name="runtime.classname"
value="org.cachebench.CacheBenchmarkRunner" />
- </antcall>
- </target>
-
- <target name="checkClusterAddresses"
depends="compile.module.framework.production" description="Check whether
the cluster config is a valid one">
- <!--<antcall target="run">-->
- <!--<param name="runtime.classname"
value="org.cachebench.ClusterConfigurationCheck" />-->
- <!--</antcall>-->
-
+ <target name="checkClusterAddresses"
depends="compile.module.framework.production"
+ description="Check whether the cluster config is a valid one">
<java classname="org.cachebench.ClusterConfigurationCheck"
clonevm="true" fork="true">
<classpath>
<pathelement location="${framework.output.dir}"/>
<pathelement location="${framework.testoutput.dir}"/>
</classpath>
- <classpath refid="framework.module.classpath" />
+ <classpath refid="framework.module.classpath"/>
</java>
</target>
+
</project>
Modified: cache-bench-fwk/trunk/conf/cachebench.xml
===================================================================
--- cache-bench-fwk/trunk/conf/cachebench.xml 2007-12-21 03:02:19 UTC (rev 4903)
+++ cache-bench-fwk/trunk/conf/cachebench.xml 2007-12-21 04:51:57 UTC (rev 4904)
@@ -47,7 +47,7 @@
<!--<testcase name="JBossCache2x-Pessimistic-REPL_SYNC_BR"
cacheWrapper="org.cachebench.cachewrappers.JBossCache200Wrapper">-->
<!--<testcase name="JBossCache2x-Pessimistic-REPL_ASYNC"
cacheWrapper="org.cachebench.cachewrappers.JBossCache200Wrapper">-->
- <testcase name="JBossCache2.0"
cacheWrapper="org.cachebench.cachewrappers.JBossCache200Wrapper">
+ <testcase name="JBossCache2.0"
cacheWrapper="org.cachebench.cachewrappers.TerracottaWrapper">
<!-- warms up the cache by doing operation on it; simulates a real-world
environment. If no warmup is needed use
Modified: cache-bench-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java
===================================================================
--- cache-bench-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java 2007-12-21
03:02:19 UTC (rev 4903)
+++ cache-bench-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java 2007-12-21
04:51:57 UTC (rev 4904)
@@ -126,7 +126,7 @@
{
if (!acknowledge)
{
- return message;
+ return payload;
}
String payloadStr = payload.toString();
int endIndex = payloadStr.length() - ACK.length();
Modified: cache-bench-fwk/trunk/src/org/cachebench/tests/SimpleTest.java
===================================================================
--- cache-bench-fwk/trunk/src/org/cachebench/tests/SimpleTest.java 2007-12-21 03:02:19 UTC
(rev 4903)
+++ cache-bench-fwk/trunk/src/org/cachebench/tests/SimpleTest.java 2007-12-21 04:51:57 UTC
(rev 4904)
@@ -35,7 +35,7 @@
executor = Executors.newFixedThreadPool(numThreads);
TestResult result = new TestResult();
- result.setTestName(testCaseName);
+ result.setTestName(testCaseName + getNodeIndex());
result.setTestTime(new Date());
result.setTestType(testName);
@@ -267,4 +267,14 @@
}
return 0;
}
+
+ public String getNodeIndex()
+ {
+ try
+ {
+ return " - " +
Integer.parseInt(System.getProperty("currentIndex"));
+ } catch (Exception e) {
+ return "";
+ }
+ }
}
Show replies by date