summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-09 17:18:20 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-11 17:47:10 (GMT)
commitda960154eab1735e9966c2cba93c21a86515fd7f (patch)
treed86af6f65407d13bf80541dad41dc9c963b6f00d
parentc4f1276721a6e2ea5c4b5e536711072e037a2d7b (diff)
downloadpoky-da960154eab1735e9966c2cba93c21a86515fd7f.tar.gz
oe-build-perf-report: Improve branch comparision handling
When comparing branches, correctly filter the revisions corresponding to the specific branch specified. Also use the commit numbers as a way to gauge spatially related commits for comparision meaning comparisions for out of order build revisions becomes meaninful. This should improve the reporting for autobuilder generated builds. Also improve the branch option help text. (From OE-Core rev: 9f6f4ab6eec9dca07af7f53da5f737a6167bfb38) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 b7b0939..b3c7698 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -541,8 +541,8 @@ Examine build performance test results from a Git repository"""
541 default='{hostname}/{branch}/{machine}/{commit_number}-g{commit}/{tag_number}', 541 default='{hostname}/{branch}/{machine}/{commit_number}-g{commit}/{tag_number}',
542 help="Tag name (pattern) for finding results") 542 help="Tag name (pattern) for finding results")
543 group.add_argument('--hostname', '-H') 543 group.add_argument('--hostname', '-H')
544 group.add_argument('--branch', '-B', default='master') 544 group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
545 group.add_argument('--branch2') 545 group.add_argument('--branch2', help="Branch to find comparision revisions in")
546 group.add_argument('--machine', default='qemux86') 546 group.add_argument('--machine', default='qemux86')
547 group.add_argument('--history-length', default=25, type=int, 547 group.add_argument('--history-length', default=25, type=int,
548 help="Number of tested revisions to plot in html report") 548 help="Number of tested revisions to plot in html report")
@@ -581,13 +581,18 @@ def main(argv=None):
581 revs = get_test_revs(repo, args.tag_name, hostname=args.hostname, 581 revs = get_test_revs(repo, args.tag_name, hostname=args.hostname,
582 branch=args.branch, machine=args.machine) 582 branch=args.branch, machine=args.machine)
583 if args.branch2: 583 if args.branch2:
584 revs = revs + get_test_revs(repo, args.tag_name, hostname=args.hostname, 584 revs2 = get_test_revs(repo, args.tag_name, hostname=args.hostname,
585 branch=args.branch2, machine=args.machine) 585 branch=args.branch2, machine=args.machine)
586 586 if not len(revs2):
587 if len(revs) < 2: 587 log.error("No revisions found to compare against")
588 log.error("%d tester revisions found, unable to generate report", 588 return 1
589 len(revs)) 589 if not len(revs):
590 return 1 590 log.error("No revision to report on found")
591 return 1
592 else:
593 if len(revs) < 2:
594 log.error("Only %d tester revisions found, unable to generate report" % len(revs))
595 return 1
591 596
592 # Pick revisions 597 # Pick revisions
593 if args.commit: 598 if args.commit:
@@ -599,6 +604,11 @@ def main(argv=None):
599 else: 604 else:
600 index1 = len(revs) - 1 605 index1 = len(revs) - 1
601 606
607 if args.branch2:
608 revs2.append(revs[index1])
609 index1 = len(revs2) - 1
610 revs = revs2
611
602 if args.commit2: 612 if args.commit2:
603 if args.commit_number2: 613 if args.commit_number2:
604 log.warning("Ignoring --commit-number2 as --commit2 was specified") 614 log.warning("Ignoring --commit-number2 as --commit2 was specified")
@@ -608,6 +618,11 @@ def main(argv=None):
608 else: 618 else:
609 if index1 > 0: 619 if index1 > 0:
610 index2 = index1 - 1 620 index2 = index1 - 1
621 # Find the closest matching commit number for comparision
622 # In future we could check the commit is a common ancestor and
623 # continue back if not but this good enough for now
624 while index2 > 0 and revs[index2].commit_number > revs[index1].commit_number:
625 index2 = index2 - 1
611 else: 626 else:
612 log.error("Unable to determine the other commit, use " 627 log.error("Unable to determine the other commit, use "
613 "--commit2 or --commit-number2 to specify it") 628 "--commit2 or --commit-number2 to specify it")