Title: [206465] trunk/Websites/perf.webkit.org
Revision
206465
Author
[email protected]
Date
2016-09-27 14:54:38 -0700 (Tue, 27 Sep 2016)

Log Message

Extend perf dashboard to support multiple summary pages.
https://bugs.webkit.org/show_bug.cgi?id=162594

Reviewed by Ryosuke Niwa.

Start support multiple summary pages instead of one.
Specify 'summaryPages' as key that map to a list of summaries which follows
current 'summary' format in 'config.json' but with 2 more properties:
   'name': specifying the name shows on perf dashboard,
   'route': specifying the path to this page.

* public/include/manifest.php:
* public/v3/main.js:
(main):
(main.): Deleted.
* public/v3/models/manifest.js:
(Manifest._didFetchManifest):
(Manifest):
* public/v3/pages/summary-page.js:
(SummaryPage):
(SummaryPage.prototype.routeName):

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (206464 => 206465)


--- trunk/Websites/perf.webkit.org/ChangeLog	2016-09-27 21:05:50 UTC (rev 206464)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2016-09-27 21:54:38 UTC (rev 206465)
@@ -1,3 +1,27 @@
+2016-09-27  Dewei Zhu  <[email protected]>
+
+        Extend perf dashboard to support multiple summary pages.
+        https://bugs.webkit.org/show_bug.cgi?id=162594
+
+        Reviewed by Ryosuke Niwa.
+
+        Start support multiple summary pages instead of one.
+        Specify 'summaryPages' as key that map to a list of summaries which follows
+        current 'summary' format in 'config.json' but with 2 more properties:
+           'name': specifying the name shows on perf dashboard,
+           'route': specifying the path to this page.
+
+        * public/include/manifest.php:
+        * public/v3/main.js:
+        (main):
+        (main.): Deleted.
+        * public/v3/models/manifest.js:
+        (Manifest._didFetchManifest):
+        (Manifest):
+        * public/v3/pages/summary-page.js:
+        (SummaryPage):
+        (SummaryPage.prototype.routeName):
+
 2016-08-09  Ryosuke Niwa  <[email protected]>
 
         Don't filter out the latest data point in chart data sampling

Modified: trunk/Websites/perf.webkit.org/public/include/manifest.php (206464 => 206465)


--- trunk/Websites/perf.webkit.org/public/include/manifest.php	2016-09-27 21:05:50 UTC (rev 206464)
+++ trunk/Websites/perf.webkit.org/public/include/manifest.php	2016-09-27 21:54:38 UTC (rev 206465)
@@ -41,7 +41,7 @@
             'builders' => (object)$this->builders(),
             'bugTrackers' => (object)$this->bug_trackers($repositories_table),
             'dashboards' => (object)config('dashboards'),
-            'summary' => (object)config('summary'),
+            'summaryPages' => (object)config('summaryPages'),
         );
 
         $this->manifest['elapsedTime'] = (microtime(true) - $start_time) * 1000;

Modified: trunk/Websites/perf.webkit.org/public/v3/main.js (206464 => 206465)


--- trunk/Websites/perf.webkit.org/public/v3/main.js	2016-09-27 21:05:50 UTC (rev 206464)
+++ trunk/Websites/perf.webkit.org/public/v3/main.js	2016-09-27 21:54:38 UTC (rev 206465)
@@ -20,7 +20,12 @@
         var router = new PageRouter();
         var chartsToolbar = new ChartsToolbar;
 
-        var summaryPage = manifest.summary ? new SummaryPage(manifest.summary) : null;
+        var summaryPages = [];
+        if (manifest.summaryPages) {
+            for (var summaryPage of manifest.summaryPages)
+                summaryPages.push(new SummaryPage(summaryPage));
+        }
+
         var chartsPage = new ChartsPage(chartsToolbar);
         var analysisCategoryPage = new AnalysisCategoryPage();
 
@@ -34,13 +39,13 @@
         buildRequestQueuePage.setParentPage(analysisCategoryPage);
 
         var heading = new Heading(manifest.siteTitle);
-        heading.addPageGroup([summaryPage, chartsPage, analysisCategoryPage].filter(function (page) { return page; }));
+        heading.addPageGroup(summaryPages.concat([chartsPage, analysisCategoryPage]));
 
         heading.setTitle(manifest.siteTitle);
         heading.addPageGroup(dashboardPages);
 
         var router = new PageRouter();
-        if(summaryPage)
+        for (var summaryPage of summaryPages)
             router.addPage(summaryPage);
         router.addPage(chartsPage);
         router.addPage(createAnalysisTaskPage);
@@ -50,9 +55,9 @@
         for (var page of dashboardPages)
             router.addPage(page);
 
-        if (summaryPage)
-            router.setDefaultPage(summaryPage);
-        else if (dashboardPages)
+        if (summaryPages.length)
+            router.setDefaultPage(summaryPages[0]);
+        else if (dashboardPages.length)
             router.setDefaultPage(dashboardPages[0]);
         else
             router.setDefaultPage(chartsPage);

Modified: trunk/Websites/perf.webkit.org/public/v3/models/manifest.js (206464 => 206465)


--- trunk/Websites/perf.webkit.org/public/v3/models/manifest.js	2016-09-27 21:05:50 UTC (rev 206464)
+++ trunk/Websites/perf.webkit.org/public/v3/models/manifest.js	2016-09-27 21:54:38 UTC (rev 206465)
@@ -48,7 +48,7 @@
         return {
             siteTitle: rawResponse.siteTitle,
             dashboards: rawResponse.dashboards, // FIXME: Add an abstraction around dashboards.
-            summary: rawResponse.summary,
+            summaryPages: rawResponse.summaryPages,
         }
     }
 }

Modified: trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js (206464 => 206465)


--- trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js	2016-09-27 21:05:50 UTC (rev 206464)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js	2016-09-27 21:54:38 UTC (rev 206465)
@@ -3,8 +3,9 @@
 
     constructor(summarySettings)
     {
-        super('Summary', null);
+        super(summarySettings.name, null);
 
+        this._route = summarySettings.route;
         this._table = {
             heading: summarySettings.platformGroups,
             groups: [],
@@ -26,7 +27,7 @@
         }
     }
 
-    routeName() { return 'summary'; }
+    routeName() { return `summary/${this._route}`; }
 
     open(state)
     {
@@ -37,7 +38,7 @@
         for (var group of this._configGroups)
             group.fetchAndComputeSummary(timeRange).then(this.render.bind(this));
     }
-    
+
     render()
     {
         Instrumentation.startMeasuringTime('SummaryPage', 'render');
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to