JBoss Cache SVN: r6322 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 12:08:09 -0400 (Thu, 17 Jul 2008)
New Revision: 6322
Added:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RC.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RR.xml
Removed:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml
Log:
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RC.xml (from rev 6320, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RC.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RC.xml 2008-07-17 16:08:09 UTC (rev 6322)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc" concurrencyLevel="300"/>
+ <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+ <stateRetrieval timeout="20000"/>
+ <transport clusterName="JBossCache-Cluster"/>
+</jbosscache>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RR.xml (from rev 6320, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RR.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-RR.xml 2008-07-17 16:08:09 UTC (rev 6322)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+ <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc" concurrencyLevel="300"/>
+ <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+ <stateRetrieval timeout="20000"/>
+ <transport clusterName="JBossCache-Cluster"/>
+</jbosscache>
Deleted: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml 2008-07-17 16:07:30 UTC (rev 6321)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml 2008-07-17 16:08:09 UTC (rev 6322)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc" concurrencyLevel="300"/>
- <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster"/>
-</jbosscache>
Deleted: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml 2008-07-17 16:07:30 UTC (rev 6321)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml 2008-07-17 16:08:09 UTC (rev 6322)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc" concurrencyLevel="300"/>
- <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster"/>
-</jbosscache>
17 years, 9 months
JBoss Cache SVN: r6321 - benchmarks/benchmark-fwk/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 12:07:30 -0400 (Thu, 17 Jul 2008)
New Revision: 6321
Modified:
benchmarks/benchmark-fwk/trunk/runAllLocal.sh
Log:
Modified: benchmarks/benchmark-fwk/trunk/runAllLocal.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/runAllLocal.sh 2008-07-17 16:06:24 UTC (rev 6320)
+++ benchmarks/benchmark-fwk/trunk/runAllLocal.sh 2008-07-17 16:07:30 UTC (rev 6321)
@@ -3,7 +3,8 @@
rm -rf ./output/*
export JVM_OPTIONS="${JVM_OPTIONS} -DcacheBenchFwk.fwkCfgFile=cachebench-local.xml"
./runLocalNode.sh jbosscache-3.0.0 pess-local.xml
-./runLocalNode.sh jbosscache-3.0.0 mvcc-local.xml
+./runLocalNode.sh jbosscache-3.0.0 mvcc-local-RR.xml
+./runLocalNode.sh jbosscache-3.0.0 mvcc-local-RC.xml
./runLocalNode.sh jbosscache-3.0.0 pess-local-NONE.xml
./runLocalNode.sh ehcache-1.4.1 ehcache-local.xml
17 years, 9 months
JBoss Cache SVN: r6320 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 12:06:24 -0400 (Thu, 17 Jul 2008)
New Revision: 6320
Added:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml
Log:
Added: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local-rc.xml 2008-07-17 16:06:24 UTC (rev 6320)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc" concurrencyLevel="300"/>
+ <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+ <stateRetrieval timeout="20000"/>
+ <transport clusterName="JBossCache-Cluster"/>
+</jbosscache>
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml 2008-07-17 13:58:38 UTC (rev 6319)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-local.xml 2008-07-17 16:06:24 UTC (rev 6320)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
+ <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc" concurrencyLevel="300"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<stateRetrieval timeout="20000"/>
<transport clusterName="JBossCache-Cluster"/>
17 years, 9 months
JBoss Cache SVN: r6319 - benchmarks/benchmark-fwk/trunk/conf.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 09:58:38 -0400 (Thu, 17 Jul 2008)
New Revision: 6319
Modified:
benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml
Log:
Added the ability to perform multiple runs
Modified: benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml 2008-07-17 13:57:13 UTC (rev 6318)
+++ benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml 2008-07-17 13:58:38 UTC (rev 6319)
@@ -44,7 +44,7 @@
If no warmup is needed use org.cachebench.warmup.NoCacheWarmup
-->
<warmup warmupClass="org.cachebench.warmup.PutGetCacheWarmup">
- <param name="operationCount" value="50000"/>
+ <param name="operationCount" value="10000"/>
</warmup>
<!--
@@ -60,7 +60,7 @@
* You can write your own custom testClass.
* weight is currently unused.
-->
- <test name="Strings" testClass="org.cachebench.tests.simpletests.StringTest" weight="2.0" repeat="10">
+ <test name="Strings" testClass="org.cachebench.tests.simpletests.StringTest" weight="2.0" repeat="20">
<param name="writePercentage" value="20"/>
</test>
17 years, 9 months
JBoss Cache SVN: r6318 - in benchmarks/benchmark-fwk/trunk: conf and 2 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 09:57:13 -0400 (Thu, 17 Jul 2008)
New Revision: 6318
Modified:
benchmarks/benchmark-fwk/trunk/conf/log4j.xml
benchmarks/benchmark-fwk/trunk/generateChart.sh
benchmarks/benchmark-fwk/trunk/runAllLocal.sh
benchmarks/benchmark-fwk/trunk/runLocalNode.sh
benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/AbstractChartGen.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/CsvStatisticReportGenerator.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/PutGetChartGenerator.java
Log:
Added the ability to perform multiple runs
Modified: benchmarks/benchmark-fwk/trunk/conf/log4j.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/conf/log4j.xml 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/conf/log4j.xml 2008-07-17 13:57:13 UTC (rev 6318)
@@ -3,82 +3,87 @@
<!-- The Log4j Configuration -->
<!-- $Id: log4j.xml,v 1.10 2007/05/18 14:32:09 msurtani Exp $ -->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <!-- The list of appenders -->
- <!-- The rolling file appender -->
- <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
- <param name="File" value="cachebench.log"/>
- <param name="Append" value="true"/>
- <param name="Threshold" value="TRACE"/>
- <param name="MaxFileSize" value="10480KB"/>
- <param name="MaxBackupIndex" value="3"/>
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
- <!--param name="ConversionPattern" valye="%p %t %c - %m%n"/-->
- </layout>
- </appender>
+ <!-- The list of appenders -->
+ <!-- The rolling file appender -->
+ <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="cachebench.log"/>
+ <param name="Append" value="true"/>
+ <param name="Threshold" value="TRACE"/>
+ <param name="MaxFileSize" value="10480KB"/>
+ <param name="MaxBackupIndex" value="3"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ <!--param name="ConversionPattern" valye="%p %t %c - %m%n"/-->
+ </layout>
+ </appender>
- <!-- The console appender -->
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <param name="Threshold" value="TRACE"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
- </layout>
- </appender>
+ <!-- The console appender -->
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="TRACE"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
- <!-- The list of Categories-->
- <category name="ClusterConfigurationCheck" additivity="false">
- <priority value="INFO"/>
- <appender-ref ref="CONSOLE"/>
- </category>
+ <!-- The list of Categories-->
+ <category name="ClusterConfigurationCheck" additivity="false">
+ <priority value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ </category>
- <category name="CacheException" additivity="false">
- <priority value="ERROR"/>
- <appender-ref ref="FILE"/>
- </category>
+ <category name="CacheException" additivity="false">
+ <priority value="ERROR"/>
+ <appender-ref ref="FILE"/>
+ </category>
- <category name="org.apache" additivity="false">
- <priority value="ERROR"/>
- <appender-ref ref="FILE"/>
- </category>
+ <category name="org.apache" additivity="false">
+ <priority value="ERROR"/>
+ <appender-ref ref="FILE"/>
+ </category>
- <category name="org.cachebench" additivity="false">
- <priority value="TRACE"/>
- <appender-ref ref="FILE"/>
- <appender-ref ref="CONSOLE"/>
- </category>
+ <category name="org.cachebench" additivity="false">
+ <priority value="INFO"/>
+ <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ </category>
- <category name="net.sf.ehcache" additivity="false">
- <priority value="WARN"/>
- <appender-ref ref="FILE"/>
- </category>
+ <category name="org.cachebench.reportgenerators" additivity="false">
+ <priority value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </category>
+ <category name="net.sf.ehcache" additivity="false">
+ <priority value="WARN"/>
+ <appender-ref ref="FILE"/>
+ </category>
+
<category name="com.tc" additivity="false">
- <priority value="WARN"/>
- <appender-ref ref="FILE"/>
- </category>
+ <priority value="WARN"/>
+ <appender-ref ref="FILE"/>
+ </category>
<category name="org.tc" additivity="false">
- <priority value="WARN"/>
- <appender-ref ref="FILE"/>
- </category>
+ <priority value="WARN"/>
+ <appender-ref ref="FILE"/>
+ </category>
<category name="org.jboss" additivity="false">
- <priority value="ERROR"/>
- <appender-ref ref="FILE"/>
- </category>
+ <priority value="ERROR"/>
+ <appender-ref ref="FILE"/>
+ </category>
<category name="org.jboss.cache" additivity="false">
- <priority value="WARN"/>
- <appender-ref ref="FILE"/>
- <appender-ref ref="CONSOLE"/>
- </category>
+ <priority value="WARN"/>
+ <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ </category>
- <!-- Here goes the root -->
- <root>
- <priority value ="INFO" />
- <!--<appender-ref ref="FILE" />-->
- <appender-ref ref="CONSOLE" />
- </root>
+ <!-- Here goes the root -->
+ <root>
+ <priority value="INFO"/>
+ <!--<appender-ref ref="FILE" />-->
+ <appender-ref ref="CONSOLE"/>
+ </root>
</log4j:configuration>
Modified: benchmarks/benchmark-fwk/trunk/generateChart.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/generateChart.sh 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/generateChart.sh 2008-07-17 13:57:13 UTC (rev 6318)
@@ -1,6 +1,6 @@
#!/bin/bash
-CP=.:classes/production/Framework
+CP=.:classes/production/Framework:./conf
for i in lib/*.jar
do
Modified: benchmarks/benchmark-fwk/trunk/runAllLocal.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/runAllLocal.sh 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/runAllLocal.sh 2008-07-17 13:57:13 UTC (rev 6318)
@@ -1,7 +1,7 @@
#!/bin/bash
rm -rf ./output/*
-
+export JVM_OPTIONS="${JVM_OPTIONS} -DcacheBenchFwk.fwkCfgFile=cachebench-local.xml"
./runLocalNode.sh jbosscache-3.0.0 pess-local.xml
./runLocalNode.sh jbosscache-3.0.0 mvcc-local.xml
./runLocalNode.sh jbosscache-3.0.0 pess-local-NONE.xml
Modified: benchmarks/benchmark-fwk/trunk/runLocalNode.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/runLocalNode.sh 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/runLocalNode.sh 2008-07-17 13:57:13 UTC (rev 6318)
@@ -45,7 +45,7 @@
#. ./bindAddress.sh
#echo bind address exit code is $?
-JVM_OPTIONS="${JVM_OPTIONS} -DcacheBenchFwk.cachePrioductName=${CACHE_PRODUCT} -DcacheBenchFwk.cacheConfigFile=${TEST_CFG} -Djava.net.preferIPv4Stack=${preferIPv4Stack} -DlocalOnly=true"
+JVM_OPTIONS="${JVM_OPTIONS} -DcacheBenchFwk.cacheProductName=${CACHE_PRODUCT} -DcacheBenchFwk.cacheConfigFile=${TEST_CFG} -Djava.net.preferIPv4Stack=${preferIPv4Stack} -DlocalOnly=true"
TO_EXECUTE="java $JVM_OPTIONS -cp $CLASSPATH org.cachebench.CacheBenchmarkRunner"
if [ "$DEBUG" = "debug" ]
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java 2008-07-17 13:57:13 UTC (rev 6318)
@@ -68,13 +68,15 @@
/**
* Initialise some params that may be passed in via JVM params
*/
- private void initJVMParams()
+ private void initJVMParams(String defaultCfgFile)
{
+ String overallCfg = System.getProperty("cacheBenchFwk.fwkCfgFile", defaultCfgFile);
String configuraton = System.getProperty("cacheBenchFwk.cacheConfigFile");
- String cacheProductName = System.getProperty("cacheBenchFwk.cachePrioductName");
+ String cacheProductName = System.getProperty("cacheBenchFwk.cacheProductName");
String clusterSize = System.getProperty("clusterSize");
localOnly = Boolean.getBoolean("localOnly");
+ systemParams.put("fwk.config", overallCfg);
if (configuraton != null) systemParams.put("config", configuraton);
if (cacheProductName != null) systemParams.put("cacheProductName", cacheProductName);
if (clusterSize != null) systemParams.put("clusterSize", clusterSize);
@@ -88,12 +90,13 @@
private CacheBenchmarkRunner(String s)
{
- initJVMParams();
+ initJVMParams(s);
// first, try and find the configuration on the filesystem.
+ s = systemParams.get("fwk.config");
URL confFile = ConfigBuilder.findConfigFile(s);
if (confFile == null)
{
- log.warn("Unable to locate a configuration file; Application terminated");
+ log.warn("Unable to locate a configuration file " + s + "; Application terminated");
}
else
{
@@ -233,8 +236,8 @@
catch (Exception e)
{
// The Empty barrier of the cache failed. Add a foot note for the TestResult here.
- testResult.setFootNote("The Cache Empty barrier failed after test case: " + testResult.getTestName() + " : " + testResult.getTestType());
- errorLogger.error("The Cache Empty barrier failed after test case : " + testResult.getTestName() + ", " + testResult.getTestType(), e);
+// testResult.setFootNote("The Cache Empty barrier failed after test case: " + testResult.getTestName() + " : " + testResult.getTestType());
+// errorLogger.error("The Cache Empty barrier failed after test case : " + testResult.getTestName() + ", " + testResult.getTestType(), e);
}
return testResult;
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/AbstractChartGen.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/AbstractChartGen.java 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/AbstractChartGen.java 2008-07-17 13:57:13 UTC (rev 6318)
@@ -4,6 +4,7 @@
{
protected String reportDirectory;
protected String filenamePrefix;
+ protected static final String MU = "\u00B5";//((char) 0xC2B5) + "";
public void setReportDirectory(String reportDirectory)
{
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/CsvStatisticReportGenerator.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/CsvStatisticReportGenerator.java 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/CsvStatisticReportGenerator.java 2008-07-17 13:57:13 UTC (rev 6318)
@@ -6,7 +6,6 @@
import org.cachebench.tests.results.TestResult;
import java.io.BufferedWriter;
-import java.io.FileWriter;
import java.io.IOException;
@@ -48,9 +47,9 @@
buf.append(",");
buf.append(stResults.getNumThreads());
buf.append(",");
- buf.append(putData.getSum()/1000);
+ buf.append(putData.getSum() / 1000);
buf.append(",");
- buf.append(getData.getSum()/1000);
+ buf.append(getData.getSum() / 1000);
buf.append(",");
buf.append(putData.getMean());
buf.append(",");
@@ -76,6 +75,10 @@
buf.append(stResults.getThroughputTransactionsPerSecond());
buf.append(",");
buf.append(stResults.getThroughputBytesPerSecond());
+ buf.append(",");
+ buf.append(putData.getN());
+ buf.append(",");
+ buf.append(getData.getN());
}
else
{
@@ -97,9 +100,9 @@
protected void writeHeaderLine(BufferedWriter writer) throws IOException
{
log.debug("Write the Report Header");
- writer.write("TEST NAME, TEST DATE, TEST TYPE, NUM MEMBERS, NUM THREADS, TOTAL PUT TIME (secs), TOTAL GET TIME (secs), MEAN PUT TIME, MEAN GET TIME, MEDIAN PUT TIME, MEDIAN GET TIME, STANDARD DEVIATION PUT TIME, STANDARD DEVIATION GET TIME, MAX PUT TIME, MAX GET TIME, MIN PUT TIME, MIN GET TIME, THROUGHPUT TRANSACTIONS PER SEC, THROUGHPUT BYTES PER SEC");
+ writer.write("TEST NAME, TEST DATE, TEST TYPE, NUM MEMBERS, NUM THREADS, TOTAL PUT TIME (secs), TOTAL GET TIME (secs), MEAN PUT TIME, MEAN GET TIME, MEDIAN PUT TIME, MEDIAN GET TIME, STANDARD DEVIATION PUT TIME, STANDARD DEVIATION GET TIME, MAX PUT TIME, MAX GET TIME, MIN PUT TIME, MIN GET TIME, THROUGHPUT TRANSACTIONS PER SEC, THROUGHPUT BYTES PER SEC, NUM_PUTS, NUM_GETS");
writer.newLine();
- log.debug("Complted the Report Header");
+ log.debug("Completed the Report Header");
}
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/PutGetChartGenerator.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/PutGetChartGenerator.java 2008-07-17 11:51:15 UTC (rev 6317)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/PutGetChartGenerator.java 2008-07-17 13:57:13 UTC (rev 6318)
@@ -1,5 +1,7 @@
package org.cachebench.reportgenerators;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
@@ -30,6 +32,9 @@
private DefaultCategoryDataset putData, getData;
private String chartExtension = ".png";
private String putChartName = "PutChart", getChartName = "GetChart";
+ private Log log = LogFactory.getLog(PutGetChartGenerator.class);
+ private int nPuts = 0, nGets = 0;
+ private int numFilesScanned = 0;
public void generateChart() throws IOException
{
@@ -43,7 +48,7 @@
chartFile = new File(putChartNameToUse + chartExtension);
}
- ChartUtilities.saveChartAsPNG(chartFile, createChart("Report: Comparing Cache PUT (WRITE) performance", putData), 800, 800);
+ ChartUtilities.saveChartAsPNG(chartFile, createChart("Report: Comparing Cache PUT (WRITE) performance", putData, nPuts / numFilesScanned), 800, 800);
String getChartNameToUse = filenamePrefix == null ? getChartName : filenamePrefix + "-" + getChartName;
chartFile = new File(getChartNameToUse + chartExtension);
@@ -53,14 +58,14 @@
chartFile = new File(getChartNameToUse + chartExtension);
}
- ChartUtilities.saveChartAsPNG(chartFile, createChart("Report: Comparing Cache GET (READ) performance", getData), 800, 800);
+ ChartUtilities.saveChartAsPNG(chartFile, createChart("Report: Comparing Cache GET (READ) performance", getData, nGets / numFilesScanned), 800, 800);
System.out.println("Charts saved as " + putChartNameToUse + " and " + getChartNameToUse);
}
- private JFreeChart createChart(String title, DefaultCategoryDataset data)
+ private JFreeChart createChart(String title, DefaultCategoryDataset data, int numOperations)
{
- JFreeChart chart = ChartFactory.createBarChart3D(title, "Cache operation", "Average time (�-seconds)", data, PlotOrientation.VERTICAL, true, false, false);
+ JFreeChart chart = ChartFactory.createBarChart3D(title, "Cache operations performed (approx): " + NumberFormat.getIntegerInstance().format(numOperations), "Average time (" + MU + "-seconds)", data, PlotOrientation.VERTICAL, true, false, false);
BarRenderer3D renderer = (BarRenderer3D) chart.getCategoryPlot().getRenderer();
renderer.setBaseItemLabelsVisible(true);
@@ -86,7 +91,7 @@
String retval;
try
{
- retval = fmt.format(categoryDataset.getValue(product, operation)) + " �s";
+ retval = fmt.format(categoryDataset.getValue(product, operation)) + " " + MU + "s";
}
catch (Exception e)
{
@@ -98,6 +103,7 @@
});
chart.addSubtitle(new TextTitle("Generated on " + new Date() + " by The CacheBenchFwk"));
+
chart.setBorderVisible(true);
chart.setAntiAlias(true);
chart.setTextAntiAlias(true);
@@ -132,6 +138,7 @@
private void readData(File f) throws IOException
{
+ log.debug("Processing file " + f);
String productName = f.getName();
if (productName.startsWith("data_"))
{
@@ -148,25 +155,33 @@
String line = null;
BufferedReader br = new BufferedReader(new FileReader(f));
double avgPut = -1, avgGet = -1;
+ Stats s = null;
- while ((line = br.readLine()) != null && avgPut == -1 && avgGet == -1)
+ while ((line = br.readLine()) != null && s == null)
{
- double[] tmp = getAveragePutAndGet(line);
- avgPut = tmp[0];
- avgGet = tmp[1];
+ s = getAveragePutAndGet(line);
+ log.debug("Read stats " + s);
+ if (s != null)
+ {
+ avgPut = s.avgPut;
+ avgGet = s.avgGet;
+ nGets += s.numGets;
+ nPuts += s.numPuts;
+ }
}
br.close();
putData.addValue(avgPut, productName, "PUT");
getData.addValue(avgGet, productName, "GET");
+ numFilesScanned++;
}
- private double[] getAveragePutAndGet(String line)
+ private Stats getAveragePutAndGet(String line)
{
// To be a valid line, the line should be comma delimited
StringTokenizer strTokenizer = new StringTokenizer(line, ",");
- if (strTokenizer.countTokens() < 7) return new double[]{-1, -1};
+ if (strTokenizer.countTokens() < 7) return null;
// 8th token is avg put
// 9th token is avg get
@@ -175,17 +190,44 @@
String putStr = strTokenizer.nextToken();
String getStr = strTokenizer.nextToken();
- double[] results = new double[2];
+ // 20 and 21st tokens are the num puts and num gets performed.
+
+ for (int i = 0; i < 10; i++) strTokenizer.nextToken();
+
+ String nPutStr = strTokenizer.nextToken();
+ String nGetStr = strTokenizer.nextToken();
+
+ Stats s = new Stats();
try
{
- results[0] = Double.parseDouble(putStr) / 1000;
- results[1] = Double.parseDouble(getStr) / 1000;
- return results;
+ s.avgPut = Double.parseDouble(putStr) / 1000;
+ s.avgGet = Double.parseDouble(getStr) / 1000;
+ s.numPuts = Integer.parseInt(nPutStr);
+ s.numGets = Integer.parseInt(nGetStr);
}
catch (NumberFormatException nfe)
{
- return new double[]{-1, -1};
+// log.error("Unable to parse file properly!", nfe);
+ return null;
}
+ return s;
}
+ private static class Stats
+ {
+ double avgPut, avgGet;
+ int numPuts, numGets;
+
+
+ public String toString()
+ {
+ return "Stats{" +
+ "avgPut=" + avgPut +
+ ", avgGet=" + avgGet +
+ ", numPuts=" + numPuts +
+ ", numGets=" + numGets +
+ '}';
+ }
+ }
+
}
17 years, 9 months
JBoss Cache SVN: r6317 - benchmarks/benchmark-fwk/trunk/conf.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 07:51:15 -0400 (Thu, 17 Jul 2008)
New Revision: 6317
Modified:
benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml
Log:
Updated sample cfg
Modified: benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml 2008-07-17 11:51:11 UTC (rev 6316)
+++ benchmarks/benchmark-fwk/trunk/conf/cachebench-local.xml 2008-07-17 11:51:15 UTC (rev 6317)
@@ -8,7 +8,7 @@
emptyCacheBetweenTests - again, use if you're running out of mem.
numThreads - the number of executor threads to use to perform the required number of operations.
-->
-<cachebench sampleSize="500000" gcBetweenTestsEnabled="true" sleepBetweenTests="1000" emptyCacheBetweenTests="false"
+<cachebench sampleSize="500000" gcBetweenTestsEnabled="true" sleepBetweenTests="1000" emptyCacheBetweenTests="true"
numThreads="25">
@@ -19,18 +19,18 @@
- for each node instance socket address is specified. You can make sure that addresses are available by using
checkClusterAddresses ant target
-->
- <cluster>
- <member host="cluster01" port="17900"/>
- <member host="cluster02" port="17900"/>
- <member host="cluster03" port="17900"/>
- <member host="cluster04" port="17900"/>
- <member host="cluster05" port="17900"/>
- <member host="cluster06" port="17900"/>
- <member host="cluster07" port="17900"/>
- <member host="cluster08" port="17900"/>
- <member host="cluster09" port="17900"/>
- <member host="cluster10" port="17900"/>
- </cluster>
+ <!--<cluster>-->
+ <!--<member host="cluster01" port="17900"/>-->
+ <!--<member host="cluster02" port="17900"/>-->
+ <!--<member host="cluster03" port="17900"/>-->
+ <!--<member host="cluster04" port="17900"/>-->
+ <!--<member host="cluster05" port="17900"/>-->
+ <!--<member host="cluster06" port="17900"/>-->
+ <!--<member host="cluster07" port="17900"/>-->
+ <!--<member host="cluster08" port="17900"/>-->
+ <!--<member host="cluster09" port="17900"/>-->
+ <!--<member host="cluster10" port="17900"/>-->
+ <!--</cluster>-->
<!--
Locagically groups multiple tests.
@@ -44,7 +44,7 @@
If no warmup is needed use org.cachebench.warmup.NoCacheWarmup
-->
<warmup warmupClass="org.cachebench.warmup.PutGetCacheWarmup">
- <param name="operationCount" value="10000"/>
+ <param name="operationCount" value="50000"/>
</warmup>
<!--
@@ -60,7 +60,7 @@
* You can write your own custom testClass.
* weight is currently unused.
-->
- <test name="Strings" testClass="org.cachebench.tests.simpletests.StringTest" weight="2.0">
+ <test name="Strings" testClass="org.cachebench.tests.simpletests.StringTest" weight="2.0" repeat="10">
<param name="writePercentage" value="20"/>
</test>
17 years, 9 months
JBoss Cache SVN: r6316 - in benchmarks/benchmark-fwk/trunk/src/org/cachebench: config and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 07:51:11 -0400 (Thu, 17 Jul 2008)
New Revision: 6316
Modified:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/TestConfig.java
Log:
Updated sample cfg
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java 2008-07-17 11:49:04 UTC (rev 6315)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java 2008-07-17 11:51:11 UTC (rev 6316)
@@ -14,7 +14,9 @@
import org.cachebench.reportgenerators.ReportGenerator;
import org.cachebench.tests.CacheTest;
import org.cachebench.tests.ClusteredCacheTest;
+import org.cachebench.tests.StatisticTest;
import org.cachebench.tests.results.BaseTestResult;
+import org.cachebench.tests.results.StatisticTestResult;
import org.cachebench.tests.results.TestResult;
import org.cachebench.utils.Instantiator;
import org.cachebench.warmup.CacheWarmup;
@@ -35,7 +37,7 @@
{
private Configuration conf;
- private Log logger = LogFactory.getLog(CacheBenchmarkRunner.class);
+ private Log log = LogFactory.getLog(CacheBenchmarkRunner.class);
private Log errorLogger = LogFactory.getLog("CacheException");
// information about how we are called:
@@ -91,16 +93,16 @@
URL confFile = ConfigBuilder.findConfigFile(s);
if (confFile == null)
{
- logger.warn("Unable to locate a configuration file; Application terminated");
+ log.warn("Unable to locate a configuration file; Application terminated");
}
else
{
- if (logger.isDebugEnabled()) logger.debug("Using configuration " + confFile);
- logger.debug("Parsing configuration");
+ if (log.isDebugEnabled()) log.debug("Using configuration " + confFile);
+ log.debug("Parsing configuration");
try
{
conf = ConfigBuilder.parseConfiguration(confFile);
- logger.info("Starting Benchmarking....");
+ log.info("Starting Benchmarking....");
List<TestResult> results = runTests(); // Run the tests from this point.
if (results != null && results.size() != 0)
{
@@ -108,24 +110,38 @@
}
else
{
- logger.warn("No Results to be reported");
+ log.warn("No Results to be reported");
}
- logger.info("Benchmarking Completed. Hope you enjoyed using this! \n");
+ log.info("Benchmarking Completed. Hope you enjoyed using this! \n");
}
catch (Throwable e)
{
- logger.warn("Unable to parse configuration file " + confFile + ". Application terminated", e);
+ log.warn("Unable to parse configuration file " + confFile + ". Application terminated", e);
errorLogger.fatal("Unable to parse configuration file " + confFile, e);
}
}
}
+ CacheWrapper newCache(TestCase test) throws Exception
+ {
+ CacheWrapper cache = getCacheWrapperInstance(test);
+ if (cache != null)
+ {
+ Map<String, String> params = test.getParams();
+ // now add the config file, if any is passed in:
+ params.putAll(systemParams);
+ log.info("Initialising cache with params " + params);
+ cache.init(params);
+ }
+ return cache;
+ }
+
/**
* Executes each test case and returns the result.
*
* @return The Array of TestResult objects with the results of the tests.
*/
- private List<TestResult> runTests()
+ private List<TestResult> runTests() throws Exception
{
List<TestResult> results = new ArrayList<TestResult>();
for (TestCase test : conf.getTestCases())
@@ -133,14 +149,9 @@
CacheWrapper cache = null;
try
{
- cache = getCacheWrapperInstance(test);
+ cache = newCache(test);
if (cache != null)
{
- Map<String, String> params = test.getParams();
- // now add the config file, if any is passed in:
- params.putAll(systemParams);
- logger.info("Initialising cache with params " + params);
- cache.init(params);
if (!localOnly) barrier("BEFORE_WARMUP");
warmupCache(test, cache);
if (!localOnly) barrier("AFTER_WARMUP");
@@ -163,7 +174,7 @@
{
//ignore
}
- logger.warn("Unable to Initialize or Setup the Cache - Not performing any tests", e);
+ log.warn("Unable to Initialize or Setup the Cache - Not performing any tests", e);
errorLogger.error("Unable to Initialize or Setup the Cache: " + test.getCacheWrapper(), e);
errorLogger.error("Skipping this test");
}
@@ -174,23 +185,23 @@
private void barrier(String messageName) throws Exception
{
ClusterBarrier barrier = new ClusterBarrier();
- logger.trace("Using following cluster config: " + conf.getClusterConfig());
+ log.trace("Using following cluster config: " + conf.getClusterConfig());
barrier.setConfig(conf.getClusterConfig());
barrier.setAcknowledge(true);
barrier.barrier(messageName);
- logger.info("Barrier for '" + messageName + "' finished");
+ log.info("Barrier for '" + messageName + "' finished");
}
private void warmupCache(TestCase test, CacheWrapper cache) throws Exception
{
- logger.info("Warming up..");
+ log.info("Warming up..");
CacheWarmupConfig warmupConfig = test.getCacheWarmupConfig();
- logger.trace("Warmup config is: " + warmupConfig);
+ log.trace("Warmup config is: " + warmupConfig);
CacheWarmup warmup = (CacheWarmup) Instantiator.getInstance().createClass(warmupConfig.getWarmupClass());
warmup.setConfigParams(warmupConfig.getParams());
warmup.warmup(cache);
- logger.info("Warmup ended!");
+ log.info("Warmup ended!");
}
/**
@@ -237,7 +248,7 @@
CacheTest testInstance = getCacheTest(testConfig);
if (testInstance instanceof ClusteredCacheTest && localOnly)
{
- logger.warn("Skipping replicated tests since this is in local mode!");
+ log.warn("Skipping replicated tests since this is in local mode!");
continue;
}
@@ -248,7 +259,38 @@
String testCaseName = testCase.getName();
try
{
- result = testInstance.doTest(testName, cache, testCaseName, conf.getSampleSize(), conf.getNumThreads());
+ if (testInstance instanceof StatisticTest)
+ {
+ // create new DescriptiveStatistics and pass it to the test
+ int repeat = testConfig.getRepeat();
+ if (log.isInfoEnabled()) log.info("Running test " + repeat + " times");
+ StatisticTestResult str = new StatisticTestResult();
+ for (int i = 0; i < repeat; i++)
+ {
+ ((StatisticTest) testInstance).doCumulativeTest(testName, cache, testCaseName, conf.getSampleSize(), conf.getNumThreads(), str);
+ if (conf.isEmptyCacheBetweenTests())
+ {
+ if (conf.isLocalOnly())
+ {
+ // destroy and restart the cache
+ shutdownCache(cache);
+ if (i != repeat - 1) cache = newCache(testCase);
+ }
+ else
+ cache.empty();
+ }
+ if (conf.isGcBetweenTestsEnabled())
+ {
+ System.gc();
+ Thread.sleep(conf.getSleepBetweenTests());
+ }
+ }
+ result = str;
+ }
+ else
+ {
+ result = testInstance.doTest(testName, cache, testCaseName, conf.getSampleSize(), conf.getNumThreads());
+ }
}
catch (Exception e)
{
@@ -260,12 +302,12 @@
result.setTestPassed(false);
result.setErrorMsg("Failed to Execute - See logs for details : " + e.getMessage());
- logger.warn("Test case : " + testCaseName + ", Test : " + testName + " - Failed due to", e);
+ log.warn("Test case : " + testCaseName + ", Test : " + testName + " - Failed due to", e);
errorLogger.error("Test case : " + testCaseName + ", Test : " + testName + " - Failed : " + e.getMessage(), e);
}
if (!result.isTestPassed() && testCase.isStopOnFailure())
{
- logger.warn("The test '" + testCase + "/" + testName + "' failed, exiting...");
+ log.warn("The test '" + testCase + "/" + testName + "' failed, exiting...");
System.exit(1);
}
executeTestTasks(cache, result);
@@ -280,7 +322,7 @@
private void generateReports(List<TestResult> results)
{
- logger.info("Generating Reports...");
+ log.info("Generating Reports...");
for (Report report : conf.getReports())
{
ReportGenerator generator;
@@ -298,17 +340,17 @@
generator.setClusterConfig(conf.getClusterConfig());
generator.setOutputFile(report.getOutputFile());
generator.generate();
- logger.info("Report Generation Completed");
+ log.info("Report Generation Completed");
}
else
{
- logger.info("Report not generated - See logs for reasons!!");
+ log.info("Report not generated - See logs for reasons!!");
}
}
catch (Exception e)
{
- logger.warn("Unable to generate Report : " + report.getGenerator() + " - See logs for reasons");
- logger.warn("Skipping this report");
+ log.warn("Unable to generate Report : " + report.getGenerator() + " - See logs for reasons");
+ log.warn("Skipping this report");
errorLogger.error("Unable to generate Report : " + report.getGenerator(), e);
errorLogger.error("Skipping this report");
}
@@ -325,7 +367,7 @@
}
catch (Exception e)
{
- logger.warn("Unable to instantiate CacheWrapper class: " + testCaseClass.getCacheWrapper() + " - Not Running any tests");
+ log.warn("Unable to instantiate CacheWrapper class: " + testCaseClass.getCacheWrapper() + " - Not Running any tests");
errorLogger.error("Unable to instantiate CacheWrapper class: " + testCaseClass.getCacheWrapper(), e);
errorLogger.error("Skipping this test");
}
@@ -342,7 +384,7 @@
}
catch (Exception e)
{
- logger.warn("Unable to instantiate ReportGenerator class: " + reportClass.getGenerator() + " - Not generating the report");
+ log.warn("Unable to instantiate ReportGenerator class: " + reportClass.getGenerator() + " - Not generating the report");
errorLogger.error("Unable to instantiate ReportGenerator class: " + reportClass.getGenerator(), e);
errorLogger.error("Skipping this report");
}
@@ -361,7 +403,7 @@
}
catch (Exception e)
{
- logger.warn("Unable to instantiate CacheTest class: " + testConfig.getTestClass() + " - Not Running any tests");
+ log.warn("Unable to instantiate CacheTest class: " + testConfig.getTestClass() + " - Not Running any tests");
errorLogger.error("Unable to instantiate CacheTest class: " + testConfig.getTestClass(), e);
errorLogger.error("Skipping this Test");
}
@@ -377,7 +419,7 @@
}
catch (Exception e)
{
- logger.warn("Cache Shutdown - Failed.");
+ log.warn("Cache Shutdown - Failed.");
errorLogger.error("Cache Shutdown failed : ", e);
}
}
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/TestConfig.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/TestConfig.java 2008-07-17 11:49:04 UTC (rev 6315)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/config/TestConfig.java 2008-07-17 11:51:11 UTC (rev 6316)
@@ -6,6 +6,7 @@
private String name;
private String testClass;
private float weight;
+ private int repeat = 1;
/**
@@ -55,4 +56,14 @@
{
this.weight = weight;
}
+
+ public int getRepeat()
+ {
+ return repeat;
+ }
+
+ public void setRepeat(int repeat)
+ {
+ this.repeat = repeat;
+ }
}
\ No newline at end of file
17 years, 9 months
JBoss Cache SVN: r6315 - benchmarks/benchmark-fwk/trunk/conf.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 07:49:04 -0400 (Thu, 17 Jul 2008)
New Revision: 6315
Modified:
benchmarks/benchmark-fwk/trunk/conf/cachebench.xml
Log:
Updated sample cfg
Modified: benchmarks/benchmark-fwk/trunk/conf/cachebench.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/conf/cachebench.xml 2008-07-17 11:47:22 UTC (rev 6314)
+++ benchmarks/benchmark-fwk/trunk/conf/cachebench.xml 2008-07-17 11:49:04 UTC (rev 6315)
@@ -51,17 +51,23 @@
validates that replication is enabled and works. If repl does not occur and the stopOnFailure is set to true then exists.
Should be used to make sure that replication is enabled; see javadoc for more details
-->
- <test name="replicationOccurrsTest" testClass="org.cachebench.tests.ReplicationOccursTest">
- <param name="partialReplication" value="true"/>
- </test>
+ <test name="replicationOccurrsTest" testClass="org.cachebench.tests.ReplicationOccursTest">
+ <param name="partialReplication" value="true"/>
+ </test>
<!--
* The "name" attrib is just used for display in the reports.
* You can write your own custom testClass.
* weight is currently unused.
+ * repeat allows you to specify how many times this test is to be run. Average results are used.
-->
- <!--<test name="Strings" testClass="org.cachebench.tests.simpletests.StringTest" weight="2.0" />-->
+ <!--
+ <test name="Strings" testClass="org.cachebench.tests.simpletests.StringTest" weight="2.0" repeat="10">
+ <param name="writePercentage" value="20"/>
+ </test>
+ -->
+
<test name="SessionSimulator" testClass="org.cachebench.tests.SessionSimulatorTest" weight="2.0">
<param name="numberOfRequest" value="100000"/>
<param name="numberOfAttributes" value="100"/>
17 years, 9 months
JBoss Cache SVN: r6314 - in benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests: results and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-07-17 07:47:22 -0400 (Thu, 17 Jul 2008)
New Revision: 6314
Added:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/StatisticTest.java
Modified:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/CacheTest.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/results/StatisticTestResult.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SimpleTest.java
Log:
Added the ability to provide a "repeat" attribute on Statistic-related tests so you can have the test run many times and get an average
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/CacheTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/CacheTest.java 2008-07-17 11:46:40 UTC (rev 6313)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/CacheTest.java 2008-07-17 11:47:22 UTC (rev 6314)
@@ -18,7 +18,7 @@
* Called before {@link #doTest(String, org.cachebench.CacheWrapper, String, int, int)}.
* Implemetations may cache this and further use on doTest method.
*/
- public void setConfiguration(Configuration configuration);
+ void setConfiguration(Configuration configuration);
/**
* Performs the benchmarking on the given tese.
@@ -31,5 +31,5 @@
* @return The result of the test.
* @throws Exception When the cache opertations blow up an error.
*/
- public TestResult doTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads) throws Exception;
+ TestResult doTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads) throws Exception;
}
Added: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/StatisticTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/StatisticTest.java (rev 0)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/StatisticTest.java 2008-07-17 11:47:22 UTC (rev 6314)
@@ -0,0 +1,14 @@
+package org.cachebench.tests;
+
+import org.cachebench.CacheWrapper;
+import org.cachebench.tests.results.StatisticTestResult;
+
+/**
+ * Marker interface
+ *
+ * @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
+ */
+public interface StatisticTest
+{
+ void doCumulativeTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads, StatisticTestResult str) throws Exception;
+}
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/results/StatisticTestResult.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/results/StatisticTestResult.java 2008-07-17 11:46:40 UTC (rev 6313)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/results/StatisticTestResult.java 2008-07-17 11:47:22 UTC (rev 6314)
@@ -10,7 +10,7 @@
*/
public class StatisticTestResult extends BaseTestResult
{
- private DescriptiveStatistics putData, getData;
+ private final DescriptiveStatistics putData = DescriptiveStatistics.newInstance(), getData = DescriptiveStatistics.newInstance();
private int throughputTransactionsPerSecond;
private int throughputBytesPerSecond;
private int numMembers;
@@ -21,22 +21,11 @@
return getData;
}
- public void setGetData(DescriptiveStatistics getData)
- {
- this.getData = getData;
- }
-
public DescriptiveStatistics getPutData()
{
return putData;
}
- public void setPutData(DescriptiveStatistics putData)
- {
- this.putData = putData;
- }
-
-
/**
* This is only measured on put() operations as it has little meaning for get()s.
*/
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-17 11:46:40 UTC (rev 6313)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/simpletests/SimpleTest.java 2008-07-17 11:47:22 UTC (rev 6314)
@@ -8,6 +8,7 @@
import org.cachebench.config.TestCase;
import org.cachebench.config.TestConfig;
import org.cachebench.tests.AbstractCacheTest;
+import org.cachebench.tests.StatisticTest;
import org.cachebench.tests.results.StatisticTestResult;
import java.io.ByteArrayOutputStream;
@@ -26,7 +27,7 @@
* @author Manik Surtani (manik(a)surtani.org)
* (C) Manik Surtani, 2004
*/
-public abstract class SimpleTest extends AbstractCacheTest
+public abstract class SimpleTest extends AbstractCacheTest implements StatisticTest
{
protected Log log = LogFactory.getLog(this.getClass());
protected AtomicLong numberOfBytesPut = new AtomicLong(0);
@@ -35,6 +36,7 @@
private static final int EXECUTOR_SHUTDOWN_TIMEOUT_POLL_SECS = 60;
protected Configuration configuration;
protected final int LOG_FREQUENCY = 5000;
+ private StatisticTestResult results;
private int getWritePercentageFromConfig(String testCaseName, String testName)
{
@@ -51,6 +53,12 @@
}
}
+ public void doCumulativeTest(String testName, CacheWrapper cache, String testCaseName, int sampleSize, int numThreads, StatisticTestResult str) throws Exception
+ {
+ this.results = str;
+ doTest(testName, cache, testCaseName, sampleSize, numThreads);
+ }
+
protected StatisticTestResult performTestWithObjectType(String testCaseName, CacheWrapper cache, Class valueClass, String testName, int sampleSize, int numThreads) throws Exception
{
writePercentage = getWritePercentageFromConfig(testCaseName, testName);
@@ -58,16 +66,14 @@
log.info("Number of threads " + numThreads);
executor = Executors.newFixedThreadPool(numThreads);
- StatisticTestResult result = new StatisticTestResult();
+ StatisticTestResult result = results == null ? new StatisticTestResult() : results;
result.setTestName(testCaseName + getNodeIndex());
result.setTestTime(new Date());
result.setTestType(testName);
log.info("Performing test");
- DescriptiveStatistics[] stats = doGetsAndPuts(cache, valueClass, sampleSize);
+ doGetsAndPuts(cache, valueClass, sampleSize, result.getGetData(), result.getPutData());
- result.setGetData(stats[0]);
- result.setPutData(stats[1]);
result.setTestPassed(true); // The test is passed. The report would make use of this attribute.
// calculate throughput, in transactions per second.
@@ -75,10 +81,10 @@
// calc tps.
- long elapsedSecondsForAllPuts = TimeUnit.NANOSECONDS.toSeconds((long) stats[1].getSum());
+ long elapsedSecondsForAllPuts = TimeUnit.NANOSECONDS.toSeconds((long) result.getPutData().getSum());
System.out.println("*** sum of time: " + elapsedSecondsForAllPuts);
- System.out.println("*** num puts occured: " + stats[1].getN());
+ System.out.println("*** num puts occured: " + result.getPutData().getN());
try
{
@@ -112,12 +118,10 @@
* @param sampleSize The size of the cache.
* @return The Descriptive statistics of the cache benchmarking.
*/
- private DescriptiveStatistics[] doGetsAndPuts(final CacheWrapper cache, final Class valueClass, int sampleSize) throws Exception
+ private void doGetsAndPuts(final CacheWrapper cache, final Class valueClass, int sampleSize, final DescriptiveStatistics getStats, final DescriptiveStatistics putStats) throws Exception
{
log.debug("Inside doGets for : " + cache);
final String key = "baseKey";
- final DescriptiveStatistics getStats = DescriptiveStatistics.newInstance();
- final DescriptiveStatistics putStats = DescriptiveStatistics.newInstance();
Random rand = new Random();
int modDivisor = 100 / writePercentage;
numberOfBytesPut.set(0);
@@ -209,7 +213,6 @@
// return the raw data
log.debug("Leaving doTasks for : " + cache);
- return new DescriptiveStatistics[]{getStats, putStats};
}
private void logOperation(int i, String s)
17 years, 9 months