diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/lib/build_perf/html/measurement_chart.html | 26 | ||||
| -rwxr-xr-x | scripts/oe-build-perf-report | 2 |
2 files changed, 15 insertions, 13 deletions
diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html index ad4a93ed02..05bd84e6ce 100644 --- a/scripts/lib/build_perf/html/measurement_chart.html +++ b/scripts/lib/build_perf/html/measurement_chart.html | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | // Get raw data | 2 | // Get raw data |
| 3 | const rawData = [ | 3 | const rawData = [ |
| 4 | {% for sample in measurement.samples %} | 4 | {% for sample in measurement.samples %} |
| 5 | [{{ sample.commit_num }}, {{ sample.mean.gv_value() }}, {{ sample.start_time }}], | 5 | [{{ sample.commit_num }}, {{ sample.mean.gv_value() }}, {{ sample.start_time }}, '{{sample.commit}}'], |
| 6 | {% endfor %} | 6 | {% endfor %} |
| 7 | ]; | 7 | ]; |
| 8 | 8 | ||
| @@ -30,23 +30,23 @@ | |||
| 30 | const option = { | 30 | const option = { |
| 31 | tooltip: { | 31 | tooltip: { |
| 32 | trigger: 'axis', | 32 | trigger: 'axis', |
| 33 | valueFormatter: (value) => { | 33 | enterable: true, |
| 34 | const commitNumber = rawData.filter(([commit, dataValue, time]) => updateValue(dataValue) === value) | 34 | position: function (point, params, dom, rect, size) { |
| 35 | return [point[0]-150, '10%']; | ||
| 36 | }, | ||
| 37 | formatter: function (param) { | ||
| 38 | const value = param[0].value[1] | ||
| 39 | const sample = rawData.filter(([commit, dataValue]) => updateValue(dataValue) === value) | ||
| 40 | // Add commit hash to the tooltip as a link | ||
| 41 | const commitLink = `https://git.yoctoproject.org/poky/commit/?id=${sample[0][3]}` | ||
| 35 | if ('{{ measurement.value_type.quantity }}' == 'time') { | 42 | if ('{{ measurement.value_type.quantity }}' == 'time') { |
| 36 | const hours = Math.floor(value/60) | 43 | const hours = Math.floor(value/60) |
| 37 | const minutes = Math.floor(value % 60) | 44 | const minutes = Math.floor(value % 60) |
| 38 | const seconds = Math.floor((value * 60) % 60) | 45 | const seconds = Math.floor((value * 60) % 60) |
| 39 | return [ | 46 | return `<strong>Duration:</strong> ${hours}:${minutes}:${seconds}, <br/> <strong>Commit number:</strong> <a href="${commitLink}" target="_blank" rel="noreferrer noopener">${sample[0][0]}</a>` |
| 40 | hours + ':' + minutes + ':' + seconds + ', ' + | ||
| 41 | 'commit number: ' + commitNumber[0][0] | ||
| 42 | ] | ||
| 43 | } | 47 | } |
| 44 | return [ | 48 | return `<strong>Size:</strong> ${value.toFixed(2)} MB, <br/> <strong>Commit number:</strong> <a href="${commitLink}" target="_blank" rel="noreferrer noopener">${sample[0][0]}</a>` |
| 45 | value.toFixed(2) + ' MB' + ', ' + | 49 | ;} |
| 46 | 'commit number: ' + commitNumber[0][0] | ||
| 47 | ] | ||
| 48 | }, | ||
| 49 | |||
| 50 | }, | 50 | }, |
| 51 | xAxis: { | 51 | xAxis: { |
| 52 | type: 'time', | 52 | type: 'time', |
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report index 266700d294..6c3c726ee3 100755 --- a/scripts/oe-build-perf-report +++ b/scripts/oe-build-perf-report | |||
| @@ -336,10 +336,12 @@ def print_html_report(data, id_comp, buildstats): | |||
| 336 | test_i = test_data['tests'][test] | 336 | test_i = test_data['tests'][test] |
| 337 | meas_i = test_i['measurements'][meas] | 337 | meas_i = test_i['measurements'][meas] |
| 338 | commit_num = get_data_item(meta, 'layers.meta.commit_count') | 338 | commit_num = get_data_item(meta, 'layers.meta.commit_count') |
| 339 | commit = get_data_item(meta, 'layers.meta.commit') | ||
| 339 | # Add start_time for both test measurement types of sysres and disk usage | 340 | # Add start_time for both test measurement types of sysres and disk usage |
| 340 | start_time = test_i['start_time'][0] | 341 | start_time = test_i['start_time'][0] |
| 341 | samples.append(measurement_stats(meas_i, '', start_time)) | 342 | samples.append(measurement_stats(meas_i, '', start_time)) |
| 342 | samples[-1]['commit_num'] = commit_num | 343 | samples[-1]['commit_num'] = commit_num |
| 344 | samples[-1]['commit'] = commit | ||
| 343 | 345 | ||
| 344 | absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean']) | 346 | absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean']) |
| 345 | reldiff = absdiff * 100 / samples[id_comp]['mean'] | 347 | reldiff = absdiff * 100 / samples[id_comp]['mean'] |
