From 99861c17e7a47cbbd492f98336439a5ab3e8742e Mon Sep 17 00:00:00 2001 From: Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> Date: Fri, 3 May 2024 16:43:37 +0200 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/build_perf/report.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/lib/build_perf/report.py') 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): return "null" return self / 1024 -def measurement_stats(meas, prefix=''): +def measurement_stats(meas, prefix='', time=0): """Get statistics of a measurement""" if not meas: return {prefix + 'sample_cnt': 0, @@ -319,6 +319,7 @@ def measurement_stats(meas, prefix=''): stats['quantity'] = val_cls.quantity stats[prefix + 'sample_cnt'] = len(values) + start_time = time # Add start time for both type sysres and disk usage mean_val = val_cls(mean(values)) min_val = val_cls(min(values)) max_val = val_cls(max(values)) @@ -334,6 +335,7 @@ def measurement_stats(meas, prefix=''): stats[prefix + 'max'] = max_val stats[prefix + 'minus'] = val_cls(mean_val - min_val) stats[prefix + 'plus'] = val_cls(max_val - mean_val) + stats[prefix + 'start_time'] = start_time return stats -- cgit v1.2.3-54-g00ecf