diff options
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""" |