diff options
-rw-r--r-- | scripts/lib/build_perf/html/measurement_chart.html | 6 | ||||
-rw-r--r-- | scripts/lib/build_perf/html/report.html | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html index 26fe1453c0..65f1a227ad 100644 --- a/scripts/lib/build_perf/html/measurement_chart.html +++ b/scripts/lib/build_perf/html/measurement_chart.html | |||
@@ -1,4 +1,5 @@ | |||
1 | <script type="text/javascript"> | 1 | <script type="text/javascript"> |
2 | chartsDrawing += 1; | ||
2 | google.charts.setOnLoadCallback(drawChart_{{ chart_elem_id }}); | 3 | google.charts.setOnLoadCallback(drawChart_{{ chart_elem_id }}); |
3 | function drawChart_{{ chart_elem_id }}() { | 4 | function drawChart_{{ chart_elem_id }}() { |
4 | var data = new google.visualization.DataTable(); | 5 | var data = new google.visualization.DataTable(); |
@@ -39,10 +40,9 @@ | |||
39 | png_div = document.getElementById('{{ chart_elem_id }}_png'); | 40 | png_div = document.getElementById('{{ chart_elem_id }}_png'); |
40 | png_div.outerHTML = '<a id="{{ chart_elem_id }}_png" href="' + chart.getImageURI() + '">PNG</a>'; | 41 | png_div.outerHTML = '<a id="{{ chart_elem_id }}_png" href="' + chart.getImageURI() + '">PNG</a>'; |
41 | console.log("CHART READY: {{ chart_elem_id }}"); | 42 | console.log("CHART READY: {{ chart_elem_id }}"); |
42 | {% if last_chart == true %} | 43 | chartsDrawing -= 1; |
44 | if (chartsDrawing == 0) | ||
43 | console.log("ALL CHARTS READY"); | 45 | console.log("ALL CHARTS READY"); |
44 | {% endif %} | ||
45 | //console.log(chart_div.innerHTML); | ||
46 | }); | 46 | }); |
47 | chart.draw(data, options); | 47 | chart.draw(data, options); |
48 | } | 48 | } |
diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html index e42871177d..165cbb811c 100644 --- a/scripts/lib/build_perf/html/report.html +++ b/scripts/lib/build_perf/html/report.html | |||
@@ -6,17 +6,14 @@ | |||
6 | <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | 6 | <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> |
7 | <script type="text/javascript"> | 7 | <script type="text/javascript"> |
8 | google.charts.load('current', {'packages':['corechart']}); | 8 | google.charts.load('current', {'packages':['corechart']}); |
9 | var chartsDrawing = 0; | ||
9 | </script> | 10 | </script> |
10 | 11 | ||
11 | {# Render measurement result charts #} | 12 | {# Render measurement result charts #} |
12 | {% for test in test_data %} | 13 | {% for test in test_data %} |
13 | {% set test_loop = loop %} | ||
14 | {% if test.status == 'SUCCESS' %} | 14 | {% if test.status == 'SUCCESS' %} |
15 | {% for measurement in test.measurements %} | 15 | {% for measurement in test.measurements %} |
16 | {% set chart_elem_id = test.name + '_' + measurement.name + '_chart' %} | 16 | {% set chart_elem_id = test.name + '_' + measurement.name + '_chart' %} |
17 | {% if test_loop.last and loop.last %} | ||
18 | {% set last_chart = true %} | ||
19 | {% endif %} | ||
20 | {% include 'measurement_chart.html' %} | 17 | {% include 'measurement_chart.html' %} |
21 | {% endfor %} | 18 | {% endfor %} |
22 | {% endif %} | 19 | {% endif %} |