Author: manik.surtani(a)jboss.com
Date: 2008-10-23 18:22:05 -0400 (Thu, 23 Oct 2008)
New Revision: 7010
Modified:
benchmarks/benchmark-fwk/trunk/compareJBC2and3.sh
Log:
Modified: benchmarks/benchmark-fwk/trunk/compareJBC2and3.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/compareJBC2and3.sh 2008-10-23 16:59:14 UTC (rev 7009)
+++ benchmarks/benchmark-fwk/trunk/compareJBC2and3.sh 2008-10-23 22:22:05 UTC (rev 7010)
@@ -1,100 +1,88 @@
#!/bin/bash
-scaling="2 4 6 8"
+runOnCluster()
+{
+ config="$1"
+ scaling="2 4 6 8"
+ for size in $scaling
+ do
+ nohup ./cluster.sh start $product $config $size
+ outputFileName=data_${product}_${config}_${size}.csv
+ while [ ! -e $outputFileName ]
+ do
+ echo "Waiting for report [ $outputFileName ]"
+ sleep 10
+ done
+ sleep 30
+ mv $outputFileName output/
+ done
+}
+doLoop()
+{
+ echo Product is $product and cfg set is $configs
+ for config in $configs
+ do
+ echo running set for $product using $config
+ runOnCluster $config
+ done
+}
+jbc300()
+{
+ #### JBoss Cache 3.0.0
+ product="jbosscache-3.0.0"
+ configs="mvcc-repl-sync.xml mvcc-repl-sync-br.xml mvcc-repl-async.xml"
+ doLoop $product
+}
-configs="pess-repl-sync.xml pess-repl-sync-br.xml pess-repl-async.xml
mvcc-repl-sync.xml mvcc-repl-sync-br.xml mvcc-repl-async.xml"
-#configs="distributed replicated"
+jbc220()
+{
+ #### JBoss Cache 2.2.0
+ product="jbosscache-2.2.0"
+ configs="pess-repl-sync.xml pess-repl-sync-br.xml pess-repl-async.xml"
+ doLoop $product
+}
+ehcache()
+{
+ #### EHCache
+ product="ehcache-1.5.0"
+ configs="ehcache-repl-sync.xml ehcache-repl-async.xml"
+ doLoop $product
+}
-mkdir output
+coherence()
+{
+ #### Coherence
+ product="coherence-3.3.1"
+ configs="repl-cache.xml dist-cache.xml"
+ doLoop $product
+}
-#### JBoss Cache 3.0.0
-product="jbosscache-3.0.0"
-configs="mvcc-repl-sync.xml mvcc-repl-sync-br.xml mvcc-repl-async.xml"
+startTime=`date +%s`
+configs="" # This is global and accessible by all functions.
-for config in $configs
-do
- for size in $scaling
- do
- nohup ./cluster.sh start $product $config $size
+if [ -e "output" ]
+then
+ mv output output`date +%s`.old
+fi
+mkdir output
- outputFileName=data_${product}_${config}_${size}.csv
- while [ ! -e $outputFileName ]
- do
- echo "Waiting for report [ $outputFileName ]"
- sleep 5
- done
- sleep 60
- mv $outputFileName output/
- done
-done
+# jbc300
+# jbc220
+# ehcache
+coherence
+echo Generating charts ...
-#### JBoss Cache 2.2.0
-product="jbosscache-2.2.0"
-configs="pess-repl-sync.xml pess-repl-sync-br.xml pess-repl-async.xml"
+./generateChart.sh -reportDir output
-for config in $configs
-do
- for size in $scaling
- do
- nohup ./cluster.sh start $product $config $size
+endTime=`date +%s`
+minsTaken=`echo "scale=4;($endTime - $startTime)/60" | bc`
- outputFileName=data_${product}_${config}_${size}.csv
- while [ ! -e $outputFileName ]
- do
- echo "Waiting for report [ $outputFileName ]"
- sleep 5
- done
- sleep 60
- mv $outputFileName output/
- done
-done
+echo -----
+echo -----
+echo Took $minsTaken minutes to run!
+echo -----
+echo -----
-#### EHCache
-product="ehcache-1.5.0"
-configs="ehcache-repl-sync.xml ehcache-repl-async.xml"
-
-for config in $configs
-do
- for size in $scaling
- do
- nohup ./cluster.sh start $product $config $size
-
- outputFileName=data_${product}_${config}_${size}.csv
- while [ ! -e $outputFileName ]
- do
- echo "Waiting for report [ $outputFileName ]"
- sleep 5
- done
- sleep 60
- mv $outputFileName output/
- done
-done
-
-#### Coherence
-product="coherence-3.3.1"
-configs="repl-cache.xml dist-cache.xml"
-
-for config in $configs
-do
- for size in $scaling
- do
- nohup ./cluster.sh start $product $config $size
-
- outputFileName=data_${product}_${config}_${size}.csv
- while [ ! -e $outputFileName ]
- do
- echo "Waiting for report [ $outputFileName ]"
- sleep 5
- done
- sleep 60
- mv $outputFileName output/
- done
-done
-
-
-echo Generating charts ...
-
-./generateChart -reportDir output
Show replies by date