Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: scripts/tools/estimate_capacity.py

Issue 956923002: estimate_capacity.py: filter by patch project or blamelist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/tools/estimate_capacity.py
diff --git a/scripts/tools/estimate_capacity.py b/scripts/tools/estimate_capacity.py
index fba2e4b25cc8a12aa8522d44f8e7d4d3d7242d43..17b99cd38b3f9db7a045eee7ab20b7d4c2fe2f78 100755
--- a/scripts/tools/estimate_capacity.py
+++ b/scripts/tools/estimate_capacity.py
@@ -82,7 +82,8 @@ def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument('master')
parser.add_argument('--days', type=int, default=14)
- parser.add_argument('--ignore-cls-by', action='append')
+ parser.add_argument('--filter-by-blamelist')
+ parser.add_argument('--filter-by-patch-project')
args = parser.parse_args(argv)
@@ -126,14 +127,15 @@ def main(argv):
builds = []
for build in raw_builds:
+ properties = {p[0]: p[1] for p in build.get('properties', [])}
+ if (args.filter_by_patch_project and
+ properties.get('patch_project') != args.filter_by_patch_project):
+ continue
+
blamelist = build.get('blame', [])
- ignore_cl = False
- for entry in blamelist:
- if entry in args.ignore_cls_by:
- ignore_cl = True
- break
- if not ignore_cl:
- builds.append(build)
+ if (args.filter_by_blamelist and
+ args.filter_by_blamelist not in blamelist):
+ continue
capacity = estimate_capacity(builds)
for key in ('hourly_bots', 'daily_bots'):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698