diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2017-09-15 16:04:38 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-18 11:07:30 +0100 |
commit | 81aef784fdbd2e8a543475b1892c3d6a1fe97872 (patch) | |
tree | d787e9402d3fa667eee19a4447f46b440e7eda5c /scripts/lib/buildstats.py | |
parent | b5fb3dd904cd22212c720f3c79d71952ecbaa9c2 (diff) | |
download | poky-81aef784fdbd2e8a543475b1892c3d6a1fe97872.tar.gz |
scripts/oe-build-perf-report: summary of task resource usage
Utilize buildstats, if available, and show a summary of the resource
usage of bitbake tasks in the html report. The details provided are:
- total number of tasks
- top 5 resource-hungry tasks (cputime)
- top 5 increase in resource usage (cputime)
- top 5 decrease in resource usage (cputime)
[YOCTO #11381]
(From OE-Core rev: ddd9443cb2432af2c15b358bfda708393fa3c417)
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.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/lib/buildstats.py b/scripts/lib/buildstats.py index 9eb60b1c69..bd6332176a 100644 --- a/scripts/lib/buildstats.py +++ b/scripts/lib/buildstats.py | |||
@@ -180,6 +180,14 @@ class BSRecipe(object): | |||
180 | class BuildStats(dict): | 180 | class BuildStats(dict): |
181 | """Class representing buildstats of one build""" | 181 | """Class representing buildstats of one build""" |
182 | 182 | ||
183 | @property | ||
184 | def num_tasks(self): | ||
185 | """Get number of tasks""" | ||
186 | num = 0 | ||
187 | for recipe in self.values(): | ||
188 | num += len(recipe.tasks) | ||
189 | return num | ||
190 | |||
183 | @classmethod | 191 | @classmethod |
184 | def from_json(cls, bs_json): | 192 | def from_json(cls, bs_json): |
185 | """Create new BuildStats object from JSON object""" | 193 | """Create new BuildStats object from JSON object""" |