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/10/05 02:57:02 UTC
svn commit: r1004493 - in
/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance:
LoadGenerator.java Statistics.java
Author: psteitz
Date: Tue Oct 5 00:57:02 2010
New Revision: 1004493
URL: http://svn.apache.org/viewvc?rev=1004493&view=rev
Log:
Separated process-level stats from overall aggregate stats.
Modified:
commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/LoadGenerator.java
commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/Statistics.java
Modified: commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/LoadGenerator.java
URL: http://svn.apache.org/viewvc/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/LoadGenerator.java?rev=1004493&r1=1004492&r2=1004493&view=diff
==============================================================================
--- commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/LoadGenerator.java (original)
+++ commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/LoadGenerator.java Tue Oct 5 00:57:02 2010
@@ -18,7 +18,6 @@
package org.apache.commons.performance;
import java.io.File;
-import java.util.Iterator;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
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=1004493&r1=1004492&r2=1004493&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 Tue Oct 5 00:57:02 2010
@@ -266,12 +266,13 @@ public class Statistics implements Seria
}
/**
- * Computes and formats display of summary statistics by type, across
- * processes.
+ * Computes and formats display of summary statistics by type, as means of means, etc.
+ * with the process as the unit of observation. Not currently displayed.
+ * TODO: Make inclusion of this report configurable.
*
* @return String representing summaries for each metric
*/
- public synchronized String displayOverallSummary() {
+ public synchronized String displayProcessLevelSummary() {
Iterator<String> metricsIterator = getTypes().iterator();
StringBuffer buffer = new StringBuffer();
while (metricsIterator.hasNext()) {
@@ -295,12 +296,27 @@ public class Statistics implements Seria
buffer.append(metric.toUpperCase());
buffer.append("\n");
buffer.append(getMaxSummary(metric).toString());
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * Displays overall statistics for each metric, aggregating data
+ * across threads.
+ *
+ * @return overall statistics report
+ */
+ public synchronized String displayOverallSummary() {
+ Iterator<String> metricsIterator = getTypes().iterator();
+ StringBuffer buffer = new StringBuffer();
+ while (metricsIterator.hasNext()) {
+ /* Restore this when math 2.2 is released with MATH-420 fixed
+ buffer.append(getOverallSummary(metric).toString()); */
+ String metric = metricsIterator.next();
buffer.append("********************************************\n");
buffer.append("Overall summary statistics (all threads combined) ");
buffer.append(metric.toUpperCase());
buffer.append("\n");
- /* Restore this when math 2.2 is released with MATH-420 fixed
- buffer.append(getOverallSummary(metric).toString()); */
StatisticalSummaryValues summary = getOverallSummary(metric);
buffer.append("n: ");
buffer.append(summary.getN());
@@ -318,7 +334,7 @@ public class Statistics implements Seria
buffer.append(summary.getStandardDeviation());
buffer.append("\n");
buffer.append("********************************************\n");
- }
+ }
return buffer.toString();
}