summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/oe-build-perf-report20
1 files changed, 14 insertions, 6 deletions
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index 21bde7e156..e781f4f03f 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -372,7 +372,7 @@ def print_html_report(data, id_comp, buildstats):
372 chart_opts=chart_opts)) 372 chart_opts=chart_opts))
373 373
374 374
375def get_buildstats(repo, notes_ref, revs, outdir=None): 375def get_buildstats(repo, notes_ref, notes_ref2, revs, outdir=None):
376 """Get the buildstats from git notes""" 376 """Get the buildstats from git notes"""
377 full_ref = 'refs/notes/' + notes_ref 377 full_ref = 'refs/notes/' + notes_ref
378 if not repo.rev_parse(full_ref): 378 if not repo.rev_parse(full_ref):
@@ -391,8 +391,13 @@ def get_buildstats(repo, notes_ref, revs, outdir=None):
391 for tag in rev.tags: 391 for tag in rev.tags:
392 log.debug(' %s', tag) 392 log.debug(' %s', tag)
393 try: 393 try:
394 bs_all = json.loads(repo.run_cmd(['notes', '--ref', notes_ref, 394 try:
395 'show', tag + '^0'])) 395 bs_all = json.loads(repo.run_cmd(['notes', '--ref', notes_ref, 'show', tag + '^0']))
396 except GitError:
397 if notes_ref2:
398 bs_all = json.loads(repo.run_cmd(['notes', '--ref', notes_ref2, 'show', tag + '^0']))
399 else:
400 raise
396 except GitError: 401 except GitError:
397 log.warning("Buildstats not found for %s", tag) 402 log.warning("Buildstats not found for %s", tag)
398 bs_all = {} 403 bs_all = {}
@@ -589,9 +594,12 @@ def main(argv=None):
589 buildstats = None 594 buildstats = None
590 if args.dump_buildstats or args.html: 595 if args.dump_buildstats or args.html:
591 outdir = 'oe-build-perf-buildstats' if args.dump_buildstats else None 596 outdir = 'oe-build-perf-buildstats' if args.dump_buildstats else None
592 notes_ref = 'buildstats/{}/{}/{}'.format(args.hostname, args.branch, 597 notes_ref = 'buildstats/{}/{}/{}'.format(args.hostname, args.branch, args.machine)
593 args.machine) 598 notes_ref2 = None
594 buildstats = get_buildstats(repo, notes_ref, [rev_l, rev_r], outdir) 599 if args.branch2:
600 notes_ref = 'buildstats/{}/{}/{}'.format(args.hostname, args.branch2, args.machine)
601 notes_ref2 = 'buildstats/{}/{}/{}'.format(args.hostname, args.branch, args.machine)
602 buildstats = get_buildstats(repo, notes_ref, notes_ref2, [rev_l, rev_r], outdir)
595 603
596 # Print report 604 # Print report
597 if not args.html: 605 if not args.html: