Title: [193992] trunk/Websites/perf.webkit.org
Revision
193992
Author
[email protected]
Date
2015-12-11 16:11:40 -0800 (Fri, 11 Dec 2015)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (193991 => 193992)


--- trunk/Websites/perf.webkit.org/ChangeLog	2015-12-11 23:54:30 UTC (rev 193991)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2015-12-12 00:11:40 UTC (rev 193992)
@@ -1,3 +1,16 @@
+2015-12-11  Ryosuke Niwa  <[email protected]>
+
+        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  <[email protected]>
 
         Perf dashboard should avoid overflow during geometric mean computation

Modified: trunk/Websites/perf.webkit.org/tools/sync-with-buildbot.py (193991 => 193992)


--- trunk/Websites/perf.webkit.org/tools/sync-with-buildbot.py	2015-12-11 23:54:30 UTC (rev 193991)
+++ trunk/Websites/perf.webkit.org/tools/sync-with-buildbot.py	2015-12-12 00:11:40 UTC (rev 193992)
@@ -65,9 +65,27 @@
 
 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)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to