mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Steve Sakoman
parent
c1bb6b3d12
commit
dd2d3cfc4e
@@ -137,9 +137,12 @@ def results_xml_to_json(elem):
|
|||||||
|
|
||||||
def aggregate_metadata(metadata):
|
def aggregate_metadata(metadata):
|
||||||
"""Aggregate metadata into one, basically a sanity check"""
|
"""Aggregate metadata into one, basically a sanity check"""
|
||||||
mutable_keys = ('pretty_name', 'version_id')
|
|
||||||
|
|
||||||
def aggregate_obj(aggregate, obj, assert_str=True):
|
# A given OE-Core commit may point at different meta-yocto/bitbake commits so we have
|
||||||
|
# to ignore commit/commit_count/commit_time differences
|
||||||
|
mutable_keys = ('pretty_name', 'version_id', 'commit', 'commit_count', 'commit_time')
|
||||||
|
|
||||||
|
def aggregate_obj(aggregate, obj, assert_obj=True):
|
||||||
"""Aggregate objects together"""
|
"""Aggregate objects together"""
|
||||||
assert type(aggregate) is type(obj), \
|
assert type(aggregate) is type(obj), \
|
||||||
"Type mismatch: {} != {}".format(type(aggregate), type(obj))
|
"Type mismatch: {} != {}".format(type(aggregate), type(obj))
|
||||||
@@ -151,7 +154,7 @@ def aggregate_metadata(metadata):
|
|||||||
assert len(aggregate) == len(obj)
|
assert len(aggregate) == len(obj)
|
||||||
for i, val in enumerate(obj):
|
for i, val in enumerate(obj):
|
||||||
aggregate_obj(aggregate[i], val)
|
aggregate_obj(aggregate[i], val)
|
||||||
elif not isinstance(obj, str) or (isinstance(obj, str) and assert_str):
|
elif assert_obj:
|
||||||
assert aggregate == obj, "Data mismatch {} != {}".format(aggregate, obj)
|
assert aggregate == obj, "Data mismatch {} != {}".format(aggregate, obj)
|
||||||
|
|
||||||
if not metadata:
|
if not metadata:
|
||||||
|
|||||||
Reference in New Issue
Block a user