jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1755399 - in /jmeter/trunk: bin/report-template/content/js/ src/core/org/apache/jmeter/report/processor/ src/core/org/apache/jmeter/resources/ xdocs/
Date Sat, 06 Aug 2016 14:00:37 GMT
Author: pmouawad
Date: Sat Aug  6 14:00:37 2016
New Revision: 1755399

URL: http://svn.apache.org/viewvc?rev=1755399&view=rev
Log:
Bug 59954 - Web Report/Dashboard : Add average metric
Bugzilla Id: 59954

Modified:
    jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryData.java
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr?rev=1755399&r1=1755398&r2=1755399&view=diff
==============================================================================
--- jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr (original)
+++ jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr Sat Aug  6 14:00:37 2016
@@ -142,14 +142,22 @@ $(document).ready(function() {
     // Create statistics table
     createTable($("#statisticsTable"), ${statisticsSummary!"{}"}, function(index, item){
         switch(index){
+            // Errors pct
             case 3:
                 item = item.toFixed(2) + '%';
                 break;
+            // Mean
             case 4:
+            // Percentile 1
             case 5:
+            // Percentile 2
             case 6:
+            // Percentile 3
             case 7:
+            // Throughput
             case 8:
+            // Kbytes/s
+            case 9:
                 item = item.toFixed(2);
                 break;
         }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryConsumer.java?rev=1755399&r1=1755398&r2=1755399&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryConsumer.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryConsumer.java
Sat Aug  6 14:00:37 2016
@@ -58,7 +58,7 @@ public class StatisticsSummaryConsumer e
         data.getPercentile1().addValue(elapsedTime);
         data.getPercentile2().addValue(elapsedTime);
         data.getPercentile3().addValue(elapsedTime);
-
+        data.getMean().addValue(elapsedTime);
         data.setMin(elapsedTime);
         data.setMax(elapsedTime);
 
@@ -114,6 +114,7 @@ public class StatisticsSummaryConsumer e
         result.addResult(new ValueResultData(Long.valueOf(total)));
         result.addResult(new ValueResultData(Long.valueOf(errors)));
         result.addResult(new ValueResultData(Double.valueOf((double) errors * 100 / total)));
+        result.addResult(new ValueResultData(Double.valueOf(data.getMean().getResult())));
         result.addResult(new ValueResultData(Double.valueOf(data.getPercentile1().getResult())));
         result.addResult(new ValueResultData(Double.valueOf(data.getPercentile2().getResult())));
         result.addResult(new ValueResultData(Double.valueOf(data.getPercentile3().getResult())));
@@ -155,6 +156,8 @@ public class StatisticsSummaryConsumer e
         titles.addResult(new ValueResultData(
             JMeterUtils.getResString("reportgenerator_summary_statistics_error_percent")));
         titles.addResult(new ValueResultData(
+                JMeterUtils.getResString("reportgenerator_summary_statistics_mean")));
+        titles.addResult(new ValueResultData(
             String.format(
                 JMeterUtils.getResString("reportgenerator_summary_statistics_percentile_fmt"),
                 Integer.valueOf(PERCENTILE_INDEX1))));

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryData.java?rev=1755399&r1=1755398&r2=1755399&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryData.java Sat
Aug  6 14:00:37 2016
@@ -31,6 +31,7 @@ public class StatisticsSummaryData {
     private long bytes = 0L;
     private long errors = 0L;
     private long total = 0L;
+    private final MeanAggregator mean;
     private final PercentileAggregator percentile1;
     private final PercentileAggregator percentile2;
     private final PercentileAggregator percentile3;
@@ -191,6 +192,7 @@ public class StatisticsSummaryData {
         percentile1 = new PercentileAggregator(percentileIndex1);
         percentile2 = new PercentileAggregator(percentileIndex2);
         percentile3 = new PercentileAggregator(percentileIndex3);
+        mean = new MeanAggregator();
     }
 
     /**
@@ -231,4 +233,11 @@ public class StatisticsSummaryData {
     public void incErrors() {
         errors++;
     }
+
+    /**
+     * @return the mean response times
+     */
+    public MeanAggregator getMean() {
+        return mean;
+    }
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1755399&r1=1755398&r2=1755399&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Sat Aug  6 14:00:37
2016
@@ -869,6 +869,7 @@ reportgenerator_summary_statistics_error
 reportgenerator_summary_statistics_kbytes=KB/sec
 reportgenerator_summary_statistics_label=Label
 reportgenerator_summary_statistics_max=Max
+reportgenerator_summary_statistics_mean=Average response time
 reportgenerator_summary_statistics_min=Min
 reportgenerator_summary_statistics_percentile_fmt=%dth pct
 reportgenerator_summary_statistics_throughput=Throughput

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1755399&r1=1755398&r2=1755399&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Sat Aug  6 14:00:37
2016
@@ -854,6 +854,7 @@ reportgenerator_summary_statistics_error
 reportgenerator_summary_statistics_kbytes=Ko/sec
 reportgenerator_summary_statistics_label=Libell\u00E9
 reportgenerator_summary_statistics_max=Max
+reportgenerator_summary_statistics_mean=Temps moyen
 reportgenerator_summary_statistics_min=Min
 reportgenerator_summary_statistics_percentile_fmt=%d%% centile
 reportgenerator_summary_statistics_throughput=D\u00E9bit

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1755399&r1=1755398&r2=1755399&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Aug  6 14:00:37 2016
@@ -125,6 +125,7 @@ Summary
     <li><bug>57493</bug>Create a documentation page for properties</li>
     <li><bug>59924</bug>The log level of XXX package is set to DEBUG if
<code>log_level.XXXX</code> property value contains spaces, same for __log function</li>
     <li><bug>59777</bug>Extract slf4j binding into its own jar and make
it a jmeter lib</li>
+    <li><bug>59954</bug>Web Report/Dashboard : Add average metric</li>
 </ul>
 
 <ch_section>Non-functional changes</ch_section>



Mime
View raw message