summaryrefslogtreecommitdiffstats
path: root/scripts/lib/build_perf/html/measurement_chart.html
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/build_perf/html/measurement_chart.html')
-rw-r--r--scripts/lib/build_perf/html/measurement_chart.html28
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html
index ffec3d09db..9acb3785e2 100644
--- a/scripts/lib/build_perf/html/measurement_chart.html
+++ b/scripts/lib/build_perf/html/measurement_chart.html
@@ -13,8 +13,10 @@
13 // Convert raw data to the format: [time, value] 13 // Convert raw data to the format: [time, value]
14 const data = rawData.map(([commit, value, time]) => { 14 const data = rawData.map(([commit, value, time]) => {
15 return [ 15 return [
16 new Date(time * 1000).getTime(), // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000. 16 // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000.
17 Array.isArray(value) ? convertToMinute(value) : value // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds] 17 new Date(time * 1000).getTime(),
18 // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds]
19 Array.isArray(value) ? convertToMinute(value) : value
18 ] 20 ]
19 }); 21 });
20 22
@@ -22,16 +24,18 @@
22 const option = { 24 const option = {
23 tooltip: { 25 tooltip: {
24 trigger: 'axis', 26 trigger: 'axis',
25 position: function (pt) { 27 valueFormatter: (value) => {
26 return [pt[0], '10%']; 28 const hours = Math.floor(value/60)
27 }, 29 const minutes = Math.floor(value % 60)
28 valueFormatter: (value) => value.toFixed(2) 30 const seconds = Math.floor((value * 60) % 60)
31 return hours + ':' + minutes + ':' + seconds
32 }
29 }, 33 },
30 xAxis: { 34 xAxis: {
31 type: 'time', 35 type: 'time',
32 }, 36 },
33 yAxis: { 37 yAxis: {
34 name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration (minutes)' : 'Disk size (MB)', 38 name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration in minutes' : 'Disk size in MB',
35 type: 'value', 39 type: 'value',
36 min: function(value) { 40 min: function(value) {
37 return Math.round(value.min - 0.5); 41 return Math.round(value.min - 0.5);
@@ -42,14 +46,10 @@
42 }, 46 },
43 dataZoom: [ 47 dataZoom: [
44 { 48 {
45 type: 'inside', 49 type: 'slider',
46 start: 0, 50 xAxisIndex: 0,
47 end: 100 51 filterMode: 'none'
48 }, 52 },
49 {
50 start: 0,
51 end: 100
52 }
53 ], 53 ],
54 series: [ 54 series: [
55 { 55 {