From 81aef784fdbd2e8a543475b1892c3d6a1fe97872 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 15 Sep 2017 16:04:38 +0300 Subject: 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/lib/buildstats.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/lib/buildstats.py') 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""" -- cgit v1.2.3-54-g00ecf