diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-16 23:44:30 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-11-24 06:57:39 -0800 |
| commit | 36165cce685e0048fb7a576c009e12d718c80ea1 (patch) | |
| tree | 5b38545fc448317b77e457e0290a49a036652382 | |
| parent | 9734a9147239d630882d73a05781e96bc09f0e7d (diff) | |
| download | poky-kirkstone.tar.gz | |
oe-build-perf-report: relax metadata matching ruleskirkstone
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: ff72b41a3f0bf1820405b8782f0d125cd10e3406)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e7dc42e30c76bf0fbb4d3cc019bbec675bac55fa)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | scripts/lib/build_perf/report.py | 9 |
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 | ||
| 138 | def aggregate_metadata(metadata): | 138 | def 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: |
