JBoss Cache SVN: r5800 - benchmarks/benchmark-fwk/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-07 07:18:13 -0400 (Wed, 07 May 2008)
New Revision: 5800
Modified:
benchmarks/benchmark-fwk/trunk/build.xml
Log:
Updated EHCache version
Modified: benchmarks/benchmark-fwk/trunk/build.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/build.xml 2008-05-07 11:16:34 UTC (rev 5799)
+++ benchmarks/benchmark-fwk/trunk/build.xml 2008-05-07 11:18:13 UTC (rev 5800)
@@ -548,7 +548,7 @@
</target>
<target name="all"
- depends="init, clean, compile.module.framework, compile.module.jbosscache140-plugin, compile.module.jbosscache200-plugin, compile.module.jbosscache210-plugin.production, compile.module.jbosscache220-plugin.production, compile.module.terracotta-plugin"
+ depends="init, clean, compile.module.framework, compile.module.ehcache141-plugin.production, compile.module.jbosscache140-plugin, compile.module.jbosscache200-plugin, compile.module.jbosscache210-plugin.production, compile.module.jbosscache220-plugin.production, compile.module.terracotta-plugin"
description="build all"/>
<target name="checkClusterAddresses" depends="compile.module.framework.production"
16 years, 6 months
JBoss Cache SVN: r5799 - benchmarks/benchmark-fwk/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-07 07:16:34 -0400 (Wed, 07 May 2008)
New Revision: 5799
Modified:
benchmarks/benchmark-fwk/trunk/build.xml
Log:
Updated EHCache version
Modified: benchmarks/benchmark-fwk/trunk/build.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/build.xml 2008-05-07 11:15:07 UTC (rev 5798)
+++ benchmarks/benchmark-fwk/trunk/build.xml 2008-05-07 11:16:34 UTC (rev 5799)
@@ -147,72 +147,72 @@
description="compile module Framework; test classes" unless="skip.tests"/>
- <!-- Module ehcache-1.2.4 -->
+ <!-- Module ehcache-1.4.1 -->
- <dirname property="module.ehcache124-plugin.basedir" file="${ant.file}"/>
+ <dirname property="module.ehcache141-plugin.basedir" file="${ant.file}"/>
- <property name="compiler.args.ehcache124-plugin" value="${compiler.args}"/>
+ <property name="compiler.args.ehcache141-plugin" value="${compiler.args}"/>
- <property name="ehcache124-plugin.output.dir"
- value="${module.ehcache124-plugin.basedir}/classes/production/ehcache-1.2.4"/>
- <property name="ehcache124-plugin.testoutput.dir"
- value="${module.ehcache124-plugin.basedir}/classes/test/ehcache-1.2.4"/>
+ <property name="ehcache141-plugin.output.dir"
+ value="${module.ehcache141-plugin.basedir}/classes/production/ehcache-1.4.1"/>
+ <property name="ehcache141-plugin.testoutput.dir"
+ value="${module.ehcache141-plugin.basedir}/classes/test/ehcache-1.4.1"/>
- <path id="ehcache124-plugin.module.bootclasspath">
+ <path id="ehcache141-plugin.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
- <path id="ehcache124-plugin.module.classpath">
- <fileset dir="${module.ehcache124-plugin.basedir}/cache-products/ehcache-1.2.4/lib" includes="*.jar"/>
- <pathelement location="${module.ehcache124-plugin.basedir}/cache-products/ehcache-1.2.4/conf"/>
+ <path id="ehcache141-plugin.module.classpath">
+ <fileset dir="${module.ehcache141-plugin.basedir}/cache-products/ehcache-1.4.1/lib" includes="*.jar"/>
+ <pathelement location="${module.ehcache141-plugin.basedir}/cache-products/ehcache-1.4.1/conf"/>
<pathelement location="${framework.output.dir}"/>
<pathelement location="${framework.testoutput.dir}"/>
- <pathelement location="${ehcache124-plugin.output.dir}"/>
+ <pathelement location="${ehcache141-plugin.output.dir}"/>
</path>
- <patternset id="excluded.from.module.ehcache124-plugin">
+ <patternset id="excluded.from.module.ehcache141-plugin">
<patternset refid="ignored.files"/>
</patternset>
- <patternset id="excluded.from.compilation.ehcache124-plugin">
- <patternset refid="excluded.from.module.ehcache124-plugin"/>
+ <patternset id="excluded.from.compilation.ehcache141-plugin">
+ <patternset refid="excluded.from.module.ehcache141-plugin"/>
</patternset>
- <path id="ehcache124-plugin.module.sourcepath">
- <dirset dir="${module.ehcache124-plugin.basedir}/cache-products/ehcache-1.2.4">
+ <path id="ehcache141-plugin.module.sourcepath">
+ <dirset dir="${module.ehcache141-plugin.basedir}/cache-products/ehcache-1.4.1">
<include name="src"/>
</dirset>
</path>
- <target name="compile.module.ehcache124-plugin"
- depends="compile.module.ehcache124-plugin.production,compile.module.ehcache124-plugin.tests"
- description="Compile module ehcache-1.2.4"/>
+ <target name="compile.module.ehcache141-plugin"
+ depends="compile.module.ehcache141-plugin.production,compile.module.ehcache141-plugin.tests"
+ description="Compile module ehcache-1.4.1"/>
- <target name="compile.module.ehcache124-plugin.production" depends="compile.module.framework"
- description="Compile module ehcache-1.2.4; production classes">
- <mkdir dir="${ehcache124-plugin.output.dir}"/>
- <javac destdir="${ehcache124-plugin.output.dir}" debug="${compiler.debug}"
+ <target name="compile.module.ehcache141-plugin.production" depends="compile.module.framework"
+ description="Compile module ehcache-1.4.1; production classes">
+ <mkdir dir="${ehcache141-plugin.output.dir}"/>
+ <javac destdir="${ehcache141-plugin.output.dir}" debug="${compiler.debug}"
nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
- <compilerarg line="${compiler.args.ehcache124-plugin}"/>
- <bootclasspath refid="ehcache124-plugin.module.bootclasspath"/>
- <classpath refid="ehcache124-plugin.module.classpath"/>
- <src refid="ehcache124-plugin.module.sourcepath"/>
- <patternset refid="excluded.from.compilation.ehcache124-plugin"/>
+ <compilerarg line="${compiler.args.ehcache141-plugin}"/>
+ <bootclasspath refid="ehcache141-plugin.module.bootclasspath"/>
+ <classpath refid="ehcache141-plugin.module.classpath"/>
+ <src refid="ehcache141-plugin.module.sourcepath"/>
+ <patternset refid="excluded.from.compilation.ehcache141-plugin"/>
</javac>
- <copy todir="${ehcache124-plugin.output.dir}">
- <fileset dir="${module.ehcache124-plugin.basedir}/cache-products/ehcache-1.2.4/src">
+ <copy todir="${ehcache141-plugin.output.dir}">
+ <fileset dir="${module.ehcache141-plugin.basedir}/cache-products/ehcache-1.4.1/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
- <target name="compile.module.ehcache124-plugin.tests" depends="compile.module.ehcache124-plugin.production"
- description="compile module ehcache-1.2.4; test classes" unless="skip.tests"/>
+ <target name="compile.module.ehcache141-plugin.tests" depends="compile.module.ehcache141-plugin.production"
+ description="compile module ehcache-1.4.1; test classes" unless="skip.tests"/>
<!-- Module coherence-3.2.2 -->
@@ -249,7 +249,7 @@
</patternset>
<path id="coherence322-plugin.module.sourcepath">
- <dirset dir="${module.ehcache124-plugin.basedir}/cache-products/coherence-3.2.2">
+ <dirset dir="${module.ehcache141-plugin.basedir}/cache-products/coherence-3.2.2">
<include name="src"/>
</dirset>
</path>
@@ -464,7 +464,7 @@
<pathelement location="${framework.testoutput.dir}"/>
<pathelement location="${jbosscache210-plugin.output.dir}"/>
</path>
-
+
<path id="jbosscache220-plugin.module.classpath">
<fileset dir="${module.jbosscache220-plugin.basedir}/cache-products/jbosscache-2.2.0/lib" includes="*.jar"/>
<pathelement location="${module.framework.basedir}/lib/commons-logging.jar"/>
16 years, 6 months
JBoss Cache SVN: r5798 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/lib.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-07 07:15:07 -0400 (Wed, 07 May 2008)
New Revision: 5798
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/lib/jbosscache-core.jar
Log:
2.1.1.GA
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/lib/jbosscache-core.jar
===================================================================
(Binary files differ)
16 years, 6 months
JBoss Cache SVN: r5797 - in benchmarks/benchmark-fwk/trunk/cache-products: jbosscache-2.1.0/lib and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-07 07:12:55 -0400 (Wed, 07 May 2008)
New Revision: 5797
Added:
benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/config.sh
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/lib/jbosscache-core.jar
Log:
Added: benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/config.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/config.sh (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/config.sh 2008-05-07 11:12:55 UTC (rev 5797)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+#see "$CACHE_ROOT/cache-products/cache.sh" for details
+
+THIS_DIR="./cache-products/ehcache-1.4.1"
+
+#setting up classpath
+for JAR in $THIS_DIR/lib/*
+do
+ CLASSPATH=$CLASSPATH:$JAR
+done
+
+CLASSPATH="$CLASSPATH:./classes/production/ehcache-1.4.1"
+CLASSPATH="$CLASSPATH:$THIS_DIR/conf"
+#--classpath was set
+
+#additional JVM options
+JVM_OPTIONS="$JVM_OPTIONS -Xmx1024m -Djava.net.preferIPv4Stack=true" JVM_OPTIONS="$JVM_OPTIONS -DcacheBenchFwk.cacheWrapperClassName=org.cachebench.cachewrappers.EHCacheWrapper"
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/lib/jbosscache-core.jar
===================================================================
(Binary files differ)
16 years, 6 months
JBoss Cache SVN: r5796 - in benchmarks/benchmark-fwk/trunk/cache-products: ehcache-1.4.1/lib and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-07 07:03:47 -0400 (Wed, 07 May 2008)
New Revision: 5796
Added:
benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/
Removed:
benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.2.4/
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/lib/ehcache.jar
Log:
Updated EHCache
Copied: benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1 (from rev 5793, benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.2.4)
Modified: benchmarks/benchmark-fwk/trunk/cache-products/ehcache-1.4.1/lib/ehcache.jar
===================================================================
(Binary files differ)
16 years, 6 months
JBoss Cache SVN: r5795 - core/trunk/src/main/java/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-06 03:23:44 -0400 (Tue, 06 May 2008)
New Revision: 5795
Modified:
core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java
Log:
Fixed shutdown hook calling the proper stop() method
Modified: core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java 2008-05-02 12:54:47 UTC (rev 5794)
+++ core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java 2008-05-06 07:23:44 UTC (rev 5795)
@@ -272,7 +272,7 @@
try
{
invokedFromShutdownHook = true;
- stop();
+ LifecycleManager.this.stop();
}
finally
{
16 years, 6 months
JBoss Cache SVN: r5794 - in benchmarks/benchmark-fwk/trunk: src/org/cachebench/reportgenerators and 6 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-05-02 08:54:47 -0400 (Fri, 02 May 2008)
New Revision: 5794
Added:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ConfigurationData.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportCentralizer.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportData.java
benchmarks/benchmark-fwk/trunk/tests/
benchmarks/benchmark-fwk/trunk/tests/org/
benchmarks/benchmark-fwk/trunk/tests/org/cachebench/
benchmarks/benchmark-fwk/trunk/tests/org/cachebench/reportgenerators/
benchmarks/benchmark-fwk/trunk/tests/org/cachebench/reportgenerators/reportcentralizer/
benchmarks/benchmark-fwk/trunk/tests/org/cachebench/reportgenerators/reportcentralizer/ReportDataTest.java
Modified:
benchmarks/benchmark-fwk/trunk/bindAddress.sh
benchmarks/benchmark-fwk/trunk/runNode.sh
Log:
added some additional report processing stuff
Modified: benchmarks/benchmark-fwk/trunk/bindAddress.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/bindAddress.sh 2008-05-02 10:36:40 UTC (rev 5793)
+++ benchmarks/benchmark-fwk/trunk/bindAddress.sh 2008-05-02 12:54:47 UTC (rev 5794)
@@ -1,5 +1,5 @@
#!/bin/sh
### Set your bind address for the tests to use. Could be an IP, host name or a reference to an environment variable.
-BIND_ADDRESS=${MYTESTIP_2}
+BIND_ADDRESS=127.0.0.1
Modified: benchmarks/benchmark-fwk/trunk/runNode.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/runNode.sh 2008-05-02 10:36:40 UTC (rev 5793)
+++ benchmarks/benchmark-fwk/trunk/runNode.sh 2008-05-02 12:54:47 UTC (rev 5794)
@@ -4,26 +4,13 @@
# those would make an automatic conversion from unix CLASSPATH to win classpath, needed when executing java -cp
preferIPv4Stack=true
-DEBUG=true
+DEBUG=debug
CURRENT_INDEX=${1}
CACHE_PRODUCT=${2}
TEST_CFG=${3}
CLUSTER_SIZE=${4}
-hostname=`hostname -s`
+hostname=`hostname`
PIDFILE=PID.${hostname}.pid
-if [ -e ${PIDFILE} ]
-then
- # first test if the process is still running. If not, clean up the PID file.
- pid=`cat ${PIDFILE}`
- if ps -C ${pid} > /dev/null
- then
- echo "A stale process already exists on this host! Run killNode.sh to kill it first."
- exit 3
- else
- ## This is a stale PID file. No such process is running.
- rm ${PIDFILE}
- fi
-fi
if [ -z $1 ]
then
@@ -60,8 +47,9 @@
fi
. ./bindAddress.sh
+echo bind address exit code is $?
-JVM_OPTIONS="${JVM_OPTIONS} -DcacheBenchFwk.cachePrioductName=${CACHE_PRODUCT} -Dbind.address=${BIND_ADDRESS} -DcacheBenchFwk.cacheConfigFile=${TEST_CFG} -DcurrentIndex=${CURRENT_INDEX} -DclusterSize=${CLUSTER_SIZE} -DcurrentIndex=${CURRENT_INDEX} -Djava.net.preferIPv4Stack=${preferIPv4Stack}"
+JVM_OPTIONS="${JVM_OPTIONS} -DcacheBenchFwk.cachePrioductName=${CACHE_PRODUCT} -Dbind.address=${BIND_ADDRESS} -DcacheBenchFwk.cacheConfigFile=${TEST_CFG} -DcurrentIndex=${CURRENT_INDEX} -DclusterSize=${CLUSTER_SIZE} -Djava.net.preferIPv4Stack=${preferIPv4Stack}"
TO_EXECUTE="java $JVM_OPTIONS -cp $CLASSPATH org.cachebench.CacheBenchmarkRunner"
if [ "$DEBUG" = "debug" ]
@@ -71,7 +59,7 @@
echo
fi
-${TO_EXECUTE} > STDIO_ERR.${hostname}.txt 2>&1 &
+${TO_EXECUTE}
echo $!>${PIDFILE}
echo "Return code from benchmark runner is $?"
Added: benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ConfigurationData.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ConfigurationData.java (rev 0)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ConfigurationData.java 2008-05-02 12:54:47 UTC (rev 5794)
@@ -0,0 +1,53 @@
+package org.cachebench.reportgenerators.reportcentralizer;
+
+import java.util.*;
+
+/**
+ * Gathers the report data from all distributions that corespond to the same benchmark.
+ *
+ * @author Mircea.Markus(a)jboss.com
+ */
+public class ConfigurationData {
+
+ private String configurationName;
+ private Set<String> distributions = new HashSet<String>();
+ private Map<String, List<ReportData>> distriution2ReportDataMap = new HashMap<String, List<ReportData>>();
+
+ public ConfigurationData(String configurationName) {
+ this.configurationName = configurationName;
+ }
+
+ public void addIfNeeded(ReportData reportData) {
+ if (reportData.getConfiguration().equals(configurationName)) {
+ String distribution = reportData.getDistribution();
+ distributions.add(distribution);
+ List<ReportData> dataList = distriution2ReportDataMap.get(distribution);
+ if (dataList == null) {
+ dataList = new ArrayList<ReportData>();
+ distriution2ReportDataMap.put(distribution, dataList);
+ }
+ dataList.add(reportData);
+ }
+ }
+
+ public Map<String, List<ReportData>> getDistriution2ReportDataMap() {
+ for (List<ReportData> datas : distriution2ReportDataMap.values()) {
+ Collections.sort(datas);
+ }
+ return distriution2ReportDataMap;
+ }
+
+ public String getConfigurationName() {
+ return configurationName;
+ }
+
+ public int[] getClusterSizes() {
+ String aDistribution = distributions.iterator().next();
+ List<ReportData> reportDatas = getDistriution2ReportDataMap().get(aDistribution);
+ int[] result = new int[reportDatas.size()];
+ for (int i = 0; i < reportDatas.size(); i++) {
+ result[i] = reportDatas.get(i).getClusterSize();
+ }
+ return result;
+ }
+}
Added: benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportCentralizer.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportCentralizer.java (rev 0)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportCentralizer.java 2008-05-02 12:54:47 UTC (rev 5794)
@@ -0,0 +1,113 @@
+package org.cachebench.reportgenerators.reportcentralizer;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * @author Mircea.Markus(a)jboss.com
+ */
+public class ReportCentralizer {
+
+ public static final String SEPARATOR = ", ";
+
+ private String sourceReportDirectory;
+
+ private String destinationReportDirectory;
+
+
+ public ReportCentralizer(String reportsSourceDir, String reportsDestDir) throws Exception {
+ this.sourceReportDirectory = reportsSourceDir;
+ this.destinationReportDirectory = reportsDestDir;
+ process();
+ }
+
+ private void process() throws Exception {
+ File[] files = getReportFiles();
+ List<ReportData> reportDatas = parseFiles(files);
+ List<ConfigurationData> configurationDatas = buildBenchmarkData(reportDatas);
+ updateConfigurationDatas(reportDatas, configurationDatas);
+ generateReports(configurationDatas);
+ }
+
+ private void generateReports(List<ConfigurationData> configurationDatas) throws IOException {
+ File destDir = new File(destinationReportDirectory);
+ if (!destDir.exists()) {
+ destDir.mkdir();
+ }
+ for (ConfigurationData configData : configurationDatas) {
+ File reportFile = new File(destDir, configData.getConfigurationName() + ".csv");
+ reportFile.createNewFile();
+ PrintStream printStream = new PrintStream(reportFile);
+ writeHeader(printStream, configData.getClusterSizes());
+ Map<String,List<ReportData>> map = configData.getDistriution2ReportDataMap();
+ for (Map.Entry<String,List<ReportData>> entry : map.entrySet())
+ {
+ printProduct(printStream, entry);
+ }
+ printStream.flush();
+ printStream.close();
+ }
+ }
+
+ private void printProduct(PrintStream printStream, Map.Entry<String, List<ReportData>> entry) {
+ printStream.print(entry.getKey());
+ for (ReportData reportData: entry.getValue())
+ {
+ printStream.print(SEPARATOR + reportData.getAvgReqPerSec());
+ }
+ printStream.println();
+ }
+
+ private void writeHeader(PrintStream printStream, int[] clusterSizes) {
+ printStream.print("Cluster Size");
+ for (int i = 0; i < clusterSizes.length; i++) {
+ printStream.print(SEPARATOR + i);
+ }
+ printStream.println();
+ }
+
+ private void updateConfigurationDatas(List<ReportData> reportDatas, List<ConfigurationData> configurationDatas) {
+ for (ReportData data : reportDatas) {
+ for (ConfigurationData configurationData : configurationDatas) {
+ configurationData.addIfNeeded(data);
+ }
+ }
+ }
+
+ private List<ConfigurationData> buildBenchmarkData(List<ReportData> reportDatas) {
+ Set<String> alreadyProcessed = new HashSet<String>();
+ List<ConfigurationData> result = new ArrayList<ConfigurationData>();
+ for (ReportData reportData : reportDatas) {
+ if (!alreadyProcessed.contains(reportData.getConfiguration())) {
+ alreadyProcessed.add(reportData.getConfiguration());
+ result.add(new ConfigurationData(reportData.getConfiguration()));
+ }
+ }
+ return result;
+ }
+
+ private ArrayList<ReportData> parseFiles(File[] files) throws Exception {
+ ArrayList<ReportData> reportDatas = new ArrayList<ReportData>();
+ for (File file : files) {
+ reportDatas.add(new ReportData(file));
+ }
+ return reportDatas;
+ }
+
+ private File[] getReportFiles() {
+ File file = new File(sourceReportDirectory);
+ if (!file.exists() || !file.isDirectory())
+ throw new IllegalArgumentException("Report directory " + sourceReportDirectory + " does not exist or is not a directory!");
+ return file.listFiles(new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.toUpperCase().endsWith(".CSV");
+ }
+ });
+ }
+
+ public static void main(String[] args) throws Exception {
+ String sourceDir = "c:\\temp\\centralizer\\in_real2";
+ String destDir = "c:\\temp\\centralizer\\in_real2\\centralized";
+ new ReportCentralizer(sourceDir, destDir);
+ }
+}
Added: benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportData.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportData.java (rev 0)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/reportcentralizer/ReportData.java 2008-05-02 12:54:47 UTC (rev 5794)
@@ -0,0 +1,110 @@
+package org.cachebench.reportgenerators.reportcentralizer;
+
+import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.util.StringTokenizer;
+
+/**
+ * @author Mircea.Markus(a)jboss.com
+ * @since 2.2
+ */
+public class ReportData implements Comparable {
+
+ /**
+ * e.g. jbosscache-2.1.0
+ */
+ private String distribution;
+
+ /**
+ * e.g. pess-repl-async
+ */
+ private String configuration;
+ private int clusterSize;
+
+ private long avgReqPerSec;
+
+ public ReportData() {
+ }
+
+ public ReportData(File reportFile) throws Exception {
+ readData(reportFile);
+ }
+
+ private void readData(File f) throws IOException {
+ processFileName(f.getName());
+ // chop up the file name to get productAndConfiguration and clusterSize.
+ // file name is in the format data_<cache-product>_<cache-cfg.xml>_<cluster-size>.csv
+
+ // now read the data.
+ String line = null;
+ BufferedReader br = new BufferedReader(new FileReader(f));
+ int goodlinesCount = 0;
+ while ((line = br.readLine()) != null) {
+ double throughput = getThroughput(line);
+ if (throughput != -1) {
+ avgReqPerSec += throughput;
+ goodlinesCount++;
+ }
+ }
+ if (goodlinesCount < clusterSize)
+ {
+ throw new IllegalStateException("Number of line is not good for file: " + f.getName());
+ }
+ avgReqPerSec = avgReqPerSec / clusterSize;
+ }
+
+ private double getThroughput(String line) {
+ // To be a valid line, the line should be comma delimited
+ StringTokenizer strTokenizer = new StringTokenizer(line, ",");
+ if (strTokenizer.countTokens() < 2) return -1;
+
+ // we want the 3rd element which is throughput
+ strTokenizer.nextToken();
+ strTokenizer.nextToken();
+ String candidate = strTokenizer.nextToken();
+ try {
+ return Double.parseDouble(candidate);
+ }
+ catch (NumberFormatException nfe) {
+ return -1;
+ }
+ }
+
+
+ public String getDistribution() {
+ return distribution;
+ }
+
+ public String getConfiguration() {
+ return configuration;
+ }
+
+ public int getClusterSize() {
+ return clusterSize;
+ }
+
+ public long getAvgReqPerSec() {
+ return avgReqPerSec;
+ }
+
+ /* e.g. data_jbosscache-2.1.0_pess-repl-async.xml_2.csv */
+ public void processFileName(String name) {
+ StringTokenizer strtok = new StringTokenizer(name, "_");
+ strtok.nextToken(); // this is the "data-" bit
+ distribution = strtok.nextToken(); /* jbosscache-2.1.0 */
+ configuration = strtok.nextToken() /* pess-repl-async.xml */;
+ // cluster size
+ String cS = strtok.nextToken();
+ if (cS.toUpperCase().endsWith(".CSV")) cS = cS.substring(0, cS.length() - 4);
+ clusterSize = Integer.parseInt(cS);
+ }
+
+ public int compareTo(Object o) {
+ ReportData other = (ReportData) o;
+ return this.clusterSize - other.getClusterSize();
+ }
+}
Added: benchmarks/benchmark-fwk/trunk/tests/org/cachebench/reportgenerators/reportcentralizer/ReportDataTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/tests/org/cachebench/reportgenerators/reportcentralizer/ReportDataTest.java (rev 0)
+++ benchmarks/benchmark-fwk/trunk/tests/org/cachebench/reportgenerators/reportcentralizer/ReportDataTest.java 2008-05-02 12:54:47 UTC (rev 5794)
@@ -0,0 +1,26 @@
+package org.cachebench.reportgenerators.reportcentralizer;
+
+import org.testng.annotations.Test;
+
+/**
+ * @author Mircea.Markus(a)jboss.com
+ */
+@Test
+public class ReportDataTest {
+
+ /*
+ data_jbosscache-2.1.0_pess-repl-async.xml_2.csv
+ */
+ public void testParseFileName()
+ {
+ String filename = "data_jbosscache-2.1.0_pess-repl-async.xml_2.csv";
+ ReportData reportData = new ReportData();
+ reportData.processFileName(filename);
+ assert reportData.getClusterSize() == 2;
+ assert reportData.getConfiguration().equals("pess-repl-async.xml");
+ assert reportData.getDistribution().equals("jbosscache-2.1.0");
+ filename = "data_jbosscache-2.1.0_pess-repl-async.xml_22.csv";
+ reportData.processFileName(filename);
+ assert reportData.getClusterSize() == 22;
+ }
+}
16 years, 6 months
JBoss Cache SVN: r5793 - benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-02 06:36:40 -0400 (Fri, 02 May 2008)
New Revision: 5793
Modified:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/ChartGenerator.java
Log:
Added ability to specify output file name prefix
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/ChartGenerator.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/ChartGenerator.java 2008-05-01 17:10:29 UTC (rev 5792)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/reportgenerators/ChartGenerator.java 2008-05-02 10:36:40 UTC (rev 5793)
@@ -40,13 +40,14 @@
static String reportDirectory;
static boolean singleChart = true;
DefaultCategoryDataset averageThroughput, totalThroughput;
+ static String fnPrefix = null;
static String chartNameAverage = "chart-averageThroughput.png", chartNameTotal = "chart-totalThroughput.png";
private static void help()
{
System.out.println("Usage:");
- System.out.println(" ChartGenerator [-reportDir <directory containing CSV files>] [-singleChart <true | false> if true, generates a single chart for all config files.]");
+ System.out.println(" ChartGenerator [-reportDir <directory containing CSV files>] [-o <outputFileNamePrefix>] [-singleChart <true | false> if true, generates a single chart for all config files.]");
}
public static void main(String[] args) throws IOException
@@ -68,6 +69,12 @@
continue;
}
+ if (args[i].equals("-o"))
+ {
+ fnPrefix = args[++i];
+ continue;
+ }
+
help();
return;
}
@@ -79,31 +86,34 @@
}
if (!singleChart) throw new RuntimeException("Multiple charts not yet implemented");
new ChartGenerator().generateChart();
-
- System.out.println("Finished in " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds! Charts saved as " + chartNameAverage + " and " + chartNameTotal);
+ System.out.println("Finished in " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds!");
}
private void generateChart() throws IOException
{
readData();
- File chartFile = new File(chartNameAverage);
+ String chartAvgFileName = fnPrefix == null ? chartNameAverage : fnPrefix + "-" + chartNameAverage;
+ File chartFile = new File(chartAvgFileName);
if (chartFile.exists())
{
- chartFile.renameTo(new File(chartNameAverage + "." + System.currentTimeMillis()));
- chartFile = new File(chartNameAverage);
+ chartFile.renameTo(new File(chartAvgFileName + "." + System.currentTimeMillis()));
+ chartFile = new File(chartAvgFileName);
}
ChartUtilities.saveChartAsPNG(chartFile, createChart(averageThroughput, "Report: Average throughput per cache instance", "Throughput per cache instance (reqs/sec)"), 1024, 768);
- chartFile = new File(chartNameTotal);
+ String chartTotalFileName = fnPrefix == null ? chartNameTotal : fnPrefix + "-" + chartNameTotal;
+ chartFile = new File(chartTotalFileName);
if (chartFile.exists())
{
- chartFile.renameTo(new File(chartNameTotal + "." + System.currentTimeMillis()));
- chartFile = new File(chartNameTotal);
+ chartFile.renameTo(new File(chartTotalFileName + "." + System.currentTimeMillis()));
+ chartFile = new File(chartTotalFileName);
}
ChartUtilities.saveChartAsPNG(chartFile, createChart(totalThroughput, "Report: Total throughput for cluster", "Overall throughput (reqs/sec)"), 1024, 768);
+
+ System.out.println("Charts saved as " + chartAvgFileName + " and " + chartTotalFileName);
}
private JFreeChart createChart(CategoryDataset data, String title, String yLabel)
16 years, 6 months
JBoss Cache SVN: r5792 - in core/tags/2.2.0.BETA1: src/main/java/org/jboss/cache and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-01 13:10:29 -0400 (Thu, 01 May 2008)
New Revision: 5792
Modified:
core/tags/2.2.0.BETA1/pom.xml
core/tags/2.2.0.BETA1/src/main/java/org/jboss/cache/Version.java
Log:
Beta1 release details
Modified: core/tags/2.2.0.BETA1/pom.xml
===================================================================
--- core/tags/2.2.0.BETA1/pom.xml 2008-05-01 16:58:17 UTC (rev 5791)
+++ core/tags/2.2.0.BETA1/pom.xml 2008-05-01 17:10:29 UTC (rev 5792)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
- <jbosscache-core-version>2.2.0-SNAPSHOT</jbosscache-core-version>
+ <jbosscache-core-version>2.2.0.BETA1</jbosscache-core-version>
</properties>
<parent>
<groupId>org.jboss.cache</groupId>
@@ -344,7 +344,7 @@
<activeByDefault>false</activeByDefault>
</activation>
<properties>
- <jbosscache-core-version>2.2.0-SNAPSHOT-JBossAS</jbosscache-core-version>
+ <jbosscache-core-version>2.2.0.BETA1-JBossAS</jbosscache-core-version>
</properties>
<dependencies>
<dependency>
Modified: core/tags/2.2.0.BETA1/src/main/java/org/jboss/cache/Version.java
===================================================================
--- core/tags/2.2.0.BETA1/src/main/java/org/jboss/cache/Version.java 2008-05-01 16:58:17 UTC (rev 5791)
+++ core/tags/2.2.0.BETA1/src/main/java/org/jboss/cache/Version.java 2008-05-01 17:10:29 UTC (rev 5792)
@@ -11,10 +11,10 @@
@Immutable
public class Version
{
- public static final String version = "2.2.0-SNAPSHOT";
+ public static final String version = "2.2.0.BETA1";
public static final String codename = "Poblano";
//public static final String cvs = "$Id: Version.java 4592 2007-10-10 16:44:36Z manik.surtani(a)jboss.com $";
- static final byte[] version_id = {'0', '2', '2', '0', 'S'};
+ static final byte[] version_id = {'0', '2', '2', '0', 'B', '1'};
private static final int MAJOR_SHIFT = 11;
private static final int MINOR_SHIFT = 6;
16 years, 6 months
JBoss Cache SVN: r5791 - core/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-01 12:58:17 -0400 (Thu, 01 May 2008)
New Revision: 5791
Added:
core/tags/2.2.0.BETA1/
Log:
Tagged
Copied: core/tags/2.2.0.BETA1 (from rev 5790, core/trunk)
16 years, 6 months