]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oe-build-perf-report: Use commit_time if available
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Feb 2025 15:54:31 +0000 (15:54 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Feb 2025 11:42:23 +0000 (11:42 +0000)
Currently, the perf report charts use start_time which is when the build
is run. If running builds for commits in the past, this is inaccurate so
switch to using the recently added commit_time if the field is present.
Over time, the reports will switch to using the more accurate values.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-build-perf-report

index 6c3c726ee3a01f821e68db26d77a0298787b210d..a36f3c1bca349069cf3afc22a6b98efa93c47eab 100755 (executable)
@@ -338,7 +338,11 @@ def print_html_report(data, id_comp, buildstats):
                 commit_num = get_data_item(meta, 'layers.meta.commit_count')
                 commit = get_data_item(meta, 'layers.meta.commit')
                 # Add start_time for both test measurement types of sysres and disk usage
-                start_time = test_i['start_time'][0]
+                try:
+                    # Use the commit_time if available, falling back to start_time
+                    start_time = get_data_item(meta, 'layers.meta.commit_time')
+                except KeyError:
+                    start_time = test_i['start_time'][0]
                 samples.append(measurement_stats(meas_i, '', start_time))
                 samples[-1]['commit_num'] = commit_num
                 samples[-1]['commit'] = commit