Author: pmouawad
Date: Thu Oct 13 19:39:42 2016
New Revision: 1764772

URL: http://svn.apache.org/viewvc?rev=1764772&view=rev
Log:
Bug 60250 - Need to Add Sent KB/s in Statistics Report of HTML Dashboard

Bugzilla Id: 60250

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=1764772&r1=1764771&r2=1764772&view=diff
==============================================================================
--- jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr (original)
+++ jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr Thu Oct 13 
19:39:42 2016
@@ -158,6 +158,8 @@ $(document).ready(function() {
             case 8:
             // Kbytes/s
             case 9:
+            // Sent Kbytes/s
+            case 10:
                 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=1764772&r1=1764771&r2=1764772&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
 Thu Oct 13 19:39:42 2016
@@ -57,6 +57,7 @@ public class StatisticsSummaryConsumer e
         }
         data.incTotal();
         data.incBytes(sample.getReceivedBytes());
+        data.incSentBytes(sample.getSentBytes());
 
         if (!sample.getSuccess()) {
             data.incErrors();
@@ -130,6 +131,7 @@ public class StatisticsSummaryConsumer e
         result.addResult(new 
ValueResultData(Double.valueOf(data.getPercentile3().getResult())));
         result.addResult(new 
ValueResultData(Double.valueOf(data.getThroughput())));
         result.addResult(new 
ValueResultData(Double.valueOf(data.getKBytesPerSecond())));
+        result.addResult(new 
ValueResultData(Double.valueOf(data.getSentKBytesPerSecond())));
         result.addResult(new ValueResultData(Long.valueOf(data.getMin())));
         result.addResult(new ValueResultData(Long.valueOf(data.getMax())));
         return result;
@@ -181,6 +183,7 @@ public class StatisticsSummaryConsumer e
                 Integer.valueOf(PERCENTILE_INDEX3))));
         titles.addResult(new 
ValueResultData(JMeterUtils.getResString("reportgenerator_summary_statistics_throughput")));
         titles.addResult(new 
ValueResultData(JMeterUtils.getResString("reportgenerator_summary_statistics_kbytes")));
+        titles.addResult(new 
ValueResultData(JMeterUtils.getResString("reportgenerator_summary_statistics_sent_kbytes")));
         titles.addResult(new 
ValueResultData(JMeterUtils.getResString("reportgenerator_summary_statistics_min")));
         titles.addResult(new 
ValueResultData(JMeterUtils.getResString("reportgenerator_summary_statistics_max")));
         return titles;

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=1764772&r1=1764771&r2=1764772&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
 Thu Oct 13 19:39:42 2016
@@ -29,6 +29,7 @@ public class StatisticsSummaryData {
     private long firstTime = Long.MAX_VALUE;
     private long endTime = Long.MIN_VALUE;
     private long bytes = 0L;
+    private long sentBytes = 0L;
     private long errors = 0L;
     private long total = 0L;
     private final MeanAggregator mean;
@@ -226,9 +227,23 @@ public class StatisticsSummaryData {
         total++;
     }
 
+    /**
+     * Increment received bytes
+     * @param value bytes
+     */
     public void incBytes(long value) {
         bytes += value;
     }
+    
+
+    /**
+     * Increment sent bytes
+     * @param value bytes
+     */
+    public void incSentBytes(long value) {
+        sentBytes += value;
+    }
+    
 
     public void incErrors() {
         errors++;
@@ -240,4 +255,29 @@ public class StatisticsSummaryData {
     public MeanAggregator getMean() {
         return mean;
     }
+
+    /**
+     * @return the sentBytes
+     */
+    public long getSentBytes() {
+        return sentBytes;
+    }
+    
+    /**
+     * Gets the sent bytes per second.
+     *
+     * @return the sent bytes per second
+     */
+    public double getSentBytesPerSecond() {
+        return sentBytes / ((double) getElapsedTime() / 1000);
+    }
+
+    /**
+     * Gets the sent kilo bytes per second.
+     *
+     * @return the sent kilo bytes per second
+     */
+    public double getSentKBytesPerSecond() {
+        return getSentBytesPerSecond() / 1024;
+    }
 }

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=1764772&r1=1764771&r2=1764772&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties 
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Thu 
Oct 13 19:39:42 2016
@@ -871,7 +871,8 @@ reportgenerator_summary_errors_type=Type
 reportgenerator_summary_statistics_count=#Samples
 reportgenerator_summary_statistics_error_count=KO
 reportgenerator_summary_statistics_error_percent=Error %
-reportgenerator_summary_statistics_kbytes=KB/sec
+reportgenerator_summary_statistics_kbytes=Received KB/sec
+reportgenerator_summary_statistics_sent_kbytes=Sent KB/sec
 reportgenerator_summary_statistics_label=Label
 reportgenerator_summary_statistics_max=Max
 reportgenerator_summary_statistics_mean=Average response time

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=1764772&r1=1764771&r2=1764772&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 
Thu Oct 13 19:39:42 2016
@@ -856,7 +856,8 @@ reportgenerator_summary_errors_type=Type
 reportgenerator_summary_statistics_count=\#Echantillons
 reportgenerator_summary_statistics_error_count=KO
 reportgenerator_summary_statistics_error_percent=% Erreur
-reportgenerator_summary_statistics_kbytes=Ko/sec
+reportgenerator_summary_statistics_kbytes=Ko re\u00e7ues / sec
+reportgenerator_summary_statistics_sent_kbytes=Ko envoy\u00e9s / sec
 reportgenerator_summary_statistics_label=Libell\u00E9
 reportgenerator_summary_statistics_max=Max
 reportgenerator_summary_statistics_mean=Temps moyen

Modified: jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1764772&r1=1764771&r2=1764772&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Thu Oct 13 19:39:42 2016
@@ -167,6 +167,7 @@ Summary
     <li><bug>60098</bug>Report / Dashboard : Reduce default value for 
"<code>jmeter.reportgenerator.statistic_window</code>" to reduce memory 
impact</li>
     <li><bug>60115</bug>Add date format property for start/end date filter 
into Report generator</li>
     <li><bug>60171</bug>Report / Dashboard : Active Threads Over Time should 
stack lines to give the total amount of threads running</li>
+    <li><bug>60250</bug>Report / Dashboard : Need to Add Sent KB/s in 
Statistics Report of HTML Dashboard</li>
 </ul>
 <h3>General</h3>
 <ul>


Reply via email to