You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2010/09/18 21:15:23 UTC
svn commit: r998523 -
/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java
Author: psteitz
Date: Sat Sep 18 19:15:22 2010
New Revision: 998523
URL: http://svn.apache.org/viewvc?rev=998523&view=rev
Log:
Made statistics serializable.
Modified:
commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java
Modified: commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java
URL: http://svn.apache.org/viewvc/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java?rev=998523&r1=998522&r2=998523&view=diff
==============================================================================
--- commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java (original)
+++ commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java Sat Sep 18 19:15:22 2010
@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.io.Serializable;
import org.apache.commons.math.stat.descriptive.SummaryStatistics;
/**
@@ -34,7 +35,7 @@ import org.apache.commons.math.stat.desc
* instance, with key = (current thread id,"latency").</p>
*
*/
-public class Statistics {
+public class Statistics implements Serializable {
private HashMap<StatisticsKey,SummaryStatistics> data =
new HashMap <StatisticsKey,SummaryStatistics>();
@@ -287,16 +288,18 @@ public class Statistics {
buffer.append(metric.toUpperCase());
buffer.append(" for ");
buffer.append(process);
+ buffer.append(" ");
buffer.append(getStatistics(process, metric).toString());
buffer.append("\n********************************************\n");
}
return buffer.toString();
}
+
/**
* Composite key (<process,type>).
*/
- private static class StatisticsKey {
+ private static class StatisticsKey implements Serializable {
public StatisticsKey(String process, String type) {
this.process = process;
this.type = type;