diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2017-09-15 16:04:40 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-18 11:07:24 +0100 |
commit | 46eb839b51bb1466a9feeb09c9c437d6d45576cc (patch) | |
tree | dc4103de212b3dc1ede5223218213aa6428b6d06 /scripts/lib | |
parent | 2f8942d6830258fcbe1925f12ba1516def32d132 (diff) | |
download | openembedded-core-46eb839b51bb1466a9feeb09c9c437d6d45576cc.tar.gz openembedded-core-46eb839b51bb1466a9feeb09c9c437d6d45576cc.tar.bz2 openembedded-core-46eb839b51bb1466a9feeb09c9c437d6d45576cc.zip |
scripts/oe-build-perf-report: show recipe version changes in html report
If buildstats are available (for a certain measurement), show recipe
version changes between the two builds that are being compared. The
information shown includes new and dropped recipes as well as changes in
recipe version, revision or epoch.
[YOCTO #11382]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/build_perf/html/report.html | 20 | ||||
-rw-r--r-- | scripts/lib/buildstats.py | 15 |
2 files changed, 33 insertions, 2 deletions
diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html index e56186c958..291ad9d721 100644 --- a/scripts/lib/build_perf/html/report.html +++ b/scripts/lib/build_perf/html/report.html @@ -250,6 +250,26 @@ h3 { </td> </tr> </table> + + {# Recipe version differences #} + {% if measurement.buildstats.ver_diff %} + <div style="margin-top: 16px">Recipe version changes</div> + <table class="details"> + {% for head, recipes in measurement.buildstats.ver_diff.items() %} + <tr> + <th colspan="2">{{ head }}</th> + </tr> + {% for name, info in recipes|sort %} + <tr> + <td>{{ name }}</td> + <td>{{ info }}</td> + </tr> + {% endfor %} + {% endfor %} + </table> + {% else %} + <div style="margin-top: 16px">No recipe version changes detected</div> + {% endif %} {% endif %} </div> {% endfor %} diff --git a/scripts/lib/buildstats.py b/scripts/lib/buildstats.py index b1c9e617c6..d9aadf3cb8 100644 --- a/scripts/lib/buildstats.py +++ b/scripts/lib/buildstats.py @@ -157,9 +157,9 @@ class BSRecipe(object): self.version = version self.revision = revision if epoch is None: - self.nevr = "{}-{}-{}".format(name, version, revision) + self.evr = "{}-{}".format(version, revision) else: - self.nevr = "{}-{}_{}-{}".format(name, epoch, version, revision) + self.evr = "{}_{}-{}".format(epoch, version, revision) self.tasks = {} def aggregate(self, bsrecipe): @@ -176,6 +176,10 @@ class BSRecipe(object): self.tasks[taskname] = BSTaskAggregate([self.tasks[taskname]]) self.tasks[taskname].append(taskdata) + @property + def nevr(self): + return self.name + '-' + self.evr + class BuildStats(dict): """Class representing buildstats of one build""" @@ -323,6 +327,7 @@ class BSVerDiff(object): self.vchanged = {} self.rchanged = {} self.unchanged = {} + self.empty_diff = False common = recipes2.intersection(recipes1) if common: @@ -336,3 +341,9 @@ class BSVerDiff(object): self.rchanged[recipe] = rdiff else: self.unchanged[recipe] = rdiff + + if len(recipes1) == len(recipes2) == len(self.unchanged): + self.empty_diff = True + + def __bool__(self): + return not self.empty_diff |