You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2018/08/24 21:20:48 UTC

svn commit: r1838965 - /jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java

Author: pmouawad
Date: Fri Aug 24 21:20:48 2018
New Revision: 1838965

URL: http://svn.apache.org/viewvc?rev=1838965&view=rev
Log:
Bug 62166 Report/Dashboard: Provide ability to register custom graphs and metrics in the JMeter Dashboard. 

Use the MeanAggregator
Bugzilla Id: 62166

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java?rev=1838965&r1=1838964&r2=1838965&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumer.java Fri Aug 24 21:20:48 2018
@@ -28,8 +28,8 @@ import org.apache.jmeter.report.core.Con
 import org.apache.jmeter.report.core.Converters;
 import org.apache.jmeter.report.core.Sample;
 import org.apache.jmeter.report.processor.MapResultData;
+import org.apache.jmeter.report.processor.MeanAggregatorFactory;
 import org.apache.jmeter.report.processor.SampleConsumer;
-import org.apache.jmeter.report.processor.TimeRateAggregatorFactory;
 import org.apache.jmeter.report.processor.ValueResultData;
 import org.apache.jmeter.report.processor.graph.AbstractGraphConsumer;
 import org.apache.jmeter.report.processor.graph.AbstractOverTimeGraphConsumer;
@@ -199,7 +199,7 @@ public class CustomGraphConsumer extends
         HashMap<String, GroupInfo> groupInfos = new HashMap<>(); 
         groupInfos.put(AbstractGraphConsumer.DEFAULT_GROUP,
                 new GroupInfo(
-                new TimeRateAggregatorFactory(), 
+                new MeanAggregatorFactory(), 
                 new AbstractSeriesSelector() {
                     private final Iterable<String> values = Arrays.asList(sampleVariableName);
 
@@ -233,13 +233,4 @@ public class CustomGraphConsumer extends
               }}, false, false));
         return groupInfos;
     }
-    
-    @Override
-    public void initialize() {
-        super.initialize();
-        // Override the granularity of the aggregators factory
-        ((TimeRateAggregatorFactory) getGroupInfos().get(
-                AbstractGraphConsumer.DEFAULT_GROUP).getAggregatorFactory())
-                .setGranularity(getGranularity());
-    }
 }