woolfel 2004/09/17 22:07:19
Modified: src/jorphan/org/apache/jorphan/math StatCalculator.java
Log:
I added methods for keeping track of the bytes. it's used for the
aggregate listener aka StatVisualizer.
peter
Revision Changes Path
1.6 +11 -2
jakarta-jmeter/src/jorphan/org/apache/jorphan/math/StatCalculator.java
Index: StatCalculator.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/jorphan/org/apache/jorphan/math/StatCalculator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- StatCalculator.java 28 May 2004 21:09:13 -0000 1.5
+++ StatCalculator.java 18 Sep 2004 05:07:19 -0000 1.6
@@ -39,6 +39,7 @@
double mean = 0;
double deviation = 0;
int count = 0;
+ long bytes = 0;
public void clear()
{
@@ -73,7 +74,11 @@
Number val = new Double(newValue);
addValue(val);
}
-
+
+ public void addBytes(long newValue){
+ bytes += newValue;
+ }
+
public void addAll(StatCalculator calc)
{
Iterator iter = values.iterator();
@@ -90,6 +95,10 @@
return (Number) values.get((int)(values.size() * .5));
}
return new Long(0);
+ }
+
+ public long getTotalBytes(){
+ return bytes;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]