+2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Perf dashboard's buildbot sync config JSON duplicates too much information
+ https://bugs.webkit.org/show_bug.cgi?id=152196
+
+ Reviewed by Stephanie Lewis.
+
+ Added shared, per-builder, and per-test (called type) configurations.
+
+ * tools/sync-with-buildbot.py:
+ (load_config):
+ (load_config.merge):
+
2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
Perf dashboard should avoid overflow during geometric mean computation
def load_config(config_json_path, buildbot_url):
with open(config_json_path) as config_json:
- configurations = json.load(config_json)
+ options = json.load(config_json)
+ shared_config = options['shared']
+ type_config = options['types']
+ builder_config = options['builders']
+
+ def merge(config, config_to_merge):
+ for key, value in config_to_merge.iteritems():
+ if isinstance(value, dict):
+ config.setdefault(key, {})
+ config[key].update(value)
+ else:
+ config[key] = value
+
+ configurations = options['configurations']
for config in configurations:
+
+ merge(config, shared_config)
+ merge(config, type_config[config.pop('type')])
+ merge(config, builder_config[config.pop('builder')])
+
escaped_builder_name = urllib.quote(config['builder'])
config['url'] = '%s/builders/%s/' % (buildbot_url, escaped_builder_name)
config['jsonURL'] = '%s/json/builders/%s/' % (buildbot_url, escaped_builder_name)