summaryrefslogtreecommitdiffstats
path: root/scripts/lib/buildstats.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/buildstats.py')
-rw-r--r--scripts/lib/buildstats.py8
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):
180class BuildStats(dict): 180class 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"""