summaryrefslogtreecommitdiffstats
path: root/scripts/oe-build-perf-report
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/oe-build-perf-report')
-rwxr-xr-xscripts/oe-build-perf-report31
1 files changed, 23 insertions, 8 deletions
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index 2d64e301d2..f17d932716 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -539,8 +539,8 @@ Examine build performance test results from a Git repository"""
539 default='{hostname}/{branch}/{machine}/{commit_number}-g{commit}/{tag_number}', 539 default='{hostname}/{branch}/{machine}/{commit_number}-g{commit}/{tag_number}',
540 help="Tag name (pattern) for finding results") 540 help="Tag name (pattern) for finding results")
541 group.add_argument('--hostname', '-H') 541 group.add_argument('--hostname', '-H')
542 group.add_argument('--branch', '-B', default='master') 542 group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
543 group.add_argument('--branch2') 543 group.add_argument('--branch2', help="Branch to find comparision revisions in")
544 group.add_argument('--machine', default='qemux86') 544 group.add_argument('--machine', default='qemux86')
545 group.add_argument('--history-length', default=25, type=int, 545 group.add_argument('--history-length', default=25, type=int,
546 help="Number of tested revisions to plot in html report") 546 help="Number of tested revisions to plot in html report")
@@ -579,13 +579,18 @@ def main(argv=None):
579 revs = get_test_revs(repo, args.tag_name, hostname=args.hostname, 579 revs = get_test_revs(repo, args.tag_name, hostname=args.hostname,
580 branch=args.branch, machine=args.machine) 580 branch=args.branch, machine=args.machine)
581 if args.branch2: 581 if args.branch2:
582 revs = revs + get_test_revs(repo, args.tag_name, hostname=args.hostname, 582 revs2 = get_test_revs(repo, args.tag_name, hostname=args.hostname,
583 branch=args.branch2, machine=args.machine) 583 branch=args.branch2, machine=args.machine)
584 584 if not len(revs2):
585 if len(revs) < 2: 585 log.error("No revisions found to compare against")
586 log.error("%d tester revisions found, unable to generate report", 586 return 1
587 len(revs)) 587 if not len(revs):
588 return 1 588 log.error("No revision to report on found")
589 return 1
590 else:
591 if len(revs) < 2:
592 log.error("Only %d tester revisions found, unable to generate report" % len(revs))
593 return 1
589 594
590 # Pick revisions 595 # Pick revisions
591 if args.commit: 596 if args.commit:
@@ -597,6 +602,11 @@ def main(argv=None):
597 else: 602 else:
598 index1 = len(revs) - 1 603 index1 = len(revs) - 1
599 604
605 if args.branch2:
606 revs2.append(revs[index1])
607 index1 = len(revs2) - 1
608 revs = revs2
609
600 if args.commit2: 610 if args.commit2:
601 if args.commit_number2: 611 if args.commit_number2:
602 log.warning("Ignoring --commit-number2 as --commit2 was specified") 612 log.warning("Ignoring --commit-number2 as --commit2 was specified")
@@ -606,6 +616,11 @@ def main(argv=None):
606 else: 616 else:
607 if index1 > 0: 617 if index1 > 0:
608 index2 = index1 - 1 618 index2 = index1 - 1
619 # Find the closest matching commit number for comparision
620 # In future we could check the commit is a common ancestor and
621 # continue back if not but this good enough for now
622 while index2 > 0 and revs[index2].commit_number > revs[index1].commit_number:
623 index2 = index2 - 1
609 else: 624 else:
610 log.error("Unable to determine the other commit, use " 625 log.error("Unable to determine the other commit, use "
611 "--commit2 or --commit-number2 to specify it") 626 "--commit2 or --commit-number2 to specify it")