summaryrefslogtreecommitdiffstats
path: root/scripts/lib/buildstats.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-09-15 16:04:40 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-18 11:07:30 +0100
commit6c222a5c11ee1abe2b5b81e97d4dc6ac7346410b (patch)
tree7ae89867ed8fdc3e7c9016e4ac97a74842825d6a /scripts/lib/buildstats.py
parenta80f5e761cf1c0ac1b5d457ec5284f601c60f459 (diff)
downloadpoky-6c222a5c11ee1abe2b5b81e97d4dc6ac7346410b.tar.gz
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] (From OE-Core rev: 46eb839b51bb1466a9feeb09c9c437d6d45576cc) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/buildstats.py')
-rw-r--r--scripts/lib/buildstats.py15
1 files changed, 13 insertions, 2 deletions
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):
157 self.version = version 157 self.version = version
158 self.revision = revision 158 self.revision = revision
159 if epoch is None: 159 if epoch is None:
160 self.nevr = "{}-{}-{}".format(name, version, revision) 160 self.evr = "{}-{}".format(version, revision)
161 else: 161 else:
162 self.nevr = "{}-{}_{}-{}".format(name, epoch, version, revision) 162 self.evr = "{}_{}-{}".format(epoch, version, revision)
163 self.tasks = {} 163 self.tasks = {}
164 164
165 def aggregate(self, bsrecipe): 165 def aggregate(self, bsrecipe):
@@ -176,6 +176,10 @@ class BSRecipe(object):
176 self.tasks[taskname] = BSTaskAggregate([self.tasks[taskname]]) 176 self.tasks[taskname] = BSTaskAggregate([self.tasks[taskname]])
177 self.tasks[taskname].append(taskdata) 177 self.tasks[taskname].append(taskdata)
178 178
179 @property
180 def nevr(self):
181 return self.name + '-' + self.evr
182
179 183
180class BuildStats(dict): 184class BuildStats(dict):
181 """Class representing buildstats of one build""" 185 """Class representing buildstats of one build"""
@@ -323,6 +327,7 @@ class BSVerDiff(object):
323 self.vchanged = {} 327 self.vchanged = {}
324 self.rchanged = {} 328 self.rchanged = {}
325 self.unchanged = {} 329 self.unchanged = {}
330 self.empty_diff = False
326 331
327 common = recipes2.intersection(recipes1) 332 common = recipes2.intersection(recipes1)
328 if common: 333 if common:
@@ -336,3 +341,9 @@ class BSVerDiff(object):
336 self.rchanged[recipe] = rdiff 341 self.rchanged[recipe] = rdiff
337 else: 342 else:
338 self.unchanged[recipe] = rdiff 343 self.unchanged[recipe] = rdiff
344
345 if len(recipes1) == len(recipes2) == len(self.unchanged):
346 self.empty_diff = True
347
348 def __bool__(self):
349 return not self.empty_diff