commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r998523 - /commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java
Date Sat, 18 Sep 2010 19:15:23 GMT
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;



Mime
View raw message