summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-16 23:44:30 +0000
committerSteve Sakoman <steve@sakoman.com>2025-11-17 16:59:28 -0800
commitdd2d3cfc4e26fdb9a3105ddf0af040f5a29b6306 (patch)
tree84a060f177b91a2ec5870021326cf57401fa17d7 /scripts
parentc1bb6b3d12ed8f69daa76435ff8f8118f42d5116 (diff)
downloadpoky-dd2d3cfc4e26fdb9a3105ddf0af040f5a29b6306.tar.gz
oe-build-perf-report: relax metadata matching rules
As the poky repository is no longer used, measurements are indexed using the oe-core commit. But as bitbake, oe-core and meta-yocto are now retrieved from separate gits, while measuring performances for a given branch at some time interval, we can get the same commit for oe-core but different ones for bitbake or meta-yocto. As a consequence, metadata associated with the same index (oe-core commit) might differ. To work around this, relax the equality checks for commit, commit_time and commit_count since they might no longer match. Ideally we'd group them into separate results but for now, treat them as being the same. [Based on work from Mathieu Dubois-Briand but fixed differently] (From OE-Core rev: d9c30edf908c129a7540b23e920dd669d2a30657) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e7dc42e30c76bf0fbb4d3cc019bbec675bac55fa) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/build_perf/report.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py
index ab77424cc7..a143b74653 100644
--- a/scripts/lib/build_perf/report.py
+++ b/scripts/lib/build_perf/report.py
@@ -137,9 +137,12 @@ def results_xml_to_json(elem):
137 137
138def aggregate_metadata(metadata): 138def aggregate_metadata(metadata):
139 """Aggregate metadata into one, basically a sanity check""" 139 """Aggregate metadata into one, basically a sanity check"""
140 mutable_keys = ('pretty_name', 'version_id')
141 140
142 def aggregate_obj(aggregate, obj, assert_str=True): 141 # A given OE-Core commit may point at different meta-yocto/bitbake commits so we have
142 # to ignore commit/commit_count/commit_time differences
143 mutable_keys = ('pretty_name', 'version_id', 'commit', 'commit_count', 'commit_time')
144
145 def aggregate_obj(aggregate, obj, assert_obj=True):
143 """Aggregate objects together""" 146 """Aggregate objects together"""
144 assert type(aggregate) is type(obj), \ 147 assert type(aggregate) is type(obj), \
145 "Type mismatch: {} != {}".format(type(aggregate), type(obj)) 148 "Type mismatch: {} != {}".format(type(aggregate), type(obj))
@@ -151,7 +154,7 @@ def aggregate_metadata(metadata):
151 assert len(aggregate) == len(obj) 154 assert len(aggregate) == len(obj)
152 for i, val in enumerate(obj): 155 for i, val in enumerate(obj):
153 aggregate_obj(aggregate[i], val) 156 aggregate_obj(aggregate[i], val)
154 elif not isinstance(obj, str) or (isinstance(obj, str) and assert_str): 157 elif assert_obj:
155 assert aggregate == obj, "Data mismatch {} != {}".format(aggregate, obj) 158 assert aggregate == obj, "Data mismatch {} != {}".format(aggregate, obj)
156 159
157 if not metadata: 160 if not metadata: