summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-09 17:18:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 22:27:39 +0000
commitf0853bfb3dd98c1d832448cd6cf632d95a4eb43b (patch)
tree7838eb5a515956940aff0aa008365dd631cd3049 /scripts
parent2968103ecf78cdce0455bcaf8d8a0641d35574db (diff)
downloadpoky-f0853bfb3dd98c1d832448cd6cf632d95a4eb43b.tar.gz
poky-f0853bfb3dd98c1d832448cd6cf632d95a4eb43b.tar.bz2
poky-f0853bfb3dd98c1d832448cd6cf632d95a4eb43b.zip
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) (From OE-Core rev: 111ee3499308bcde54268d58bf6163a98a9733db) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 b7b09391cb..b3c769895e 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"""
default='{hostname}/{branch}/{machine}/{commit_number}-g{commit}/{tag_number}',
help="Tag name (pattern) for finding results")
group.add_argument('--hostname', '-H')
- group.add_argument('--branch', '-B', default='master')
- group.add_argument('--branch2')
+ group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
+ group.add_argument('--branch2', help="Branch to find comparision revisions in")
group.add_argument('--machine', default='qemux86')
group.add_argument('--history-length', default=25, type=int,
help="Number of tested revisions to plot in html report")
@@ -581,13 +581,18 @@ def main(argv=None):
revs = get_test_revs(repo, args.tag_name, hostname=args.hostname,
branch=args.branch, machine=args.machine)
if args.branch2:
- revs = revs + get_test_revs(repo, args.tag_name, hostname=args.hostname,
+ revs2 = get_test_revs(repo, args.tag_name, hostname=args.hostname,
branch=args.branch2, machine=args.machine)
-
- if len(revs) < 2:
- log.error("%d tester revisions found, unable to generate report",
- len(revs))
- return 1
+ if not len(revs2):
+ log.error("No revisions found to compare against")
+ return 1
+ if not len(revs):
+ log.error("No revision to report on found")
+ return 1
+ else:
+ if len(revs) < 2:
+ log.error("Only %d tester revisions found, unable to generate report" % len(revs))
+ return 1
# Pick revisions
if args.commit:
@@ -599,6 +604,11 @@ def main(argv=None):
else:
index1 = len(revs) - 1
+ if args.branch2:
+ revs2.append(revs[index1])
+ index1 = len(revs2) - 1
+ revs = revs2
+
if args.commit2:
if args.commit_number2:
log.warning("Ignoring --commit-number2 as --commit2 was specified")
@@ -608,6 +618,11 @@ def main(argv=None):
else:
if index1 > 0:
index2 = index1 - 1
+ # Find the closest matching commit number for comparision
+ # In future we could check the commit is a common ancestor and
+ # continue back if not but this good enough for now
+ while index2 > 0 and revs[index2].commit_number > revs[index1].commit_number:
+ index2 = index2 - 1
else:
log.error("Unable to determine the other commit, use "
"--commit2 or --commit-number2 to specify it")