You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by ag...@apache.org on 2017/01/25 21:09:31 UTC
svn commit: r1780269 - in /jmeter/trunk: bin/report-template/content/js/
src/core/org/apache/jmeter/report/processor/
src/core/org/apache/jmeter/resources/ xdocs/
xdocs/images/screenshots/changes/3.2/ xdocs/images/screenshots/dashboard/
Author: agomes
Date: Wed Jan 25 21:09:31 2017
New Revision: 1780269
URL: http://svn.apache.org/viewvc?rev=1780269&view=rev
Log:
This closes #256 : Improve Statistics Table in HTML report
Added:
jmeter/trunk/xdocs/images/screenshots/changes/3.2/
jmeter/trunk/xdocs/images/screenshots/changes/3.2/report_statistics.png (with props)
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/resources/messages.properties
jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/images/screenshots/dashboard/report_statistics.png
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=1780269&r1=1780268&r2=1780269&view=diff
==============================================================================
--- jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr (original)
+++ jmeter/trunk/bin/report-template/content/js/dashboard.js.fmkr Wed Jan 25 21:09:31 2017
@@ -19,15 +19,54 @@ var seriesFilter = ${seriesFilter!"undef
var filtersOnlySampleSeries = ${filtersOnlySampleSeries?c!"false"};
/*
+ * Add header in statistics table to group metrics by category
+ * format
+ *
+ */
+function summaryTableHeader(header) {
+ var newRow = header.insertRow(-1);
+ newRow.className = "tablesorter-no-sort";
+ var cell = document.createElement('th');
+ cell.setAttribute("data-sorter", false);
+ cell.colSpan = 1;
+ cell.innerHTML = "Requests";
+ newRow.appendChild(cell);
+
+ cell = document.createElement('th');
+ cell.setAttribute("data-sorter", false);
+ cell.colSpan = 3;
+ cell.innerHTML = "Executions";
+ newRow.appendChild(cell);
+
+ cell = document.createElement('th');
+ cell.setAttribute("data-sorter", false);
+ cell.colSpan = 7;
+ cell.innerHTML = "Response Times (ms)";
+ newRow.appendChild(cell);
+
+ cell = document.createElement('th');
+ cell.setAttribute("data-sorter", false);
+ cell.colSpan = 2;
+ cell.innerHTML = "Network (KB/sec)";
+ newRow.appendChild(cell);
+}
+
+/*
* Populates the table identified by id parameter with the specified data and
* format
*
*/
-function createTable(table, info, formatter, defaultSorts, seriesIndex) {
+function createTable(table, info, formatter, defaultSorts, seriesIndex, headerCreator) {
var tableRef = table[0];
// Create header and populate it with data.titles array
var header = tableRef.createTHead();
+
+ // Call callback is available
+ if(headerCreator) {
+ headerCreator(header);
+ }
+
var newRow = header.insertRow(-1);
for (var index = 0; index < info.titles.length; index++) {
var cell = document.createElement('th');
@@ -150,23 +189,24 @@ $(document).ready(function() {
break;
// Mean
case 4:
+ // Mean
+ case 7:
// Percentile 1
- case 5:
+ case 8:
// Percentile 2
- case 6:
+ case 9:
// Percentile 3
- case 7:
+ case 10:
// Throughput
- case 8:
+ case 11:
// Kbytes/s
- case 9:
+ case 12:
// Sent Kbytes/s
- case 10:
item = item.toFixed(2);
break;
}
return item;
- }, [[0, 0]], 0);
+ }, [[0, 0]], 0, summaryTableHeader);
// Create error table
createTable($("#errorsTable"), ${errorsSummary!"{}"}, function(index, item){
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=1780269&r1=1780268&r2=1780269&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 Wed Jan 25 21:09:31 2017
@@ -137,14 +137,14 @@ public class StatisticsSummaryConsumer e
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(Long.valueOf(data.getMin())));
+ result.addResult(new ValueResultData(Long.valueOf(data.getMax())));
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())));
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;
}
@@ -180,6 +180,8 @@ public class StatisticsSummaryConsumer e
JMeterUtils.getResString("reportgenerator_summary_statistics_error_percent")));
titles.addResult(new ValueResultData(
JMeterUtils.getResString("reportgenerator_summary_statistics_mean")));
+ titles.addResult(new ValueResultData(JMeterUtils.getResString("reportgenerator_summary_statistics_min")));
+ titles.addResult(new ValueResultData(JMeterUtils.getResString("reportgenerator_summary_statistics_max")));
titles.addResult(new ValueResultData(
String.format(
JMeterUtils.getResString("reportgenerator_summary_statistics_percentile_fmt"),
@@ -195,8 +197,7 @@ public class StatisticsSummaryConsumer e
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/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1780269&r1=1780268&r2=1780269&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Wed Jan 25 21:09:31 2017
@@ -859,13 +859,13 @@ 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=Received KB/sec
-reportgenerator_summary_statistics_sent_kbytes=Sent KB/sec
+reportgenerator_summary_statistics_kbytes=Received
+reportgenerator_summary_statistics_sent_kbytes=Sent
reportgenerator_summary_statistics_label=Label
-reportgenerator_summary_statistics_max=Max (ms)
-reportgenerator_summary_statistics_mean=Average response time (ms)
-reportgenerator_summary_statistics_min=Min (ms)
-reportgenerator_summary_statistics_percentile_fmt=%dth pct (ms)
+reportgenerator_summary_statistics_max=Max
+reportgenerator_summary_statistics_mean=Average
+reportgenerator_summary_statistics_min=Min
+reportgenerator_summary_statistics_percentile_fmt=%dth pct
reportgenerator_summary_statistics_throughput=Throughput
reportgenerator_summary_total=Total
request_data=Request Data
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=1780269&r1=1780268&r2=1780269&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 Wed Jan 25 21:09:31 2017
@@ -849,13 +849,13 @@ 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 re\u00e7ues / sec
-reportgenerator_summary_statistics_sent_kbytes=Ko envoy\u00e9s / sec
+reportgenerator_summary_statistics_kbytes=Re\u00e7ues
+reportgenerator_summary_statistics_sent_kbytes=Envoy\u00e9s
reportgenerator_summary_statistics_label=Libell\u00E9
-reportgenerator_summary_statistics_max=Max (ms)
-reportgenerator_summary_statistics_mean=Temps moyen (ms)
-reportgenerator_summary_statistics_min=Min (ms)
-reportgenerator_summary_statistics_percentile_fmt=%d%% centile (ms)
+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
reportgenerator_summary_total=Total
request_data=Donn\u00E9e requ\u00EAte
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1780269&r1=1780268&r2=1780269&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Wed Jan 25 21:09:31 2017
@@ -149,6 +149,7 @@ JMeter now requires Java 8. Ensure you u
<h3>Report / Dashboard</h3>
<ul>
+ <li><bug>60637</bug>Improve Statistics table design <figure image="dashboard/report_statistics.png" ></figure></li>
</ul>
<h3>General</h3>
Added: jmeter/trunk/xdocs/images/screenshots/changes/3.2/report_statistics.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/changes/3.2/report_statistics.png?rev=1780269&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/changes/3.2/report_statistics.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Modified: jmeter/trunk/xdocs/images/screenshots/dashboard/report_statistics.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/dashboard/report_statistics.png?rev=1780269&r1=1780268&r2=1780269&view=diff
==============================================================================
Binary files - no diff available.