mirror of https://github.com/apache/jmeter.git
Bug 59335 - Report : Drop Response Time Per Sample Graph
Bugzilla Id: 59335
git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1739376 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 5894fd8ccb
This commit is contained in:
parent
7dc74a0401
commit
0df1d20eb3
|
|
@ -1212,10 +1212,6 @@ jmeter.reportgenerator.graph.activeThreadsOverTime.classname=org.apache.jmeter.r
|
|||
jmeter.reportgenerator.graph.activeThreadsOverTime.title=Active Threads Over Time
|
||||
jmeter.reportgenerator.graph.activeThreadsOverTime.property.set_granularity=${jmeter.reportgenerator.overall_granularity}
|
||||
|
||||
# Response Time Per Sample graph definition
|
||||
jmeter.reportgenerator.graph.responseTimePerSample.classname=org.apache.jmeter.report.processor.graph.impl.ResponseTimePerSampleGraphConsumer
|
||||
jmeter.reportgenerator.graph.responseTimePerSample.title=Response Time Per Sample
|
||||
|
||||
# Time VS Threads graph definition
|
||||
jmeter.reportgenerator.graph.timeVsThreads.classname=org.apache.jmeter.report.processor.graph.impl.TimeVSThreadGraphConsumer
|
||||
jmeter.reportgenerator.graph.timeVsThreads.title=Time VS Threads
|
||||
|
|
|
|||
|
|
@ -432,128 +432,6 @@ function refreshActiveThreadsOverTime(fixTimestamps) {
|
|||
}
|
||||
};
|
||||
|
||||
var responseTimePerSampleInfos = {
|
||||
data: ${responseTimePerSample!"{}"},
|
||||
getOptions: function() {
|
||||
var ticks = [];
|
||||
$.each(this.data.result.sampleNames, function(index, item){
|
||||
ticks.push([index, item]);
|
||||
});
|
||||
|
||||
return {
|
||||
series: {
|
||||
bars: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
bars: {
|
||||
align: "center",
|
||||
barWidth: 0.5,
|
||||
horizontal: true,
|
||||
fillColor: { colors: [{ opacity: 0.5 }, { opacity: 1}] },
|
||||
lineWidth: 1
|
||||
},
|
||||
xaxis: {
|
||||
axisLabel: "Response Time in ms",
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: 12,
|
||||
axisLabelFontFamily: 'Verdana, Arial',
|
||||
axisLabelPadding: 20,
|
||||
tickColor: "white",
|
||||
tickFormatter: function (v, axis) {
|
||||
return $.formatNumber(v, { format: "#,###", locale: "us" });
|
||||
},
|
||||
color: "black"
|
||||
},
|
||||
yaxis: {
|
||||
tickColor: "white",
|
||||
ticks: ticks,
|
||||
color: "black"
|
||||
},
|
||||
legend: {
|
||||
noColumns: 0,
|
||||
labelBoxBorderColor: "#858585",
|
||||
container: '#legendHorizontalBar'
|
||||
},
|
||||
grid: {
|
||||
hoverable: true,
|
||||
borderWidth: 2,
|
||||
backgroundColor: { colors: ["white", "white"] }
|
||||
}
|
||||
};
|
||||
},
|
||||
createGraph: function() {
|
||||
var data = this.data;
|
||||
var options = this.getOptions();
|
||||
prepareOptions(options, data);
|
||||
$.plot($("#flotResponseTimePerSample"), prepareData(data.result.series, $("#choicesResponseTimePerSample")), options);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Response Time Per Sample
|
||||
function refreshResponseTimePerSample() {
|
||||
var infos = responseTimePerSampleInfos;
|
||||
prepareSeries(infos.data);
|
||||
if (isGraph($("#flotResponseTimePerSample"))){
|
||||
infos.createGraph();
|
||||
} else {
|
||||
var choiceContainer = $("#choicesResponseTimePerSample");
|
||||
createLegend(choiceContainer, infos);
|
||||
infos.createGraph();
|
||||
$('#footerResponseTimePerSample .legendColorBox > div').each(function(i){
|
||||
$(this).clone().prependTo(choiceContainer.find("li").eq(i));
|
||||
});
|
||||
}
|
||||
|
||||
var previousPoint = null, previousLabel = null;
|
||||
|
||||
$.fn.UseTooltip = function () {
|
||||
$(this).bind("plothover", function (event, pos, item) {
|
||||
if (item) {
|
||||
if ((previousLabel != item.series.label) ||
|
||||
(previousPoint != item.dataIndex)) {
|
||||
previousPoint = item.dataIndex;
|
||||
previousLabel = item.series.label;
|
||||
$("#tooltip").remove();
|
||||
|
||||
var x = item.datapoint[0];
|
||||
var y = item.datapoint[1];
|
||||
|
||||
var color = item.series.color;
|
||||
|
||||
showTooltip(item.pageX,
|
||||
item.pageY,
|
||||
color,
|
||||
"<strong>" + item.series.label + "</strong><br>" + item.series.yaxis.ticks[y].label +
|
||||
" : <strong>" + $.formatNumber(x, { format: "#,###", locale: "us" }) + "</strong> ms");
|
||||
}
|
||||
} else {
|
||||
$("#tooltip").remove();
|
||||
previousPoint = null;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function showTooltip(x, y, color, contents) {
|
||||
$('<div id="tooltip">' + contents + '</div>').css({
|
||||
position: 'absolute',
|
||||
display: 'none',
|
||||
top: y - 10,
|
||||
left: x + 10,
|
||||
border: '2px solid ' + color,
|
||||
padding: '3px',
|
||||
'font-size': '9px',
|
||||
'border-radius': '5px',
|
||||
'background-color': '#fff',
|
||||
'font-family': 'Verdana, Arial, Helvetica, Tahoma, sans-serif',
|
||||
opacity: 0.9
|
||||
}).appendTo("body").fadeIn(200);
|
||||
}
|
||||
|
||||
$("#flotResponseTimePerSample").UseTooltip();
|
||||
};
|
||||
|
||||
var timeVsThreadsInfos = {
|
||||
data: ${timeVsThreads!"{}"},
|
||||
getOptions: function() {
|
||||
|
|
@ -1250,11 +1128,6 @@ function collapse(elem, collapsed){
|
|||
refreshActiveThreadsOverTime(true);
|
||||
}
|
||||
document.location.href="#activeThreadsOverTime";
|
||||
} else if (elem.id == "bodyResponseTimePerSample") {
|
||||
if (isGraph($(elem).find('.flot-chart-content')) == false) {
|
||||
refreshResponseTimePerSample();
|
||||
}
|
||||
document.location.href="#responseTimePerSample" ;
|
||||
} else if (elem.id == "bodyTimeVsThreads") {
|
||||
if (isGraph($(elem).find('.flot-chart-content')) == false) {
|
||||
refreshTimeVsThreads();
|
||||
|
|
@ -1335,9 +1208,6 @@ function toggleAll(id, checked){
|
|||
} else if ( id == "choicesResponseTimeDistribution"){
|
||||
choiceContainer = $("#choicesResponseTimeDistribution");
|
||||
refreshResponseTimeDistribution();
|
||||
} else if ( id == "choicesResponseTimePerSample"){
|
||||
choiceContainer = $("#choicesResponseTimePerSample");
|
||||
refreshResponseTimePerSample();
|
||||
} else if ( id == "choicesHitsPerSecond"){
|
||||
choiceContainer = $("#choicesHitsPerSecond");
|
||||
refreshHitsPerSecond(false);
|
||||
|
|
|
|||
|
|
@ -94,11 +94,6 @@
|
|||
Response Time Distribution
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ResponseTimes.html#responseTimePerSample" onclick="$('#bodyResponseTimePerSample').collapse('show');">
|
||||
Response Time Per Sample
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
|
@ -310,51 +305,6 @@
|
|||
</div>
|
||||
<!-- /.panel -->
|
||||
</div>
|
||||
<div class="col-lg-12 portlet" id="responseTimePerSample">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading portlet-header">
|
||||
<i class="fa fa-bar-chart-o fa-fw"></i><span type="button" class="span-title dropdown-toggle click-title" data-toggle="collapse" href="#bodyResponseTimePerSample" aria-expanded="true" aria-controls="bodyResponseTimePerSample">Response Time Per Sample</span>
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<a class="drag btn btn-link btn-xs">
|
||||
<i class="glyphicon glyphicon-resize-vertical"></i>
|
||||
</a>
|
||||
<button type="button" class="btn btn-link btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="#responseTimePerSample" onClick="checkAll('choicesResponseTimePerSample');">Display all samples</a>
|
||||
</li>
|
||||
<li><a href="#responseTimePerSample" onClick="uncheckAll('choicesResponseTimePerSample');">Hide all samples</a>
|
||||
</li>
|
||||
<li><a href="#responseTimePerSample" onclick="exportToPNG('flotResponseTimePerSample', this);">Save as PNG</a></li>
|
||||
</ul>
|
||||
<button type="button" class="btn btn-link btn-xs dropdown-toggle" data-toggle="collapse" href="#bodyResponseTimePerSample" aria-expanded="true" aria-controls="bodyResponseTimePerSample">
|
||||
<i class="fa fa-chevron-down"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.panel-heading -->
|
||||
<div class="collapse out portlet-content" id="bodyResponseTimePerSample">
|
||||
<div class="panel-body" id="collapseResponseTimePerSample">
|
||||
|
||||
<div class="flot-chart">
|
||||
<div class="flot-chart-content" id="flotResponseTimePerSample"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel-footer" id="footerResponseTimePerSample">
|
||||
<p id="legendHorizontalBar" hidden></p>
|
||||
<ul id="choicesResponseTimePerSample" class="legend">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.panel-body -->
|
||||
</div>
|
||||
<!-- /.panel -->
|
||||
</div>
|
||||
|
||||
<!-- /.col-lg-6 -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ import org.apache.jmeter.util.JMeterUtils;
|
|||
/**
|
||||
* The class ResponseTimePerSampleGraphConsumer provides a graph to visualize
|
||||
* percentiles of response time for each sample name.
|
||||
*
|
||||
* NOT USED FOR NOW as of 3.0
|
||||
* @since 3.0
|
||||
*
|
||||
*/
|
||||
public class ResponseTimePerSampleGraphConsumer extends AbstractGraphConsumer {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue