scripts/oe-build-perf-report: Allow operation with no buildstats
PATCH 1/2 scripts/oe-build-perf-report: Allow operation with no buildstats
If buildstats is missing, avoid a backtrace.
Signed-off-by Richard Purdie <[email protected]>
--- scripts/oe-build-perf-report | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/oe-build-perf-report +1 -1
@@ -353,7 +353,7 @@ def print_html_report(data, id_comp, buildstats): bs_key = test + '.' + meas rev = str(metadata['commit_num']['value']) comp_rev = str(metadata['commit_num']['value_old']) - if (rev in buildstats and bs_key in buildstats[rev] and + if (buildstats and rev in buildstats and bs_key in buildstats[rev] and comp_rev in buildstats and bs_key in buildstats[comp_rev]): new_meas['buildstats'] = BSSummary(buildstats[comp_rev][bs_key], buildstats[rev][bs_key])
Signature · 1 line
2.25.1
PATCH 2/2 oe-build-perf-report: Ensure correct data is shown for multiple branch options
If --branch and --branch2 are the same, there is extra confusing data plotted onto the graph. Only do that if the branches are actually different.
Signed-off-by Richard Purdie <[email protected]>
--- scripts/oe-build-perf-report | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/oe-build-perf-report +2 -2
@@ -509,7 +509,7 @@ def main(argv=None): revs = gitarchive.get_test_revs(log, repo, args.tag_name, hostname=args.hostname, branch=args.branch, machine=args.machine) - if args.branch2: + if args.branch2 and args.branch2 != args.branch: revs2 = gitarchive.get_test_revs(log, repo, args.tag_name, hostname=args.hostname, branch=args.branch2, machine=args.machine) if not len(revs2):
@@ -533,7 +533,7 @@ def main(argv=None): else: index1 = len(revs) - 1 - if args.branch2: + if args.branch2 and args.branch2 != args.branch: revs2.append(revs[index1]) index1 = len(revs2) - 1 revs = revs2
Signature · 1 line
2.25.1