jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1759664 - in /jmeter/trunk/src/core/org/apache/jmeter/report/processor: PercentileAggregator.java PercentileAggregatorFactory.java
Date Wed, 07 Sep 2016 19:16:07 GMT
Author: pmouawad
Date: Wed Sep  7 19:16:07 2016
New Revision: 1759664

URL: http://svn.apache.org/viewvc?rev=1759664&view=rev
Log:
Bug 60091 - Report / Dashboard : Have a new report containing min/max and percentiles graphs
Fix percentiles computing
Bugzilla Id: 60091

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregator.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregatorFactory.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregator.java?rev=1759664&r1=1759663&r2=1759664&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregator.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregator.java Wed
Sep  7 19:16:07 2016
@@ -46,6 +46,14 @@ public class PercentileAggregator implem
         percentileIndex = index;
     }
 
+    /**
+     * @param lastAggregator {@link PercentileAggregator}
+     */
+    public PercentileAggregator(PercentileAggregator lastAggregator) {
+        this.statistics = new DescriptiveStatistics(lastAggregator.statistics);
+        this.percentileIndex = lastAggregator.percentileIndex;
+    }
+
     /*
      * (non-Javadoc)
      * 

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregatorFactory.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregatorFactory.java?rev=1759664&r1=1759663&r2=1759664&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregatorFactory.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregatorFactory.java
Wed Sep  7 19:16:07 2016
@@ -25,6 +25,7 @@ package org.apache.jmeter.report.process
 public class PercentileAggregatorFactory extends AbstractAggregatorFactory {
 
     private double percentileIndex;
+    private Aggregator lastAggregator;
 
     /**
      * Gets the percentile index.
@@ -54,7 +55,14 @@ public class PercentileAggregatorFactory
      */
     @Override
     protected Aggregator createAggregator() {
-        return new PercentileAggregator(percentileIndex);
+        Aggregator newAggregator = null;
+        if(lastAggregator != null) {
+            newAggregator = new PercentileAggregator((PercentileAggregator)lastAggregator);
+        } else {
+            newAggregator = new PercentileAggregator(percentileIndex);
+        }
+        lastAggregator = newAggregator;
+        return newAggregator;
     }
 
 }



Mime
View raw message