mirror of
https://git.yoctoproject.org/poky
synced 2026-04-09 20:02:21 +02:00
A new tool for pretty-printing build perf test results stored in a Git repository. The scripts is able to produce either simple plaintext report showing the difference between two commits, or, an html report that also displays trendcharts of the test results. The script uses Jinja2 templates for generating HTML reports so it requires python3-jinja2 to be installed on the system. [YOCTO #10931] (From OE-Core rev: 3b25404f0f99b72f222bdca815929be1cf1cee35) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
51 lines
1.8 KiB
HTML
51 lines
1.8 KiB
HTML
<script type="text/javascript">
|
|
google.charts.setOnLoadCallback(drawChart_{{ chart_elem_id }});
|
|
function drawChart_{{ chart_elem_id }}() {
|
|
var data = new google.visualization.DataTable();
|
|
|
|
// Chart options
|
|
var options = {
|
|
theme : 'material',
|
|
legend: 'none',
|
|
hAxis: { format: '', title: 'Commit number',
|
|
minValue: {{ chart_opts.haxis.min }},
|
|
maxValue: {{ chart_opts.haxis.max }} },
|
|
{% if measurement.type == 'time' %}
|
|
vAxis: { format: 'h:mm:ss' },
|
|
{% else %}
|
|
vAxis: { format: '' },
|
|
{% endif %}
|
|
pointSize: 5,
|
|
chartArea: { left: 80, right: 15 },
|
|
};
|
|
|
|
// Define data columns
|
|
data.addColumn('number', 'Commit');
|
|
data.addColumn('{{ measurement.value_type.gv_data_type }}',
|
|
'{{ measurement.value_type.quantity }}');
|
|
// Add data rows
|
|
data.addRows([
|
|
{% for sample in measurement.samples %}
|
|
[{{ sample.commit_num }}, {{ sample.mean.gv_value() }}],
|
|
{% endfor %}
|
|
]);
|
|
|
|
// Finally, draw the chart
|
|
chart_div = document.getElementById('{{ chart_elem_id }}');
|
|
var chart = new google.visualization.LineChart(chart_div);
|
|
google.visualization.events.addListener(chart, 'ready', function () {
|
|
//chart_div = document.getElementById('{{ chart_elem_id }}');
|
|
//chart_div.innerHTML = '<img src="' + chart.getImageURI() + '">';
|
|
png_div = document.getElementById('{{ chart_elem_id }}_png');
|
|
png_div.outerHTML = '<a id="{{ chart_elem_id }}_png" href="' + chart.getImageURI() + '">PNG</a>';
|
|
console.log("CHART READY: {{ chart_elem_id }}");
|
|
{% if last_chart == true %}
|
|
console.log("ALL CHARTS READY");
|
|
{% endif %}
|
|
//console.log(chart_div.innerHTML);
|
|
});
|
|
chart.draw(data, options);
|
|
}
|
|
</script>
|
|
|