diff options
-rw-r--r-- | scripts/lib/build_perf/html/measurement_chart.html | 12 | ||||
-rwxr-xr-x | scripts/oe-build-perf-report | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html index 05bd84e6ce..c39578702d 100644 --- a/scripts/lib/build_perf/html/measurement_chart.html +++ b/scripts/lib/build_perf/html/measurement_chart.html | |||
@@ -17,10 +17,10 @@ | |||
17 | } | 17 | } |
18 | 18 | ||
19 | // Convert raw data to the format: [time, value] | 19 | // Convert raw data to the format: [time, value] |
20 | const data = rawData.map(([commit, value, time]) => { | 20 | const data = rawData.map(([commit, value, time, commitnum]) => { |
21 | return [ | 21 | return [ |
22 | // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000. | 22 | // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000. |
23 | new Date(time * 1000).getTime(), | 23 | commit, |
24 | // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds] | 24 | // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds] |
25 | updateValue(value) | 25 | updateValue(value) |
26 | ] | 26 | ] |
@@ -49,7 +49,13 @@ | |||
49 | ;} | 49 | ;} |
50 | }, | 50 | }, |
51 | xAxis: { | 51 | xAxis: { |
52 | type: 'time', | 52 | type: 'value', |
53 | min: function(value) { | ||
54 | return Math.round(value.min - 0.5); | ||
55 | }, | ||
56 | max: function(value) { | ||
57 | return Math.round(value.max + 0.5); | ||
58 | } | ||
53 | }, | 59 | }, |
54 | yAxis: { | 60 | yAxis: { |
55 | name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration in minutes' : 'Disk size in MB', | 61 | name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration in minutes' : 'Disk size in MB', |
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report index 6c3c726ee3..b38574caba 100755 --- a/scripts/oe-build-perf-report +++ b/scripts/oe-build-perf-report | |||
@@ -13,6 +13,7 @@ import logging | |||
13 | import os | 13 | import os |
14 | import re | 14 | import re |
15 | import sys | 15 | import sys |
16 | import subprocess | ||
16 | from collections import namedtuple, OrderedDict | 17 | from collections import namedtuple, OrderedDict |
17 | from operator import attrgetter | 18 | from operator import attrgetter |
18 | from xml.etree import ElementTree as ET | 19 | from xml.etree import ElementTree as ET |
@@ -338,8 +339,13 @@ def print_html_report(data, id_comp, buildstats): | |||
338 | commit_num = get_data_item(meta, 'layers.meta.commit_count') | 339 | commit_num = get_data_item(meta, 'layers.meta.commit_count') |
339 | commit = get_data_item(meta, 'layers.meta.commit') | 340 | commit = get_data_item(meta, 'layers.meta.commit') |
340 | # Add start_time for both test measurement types of sysres and disk usage | 341 | # Add start_time for both test measurement types of sysres and disk usage |
341 | start_time = test_i['start_time'][0] | 342 | try: |
342 | samples.append(measurement_stats(meas_i, '', start_time)) | 343 | commit_time = get_data_item(meta, 'layers.meta.commit_time') |
344 | except KeyError: | ||
345 | output = subprocess.check_output(["git", "show", "--no-patch", "--format=%ct", commit], cwd="/home/richard/Repos/poky", text=True).strip() | ||
346 | print("%s -> %s vs %s" % (commit_num, output + "." + str(commit_num).zfill(6), test_i['start_time'][0])) | ||
347 | commit_time = output + "." + str(commit_num).zfill(6) #test_i['start_time'][0] | ||
348 | samples.append(measurement_stats(meas_i, '', commit_time)) | ||
343 | samples[-1]['commit_num'] = commit_num | 349 | samples[-1]['commit_num'] = commit_num |
344 | samples[-1]['commit'] = commit | 350 | samples[-1]['commit'] = commit |
345 | 351 | ||