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:23 +0100 |
commit | ddd9443cb2432af2c15b358bfda708393fa3c417 (patch) | |
tree | d782305cf7110aa0239e52c99acf0269104da84a /scripts/lib/buildstats.py | |
parent | 8a2cd9afc95919737d8e75234e78bbc52e1494a1 (diff) | |
download | openembedded-core-contrib-ddd9443cb2432af2c15b358bfda708393fa3c417.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]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
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): class BuildStats(dict): """Class representing buildstats of one build""" + @property + def num_tasks(self): + """Get number of tasks""" + num = 0 + for recipe in self.values(): + num += len(recipe.tasks) + return num + @classmethod def from_json(cls, bs_json): """Create new BuildStats object from JSON object""" |