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

Unified Diff: tools/variations/fieldtrial_to_struct.py

Issue 2373843002: Update fieldtrial_util To Handle Combined Fieldtrial Config Format (Closed)
Patch Set: Update Bootstrap Deps Created 4 years, 3 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 | « tools/perf/core/perf_benchmark.py ('k') | tools/variations/fieldtrial_util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/variations/fieldtrial_to_struct.py
diff --git a/tools/variations/fieldtrial_to_struct.py b/tools/variations/fieldtrial_to_struct.py
index 132f0aa1ca154322f8ac7f7a31a6b687e3e8973d..dec472d7fa04cba6b0210fd05b4e3bfb88fd6888 100755
--- a/tools/variations/fieldtrial_to_struct.py
+++ b/tools/variations/fieldtrial_to_struct.py
@@ -74,11 +74,15 @@ def _GenerateTrials(config, platform):
if study['experiments']:
yield study
+def ConfigToStudies(config, platform):
+ """Returns the applicable studies from config for the platform."""
+ return [study for study in _GenerateTrials(config, platform)]
+
def _FieldTrialConfigToDescription(config, platform):
return {
'elements': {
'kFieldTrialConfig': {
- 'studies': [study for study in _GenerateTrials(config, platform)]
+ 'studies': ConfigToStudies(config, platform)
}
}
}
« no previous file with comments | « tools/perf/core/perf_benchmark.py ('k') | tools/variations/fieldtrial_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698