diff options
| author | Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> | 2024-05-03 16:43:37 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-15 16:39:19 +0100 |
| commit | 99861c17e7a47cbbd492f98336439a5ab3e8742e (patch) | |
| tree | 0589759e26762445389cdd0115a512d35c419958 | |
| parent | 836b4b57d6d50b04190c7d9b66e73464f5698fd3 (diff) | |
| download | poky-99861c17e7a47cbbd492f98336439a5ab3e8742e.tar.gz | |
oe-build-perf-report: Display more than 300 commits and date instead of commit number
- This commit updates measurement statistics data to include start_time so that time can be displayed instead of commit numbers on the chart.
- It also updates default commit history length to 300.
(From OE-Core rev: 64275a41c37130aaaacc5e592f94a1afe057119b)
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | scripts/lib/build_perf/report.py | 4 | ||||
| -rwxr-xr-x | scripts/oe-build-perf-report | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py index ab77424cc7..82c56830d7 100644 --- a/scripts/lib/build_perf/report.py +++ b/scripts/lib/build_perf/report.py | |||
| @@ -294,7 +294,7 @@ class SizeVal(MeasurementVal): | |||
| 294 | return "null" | 294 | return "null" |
| 295 | return self / 1024 | 295 | return self / 1024 |
| 296 | 296 | ||
| 297 | def measurement_stats(meas, prefix=''): | 297 | def measurement_stats(meas, prefix='', time=0): |
| 298 | """Get statistics of a measurement""" | 298 | """Get statistics of a measurement""" |
| 299 | if not meas: | 299 | if not meas: |
| 300 | return {prefix + 'sample_cnt': 0, | 300 | return {prefix + 'sample_cnt': 0, |
| @@ -319,6 +319,7 @@ def measurement_stats(meas, prefix=''): | |||
| 319 | stats['quantity'] = val_cls.quantity | 319 | stats['quantity'] = val_cls.quantity |
| 320 | stats[prefix + 'sample_cnt'] = len(values) | 320 | stats[prefix + 'sample_cnt'] = len(values) |
| 321 | 321 | ||
| 322 | start_time = time # Add start time for both type sysres and disk usage | ||
| 322 | mean_val = val_cls(mean(values)) | 323 | mean_val = val_cls(mean(values)) |
| 323 | min_val = val_cls(min(values)) | 324 | min_val = val_cls(min(values)) |
| 324 | max_val = val_cls(max(values)) | 325 | max_val = val_cls(max(values)) |
| @@ -334,6 +335,7 @@ def measurement_stats(meas, prefix=''): | |||
| 334 | stats[prefix + 'max'] = max_val | 335 | stats[prefix + 'max'] = max_val |
| 335 | stats[prefix + 'minus'] = val_cls(mean_val - min_val) | 336 | stats[prefix + 'minus'] = val_cls(mean_val - min_val) |
| 336 | stats[prefix + 'plus'] = val_cls(max_val - mean_val) | 337 | stats[prefix + 'plus'] = val_cls(max_val - mean_val) |
| 338 | stats[prefix + 'start_time'] = start_time | ||
| 337 | 339 | ||
| 338 | return stats | 340 | return stats |
| 339 | 341 | ||
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report index 7812ea4540..266700d294 100755 --- a/scripts/oe-build-perf-report +++ b/scripts/oe-build-perf-report | |||
| @@ -336,7 +336,9 @@ 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 | samples.append(measurement_stats(meas_i)) | 339 | # Add start_time for both test measurement types of sysres and disk usage |
| 340 | start_time = test_i['start_time'][0] | ||
| 341 | samples.append(measurement_stats(meas_i, '', start_time)) | ||
| 340 | samples[-1]['commit_num'] = commit_num | 342 | samples[-1]['commit_num'] = commit_num |
| 341 | 343 | ||
| 342 | absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean']) | 344 | absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean']) |
| @@ -473,7 +475,7 @@ Examine build performance test results from a Git repository""" | |||
| 473 | group.add_argument('--branch', '-B', default='master', help="Branch to find commit in") | 475 | group.add_argument('--branch', '-B', default='master', help="Branch to find commit in") |
| 474 | group.add_argument('--branch2', help="Branch to find comparision revisions in") | 476 | group.add_argument('--branch2', help="Branch to find comparision revisions in") |
| 475 | group.add_argument('--machine', default='qemux86') | 477 | group.add_argument('--machine', default='qemux86') |
| 476 | group.add_argument('--history-length', default=25, type=int, | 478 | group.add_argument('--history-length', default=300, type=int, |
| 477 | help="Number of tested revisions to plot in html report") | 479 | help="Number of tested revisions to plot in html report") |
| 478 | group.add_argument('--commit', | 480 | group.add_argument('--commit', |
| 479 | help="Revision to search for") | 481 | help="Revision to search for") |
