[jboss-cvs] CacheBenchFwk/src/org/cachebench/tests ...
Manik Surtani
manik at jboss.org
Thu May 17 05:38:04 EDT 2007
User: msurtani
Date: 07/05/17 05:38:04
Modified: src/org/cachebench/tests SimpleTest.java
Log:
fixed stuff
Revision Changes Path
1.7 +20 -2 CacheBenchFwk/src/org/cachebench/tests/SimpleTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SimpleTest.java
===================================================================
RCS file: /cvsroot/jboss/CacheBenchFwk/src/org/cachebench/tests/SimpleTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- SimpleTest.java 18 Apr 2007 19:09:28 -0000 1.6
+++ SimpleTest.java 17 May 2007 09:38:04 -0000 1.7
@@ -57,8 +57,26 @@
System.out.println("*** sum of time: " + elapsedSecondsForAllPuts);
System.out.println("*** num puts occured: " + putStats.getN());
+ try
+ {
result.setThroughputTransactionsPerSecond((int) (sampleSize / elapsedSecondsForAllPuts));
+ }
+ catch (ArithmeticException ae)
+ {
+ log.warn("Divide by 0 - elapsedSecondsForAllPuts = 0?");
+ result.setThroughputTransactionsPerSecond(-999);
+ }
+
+ try
+ {
result.setThroughputBytesPerSecond((int) (numberOfBytesPut.longValue() / elapsedSecondsForAllPuts));
+ }
+ catch (ArithmeticException ae)
+ {
+ log.warn("Divide by 0 - elapsedSecondsForAllPuts = 0?");
+ result.setThroughputBytesPerSecond(-999);
+ }
+
// set the number of members in the cluster
result.setNumMembers(cache.getNumMembers());
More information about the jboss-cvs-commits
mailing list