1 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
3 Build fix after r196440.
5 * public/v3/models/test-group.js:
6 (TestGroup.prototype.addBuildRequest): Clear the map instead of setting the property to null.
8 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
10 Perf dashboard should have UI to retry A/B testing
11 https://bugs.webkit.org/show_bug.cgi?id=154090
13 Reviewed by Chris Dumez.
15 Added a button to re-try an existing A/B testing group with a custom repetition count. The same button functions
16 as a way of confirming the progression/regression when there have been no A/B testing scheduled in the task.
18 Also fixed the bug that A/B testing groups that have been waiting for other test groups will be shown as "running".
20 * public/v3/components/results-table.js:
21 (ResultsTable.cssTemplate): Don't pad the list of extra repositories when it's empty.
23 * public/v3/components/test-group-results-table.js:
24 (TestGroupResultsTable.prototype.buildRowGroups): Use TestGroup.labelForRootSet instead of manually
25 computing the letter for each configuration set.
27 * public/v3/models/build-request.js:
28 (BuildRequest.prototype.hasStarted): Added.
30 * public/v3/models/data-model.js:
31 (DataModelObject.ensureSingleton): Added.
32 (DataModelObject.cachedFetch): Added noCache option. This is used when re-fetching the test groups after
35 * public/v3/models/measurement-cluster.js:
36 (MeasurementCluster.prototype.startTime): Added.
38 * public/v3/models/measurement-set.js:
39 (MeasurementSet.prototype.hasFetchedRange): Added. Returns true only if there are no "holes" (cluster
40 yet to be fetched) between the specified time range. This was added to fix a bug in AnalysisTaskPage's
43 * public/v3/models/test-group.js:
44 (TestGroup): Added this._rootSetToLabel.
45 (TestGroup.prototype.addBuildRequest): Reset this._rootSetToLabel along with this._requestedRootSets.
46 (TestGroup.prototype.repetitionCount): Added. Returns the number of iterations executed per set. We assume that
47 every root set in the test group shares a single repetition count.
48 (TestGroup.prototype.requestedRootSets): Now populates this._rootSetToLabel for labelForRootSet.
49 (TestGroup.prototype.labelForRootSet): Added.
50 (TestGroup.prototype.hasStarted): Added.
51 (TestGroup.prototype.compareTestResults): Use 'running' and 'pending' to differentiate test groups that are waiting
52 for other groups to finish running from the ones that are actually running ('incomplete' before this patch).
53 (TestGroup.fetchByTask):
54 (TestGroup.createAndRefetchTestGroups): Added. Creates a new test group using the privileged-api/create-test-group
55 and fetches the list of test groups for the specified analysis task.
56 (TestGroup._createModelsFromFetchedTestGroups): Extracted from TestGroup.fetchByTask.
58 * public/v3/pages/analysis-task-page.js:
59 (AnalysisTaskPage): Initialize _renderedCurrentTestGroup to undefined so that we'd always can differentiate
60 the initial call to AnalysisTaskPage.render and subsequent calls in which it's identical to _currentTestGroup.
61 (AnalysisTaskPage.prototype._didFetchMeasurement): Fixed a bug that we don't exit early even when some
62 clusters in between startPoint and endPoint are still being fetched via newly added hasFetchedRange.
63 (AnalysisTaskPage.prototype.render): Update the default repetition count based on the current test group.
64 Also update the label of the button to "Confirm the change" if there is no A/B testing in this task.
65 (AnalysisTaskPage.prototype._retryCurrentTestGroup): Added. Re-triggers an existing A/B testing group or creates
66 the A/B testing for the entire range of the analysis task.
67 (AnalysisTaskPage.prototype._hasDuplicateTestGroupName): Added.
68 (AnalysisTaskPage.prototype._createRetryNameForTestGroup): Added.
69 (AnalysisTaskPage.htmlTemplate): Added form controls to re-trigger A/B testing.
70 (AnalysisTaskPage.cssTemplate): Updated the style.
72 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
74 Removed the duplicated definition of ChartPaneBase.
76 * public/v3/components/chart-pane-base.js:
78 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
80 Analysis task page on v3 UI should show charts
81 https://bugs.webkit.org/show_bug.cgi?id=154057
83 Reviewed by Chris Dumez.
85 Extracted ChartPaneBase out of ChartPane and added an instance of its new subclass, AnalysisTaskChartPane,
86 to the analysis task page. The main difference is that ChartPaneBase doesn't depend on the presence of
87 this._chartsPage unlike ChartPane. It also doesn't have the header with toolbar (to show breakdown, etc...).
89 * public/v3/components/base.js:
90 (ComponentBase.prototype._constructShadowTree): Call htmlTemplate() and cssTemplate() with the right "this".
92 * public/v3/components/chart-pane-base.js: Added.
93 (ChartPaneBase): Extracted from ChartPane.
94 (ChartPaneBase.prototype.configure): Extracted from the constructor. Separating this function allows the
95 component to be instantiated inside a HTML template.
96 (ChartPaneBase.prototype._fetchAnalysisTasks): Moved from ChartPane._fetchAnalysisTasks.
97 (ChartPaneBase.prototype.platformId): Ditto.
98 (ChartPaneBase.prototype.metricId): Ditto.
99 (ChartPaneBase.prototype.setOverviewDomain): Ditto.
100 (ChartPaneBase.prototype.setMainDomain): Ditto.
101 (ChartPaneBase.prototype._overviewSelectionDidChange): Extracted from the constructor. This is overridden in
102 ChartPane and unused in AnalysisTaskChartPane.
103 (ChartPaneBase.prototype._mainSelectionDidChange): Extracted from ChartPane._mainSelectionDidChange.
104 (ChartPaneBase.prototype._mainSelectionDidZoom): Extracted from ChartPane._mainSelectionDidZoom.
105 (ChartPaneBase.prototype._indicatorDidChange): Extracted from ChartPane._indicatorDidChange.
106 (ChartPaneBase.prototype._didFetchData): Moved from ChartPane._fetchAnalysisTasks.
107 (ChartPaneBase.prototype._openAnalysisTask): Ditto.
108 (ChartPaneBase.prototype._openCommitViewer): Ditto. Also fixed a bug that we don't show the spinner while
109 waiting for the data to be fetched by calling this.render() here.
110 (ChartPaneBase.prototype._keyup): Moved from ChartPane._keyup. Also fixed the bug that the revisions list
111 doesn't update by calling this.render() here.
112 (ChartPaneBase.prototype.render): Extracted from ChartPane.render.
113 (ChartPaneBase.htmlTemplate): Extracted from ChartPane.htmlTemplate.
114 (ChartPaneBase.paneHeaderTemplate): Added. This is overridden in ChartPane and unused in AnalysisTaskChartPane.
115 (ChartPaneBase.cssTemplate): Extracted from ChartPane.htmlTemplate.
117 * public/v3/components/chart-styles.js: Renamed from public/v3/pages/page-with-charts.js.
118 (PageWithCharts): Renamed from PageWithCharts since it no longer extends PageWithHeading.
119 (ChartStyles.createChartSourceList):
121 * public/v3/components/commit-log-viewer.js:
122 (CommitLogViewer.prototype.view): Set this._repository right away instead of waiting for the fetched data
123 so that spinner will be shown while the data is being fetched.
125 * public/v3/index.html:
127 * public/v3/pages/analysis-task-page.js:
128 (AnalysisTaskChartPane): Added extends ChartPaneBase.
129 (AnalysisTaskPage): Added. this._chartPane.
130 (AnalysisTaskPage.prototype._didFetchTask): Initialize this._chartPane with a domain.
131 (AnalysisTaskPage.prototype.render): Render this._chartPane.
132 (AnalysisTaskPage.htmlTemplate):
134 * public/v3/pages/chart-pane-status-view.js:
135 (ChartPaneStatusView): Removed the unused router from the argument list.
136 (ChartPaneStatusView.prototype.pointsRangeForAnalysis): Renamed from analyzeData() since it was ambiguous.
137 (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Fixed the bug that we don't update the list
138 of the revisions here.
139 (ChartPaneStatusView.prototype.computeChartStatusLabels):
141 * public/v3/pages/chart-pane.js:
142 (ChartPane): Now extends ChartPaneBase.
143 (ChartPane.prototype._overviewSelectionDidChange): Extracted from the constructor.
144 (ChartPane.prototype._mainSelectionDidChange):
145 (ChartPane.prototype._mainSelectionDidZoom):
146 (ChartPane.prototype._indicatorDidChange):
147 (ChartPane.prototype.render):
148 (ChartPane.prototype._renderActionToolbar):
149 (ChartPane.paneHeaderTemplate): Extracted from htmlTemplate.
150 (ChartPane.cssTemplate):
151 (ChartPane.overviewOptions.selection.onchange): Deleted.
152 (ChartPane.prototype._fetchAnalysisTasks): Deleted.
153 (ChartPane.prototype.platformId): Deleted.
154 (ChartPane.prototype.metricId): Deleted.
155 (ChartPane.prototype.setOverviewDomain): Deleted.
156 (ChartPane.prototype.setMainDomain): Deleted.
157 (ChartPane.prototype._openCommitViewer): Deleted.
158 (ChartPane.prototype._didFetchData): Deleted.
159 (ChartPane.prototype._keyup): Deleted.
161 * public/v3/pages/charts-page.js:
163 (ChartsPage.createDomainForAnalysisTask): Extracted by createDomainForAnalysisTask; used to set the domain
164 of the charts in the analysis task page.
165 (ChartsPage.createStateForAnalysisTask):
167 * public/v3/pages/dashboard-page.js:
169 (DashboardPage.prototype._createChartForCell):
171 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
173 Add the support for maintenance mode
174 https://bugs.webkit.org/show_bug.cgi?id=154072
176 Reviewed by Chris Dumez.
178 Added the crude support for maintenance mode whereby which the reports are stored in the filesystem
179 instead of the database.
181 * config.json: Added maintenanceMode and maintenanceDirectory as well as forgotten siteTitle and
182 remoteServer.httpdMutexDir.
183 * public/api/report.php:
184 (main): Don't connect to the database or modify database when maintenanceMode is set.
185 * public/include/json-header.php:
186 (ensure_privileged_api_data): Exit with InMaintenanceMode when maintenanceMode is set. This prevents
187 privileged API such as creating analysis tasks and new A/B testing groups from modifying the database.
189 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
191 Analysis task page on v3 show progression as regressions
192 https://bugs.webkit.org/show_bug.cgi?id=154045
194 Reviewed by Chris Dumez.
196 The bug was caused by TestGroup.compareTestResults referring to undefined _smallerIsBetter.
197 Retrieve it from the associated metric object via the owner analysis task.
199 * public/v3/models/test-group.js:
201 2016-02-05 Ryosuke Niwa <rniwa@webkit.org>
203 Testing with remote server cache is unusably slow
204 https://bugs.webkit.org/show_bug.cgi?id=153928
206 Reviewed by Chris Dumez.
208 Don't use the single process mode of httpd as it's way too slow even for testing.
209 Also we'll hit a null pointer crash (http://svn.apache.org/viewvc?view=revision&revision=1711479)
211 Since httpd exits immediately when launched in multi-process mode, remote-cache-server.py (renamed from
212 run-with-remote-server.py) now has "start" and "stop" commands to start/stop the Apache. Also added
213 "reset" command to reset the cache for convenience.
215 * Install.md: Updated the instruction.
216 * config.json: Fixed a typo: httpdErro*r*Log.
217 * tools/remote-cache-server.py: Copied from Websites/perf.webkit.org/tools/run-with-remote-server.py.
218 Now takes one of the following commands: "start", "stop", and "reset".
220 (start_httpd): Extracted from main.
222 * tools/remote-server-relay.conf: Removed redundant (duplicate) LoadModule's.
223 * tools/run-with-remote-server.py: Removed.
225 2016-02-04 Ryosuke Niwa <rniwa@webkit.org>
227 Perf dashboard should have a script to setup database
228 https://bugs.webkit.org/show_bug.cgi?id=153906
230 Reviewed by Chris Dumez.
232 Added tools/setup-database.py to setup the database. It retrieves the database name, username, password
233 and initializes a database at the specified location.
235 * Install.md: Updated instruction to setup postgres to use setup-database.py.
236 * tools/setup-database.py: Added.
238 (load_database_config):
239 (determine_psql_dir):
240 (start_or_stop_database):
241 (execute_psql_command):
243 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
245 buildbot syncing scripts sometimes schedule more than one requests per builder
246 https://bugs.webkit.org/show_bug.cgi?id=153047
248 Reviewed by Chris Dumez.
250 The bug was caused by the check for singularity of scheduledRequests being conducted per configuration
251 instead of per builder. So if there were multiple test configurations (e.g. Speedometer and Octane) that
252 both used the same builder, then we may end up scheduling both at once.
254 Fixed the bug by sharing a single set to keep track of the scheduled requests for all configurations per
257 * tools/sync-with-buildbot.py:
258 (load_config): Share a set amongst test configurations for each builder.
259 (find_request_updates): Instead of creating a new set for each configuration, reuse the existing sets to
260 share a single set agmonst test configurations for each builder.
262 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
264 Analysis results viewer sometimes doesn't show the correct relative difference
265 https://bugs.webkit.org/show_bug.cgi?id=152930
267 Reviewed by Chris Dumez.
269 The bug was caused by single A/B testing result associated with multiple rows when there are multiple data
270 points with the same root set which matches that of an A/B testing.
272 Fixed the bug by detecting such a case, and only associating each A/B testing result with the row created
273 for the first matching point.
275 * public/v3/components/analysis-results-viewer.js:
276 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
278 2016-01-08 Ryosuke Niwa <rniwa@webkit.org>
280 Make v3 UI analysis task page is hard to understand
281 https://bugs.webkit.org/show_bug.cgi?id=152917
283 Reviewed by Antti Koivisto.
285 Add a dark gray border around the selected block in the analysis results viewer instead of using darker
286 shades since that looks as if they were bigger regression/progression.
288 Explicitly show "Failed" as the label instead of omitting with "-" when all build requests in an A/B
291 * public/v3/components/analysis-results-viewer.js:
292 (AnalysisResultsViewer.cssTemplate): Tweaked the style to underline text in the hovered blocks and the
293 selected blocks and show a dark gray border around the selected blocks.
294 (AnalysisResultsViewer.TestGroupStackingBlock):
295 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Use this._title for title.
296 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
297 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForRootSet): Deleted.
299 * public/v3/components/results-table.js:
300 (ResultsTable.prototype.render):
301 (ResultsTable.prototype._createRevisionListCells): Extracted from ResultsTable.prototype.render.
302 (ResultsTable.cssTemplate): Tweaked the style.
304 (ResultsTableRow.prototype.constructor): Added _labelForWholeRow to store the label for the entire row.
305 This is used to show the comparison result of two root sets (e.g. A vs B).
306 (ResultsTableRow.prototype.setLabelForWholeRow): Added.
307 (ResultsTableRow.prototype.labelForWholeRow): Added.
308 (ResultsTableRow.prototype.resultContent): Extracted from buildHeading. Creates a hyperlinked bar graph
309 used for each A/B testing result.
310 (ResultsTableRow.prototype.buildHeading): Deleted since we need to set colspan on the second table cell
311 when we're creating a row with _labelForWholeRow.
313 * public/v3/components/test-group-results-table.js:
314 (TestGroupResultsTable.prototype.buildRowGroups): Added rows to show relative differences and statistical
315 significance between root sets (e.g. A vs B).
317 * public/v3/models/build-request.js:
318 (BuildRequest.prototype.hasCompleted): Added.
320 * public/v3/models/test-group.js:
321 (TestGroup.prototype.compareTestResults): Extracted from AnalysisResultsViewer.TestGroupStackingBlock's
322 _computeTestGroupStatus and generalized to be reused in TestGroupResultsTable.
323 (TestGroup.prototype._valuesForRootSet): Moved from AnalysisResultsViewer.TestGroupStackingBlock.
325 * public/v3/pages/analysis-task-page.js:
326 (AnalysisTaskPage.cssTemplate): Tweaked the style.
328 2016-01-07 Ryosuke Niwa <rniwa@webkit.org>
330 Perf dashboard should automatically add aggregators
331 https://bugs.webkit.org/show_bug.cgi?id=152818
333 Reviewed by Chris Dumez.
335 When an aggregator entry is missing in aggregators table, automatically insert it in /api/report.
337 In a very early version of the perf dashboard, we had the ability to define a custom aggregator
338 in an admin page. In practice, nobody used or needed this feature so we got rid of it even before
339 the dashboard was landed into WebKit repository. This patch cleans up that mess.
342 (main): Added the filtering capability.
343 (TestEnvironment): Expose the config JSON in the test environment.
345 * public/include/report-processor.php:
346 (ReportProcessor): Renamed name_to_aggregator now that it only contains ID.
347 (ReportProcessor::__construct): No longer fetches the aggregator table. An equivalent work is done
348 in newly added ensure_aggregators.
349 (ReportProcessor::process): Calls ensure_aggregators which populates name_to_aggregator_id.
350 (ReportProcessor::ensure_aggregators): Added. Add the builtin aggregators: Arithmetic, Geometric,
352 (TestRunsGenerator): Renamed name_to_aggregator now that it only contains ID.
353 (TestRunsGenerator::__construct):
354 (TestRunsGenerator::add_aggregated_metric): Don't include aggregator_definition here since it's
355 never used now that all the aggregations are done natively in PHP.
356 (TestRunsGenerator::$aggregators): Added. We don't include SquareSum since it's only used for
357 computing run_square_sum_cache in test_runs table and it's useless elsewhere.
358 (TestRunsGenerator::aggregate_values): Add a comment about that.
360 * tests/api-report.js: Updated a test case to reflect the change.
362 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
364 Perf dashboard JSON API should fail gracefully when postgres is down
365 https://bugs.webkit.org/show_bug.cgi?id=152812
367 Reviewed by Chris Dumez.
369 Even though all JSON APIs returned DatabaseConnectionFailure as the status when Database::connect
370 returned a falsy value, PHP was spitting out warnings and producing HTTP responses that cannot be
371 parsed as a JSON when pg_connect failed.
373 Fixed the bug by suppressing warning messages in pg_connect.
375 * public/include/db.php:
376 (Database::connect): Use '@' prefix to suppress warning messages.
378 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
380 Perf dashboard should auto-generate manifest file when one is missing
381 https://bugs.webkit.org/show_bug.cgi?id=152813
383 Reviewed by Chris Dumez.
385 When /data/manifest.json is missing, fall back to newly added /api/manifest instead of
386 silently failing to show the UI. This will make the initial setup easier.
388 * public/api/manifest.php: Added.
390 * public/include/manifest.php:
391 (Manifest::manifest): Added.
394 (didFetchManifest): Extracted from fetchManifest.
396 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
398 Commit another forgotten change, this time, for r194653.
400 * public/v3/models/measurement-set.js:
402 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
404 The sampling of time series on v3 UI is too aggressive
405 https://bugs.webkit.org/show_bug.cgi?id=152804
407 Reviewed by Chris Dumez.
409 Fixed a bug that we were always halving the number of data points in _sampleTimeSeries
410 and increased the number of data points allowed to make the sampling less aggressive.
412 * public/v3/components/time-series-chart.js:
413 (TimeSeriesChart.prototype._ensureSampledTimeSeries): Increase the number of maximum points
414 to 2x the number of pixels divided by the radius of each point.
415 (TimeSeriesChart.prototype._sampleTimeSeries.findMedian): Changed the semantics of endIndex
416 to mean the index after the last point and renamed it to indexAfterEnd.
417 (TimeSeriesChart.prototype._sampleTimeSeries): Fixed a bug that this code always coerced two
418 data points into one sampled data point despite of the fact i and j are sufficiently apart
419 since data[j].time - data[i].time > timePerSample by definition.
421 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
423 Commit the forgotten change for r194651.
425 * public/v3/pages/domain-control-toolbar.js:
426 (DomainControlToolbar.prototype.setStartTime):
428 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
430 The right hand side of main chart appears to be cut off as you zoom out on v3 UI
431 https://bugs.webkit.org/show_bug.cgi?id=152778
433 Reviewed by Antti Koivisto.
435 Add a padding on x-axis after the end time to make the main chart more easily interactive.
437 * public/v3/components/time-series-chart.js:
438 (TimeSeriesChart.prototype._computeHorizontalRenderingMetrics):
440 * public/v3/pages/page-with-charts.js:
441 (PageWithCharts.mainChartOptions): Add a padding of 5px at the end of x-axis.
443 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
445 v3 UI should use four sig-figs to label y-axis of the main charts
446 https://bugs.webkit.org/show_bug.cgi?id=152779
448 Reviewed by Antti Koivisto.
450 Increase the number of significant figures used in the main charts to four as done in v2 UI.
452 * public/v3/pages/chart-pane.js:
453 (ChartPane.constructor): Create a formatter with four significant figures.
454 * public/v3/pages/page-with-charts.js:
455 (PageWithCharts.mainChartOptions): Increase the width of y-axis labels.
457 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
459 v3 UI's time range slider is harder to use than that of v2 UI
460 https://bugs.webkit.org/show_bug.cgi?id=152780
462 Reviewed by Antti Koivisto.
464 Improved the time range slider by using a cubic mapping to time range and providing a text field
465 to directly edit the number of days to show.
467 Now an user can enter the text mode to directly edit the number of days to show by clicking on
468 the number of days (text field is always there with opacity=0).
470 * public/v3/pages/charts-toolbar.js:
471 (ChartsToolbar): Store the minimum and maximum number of days allowed. Also rename _inputElement
472 to _slider and added a new type=number text field as _editor.
473 (ChartsToolbar.prototype.render):
474 (ChartsToolbar.prototype.setStartTime): Exit the text mode when the number of days is changed by
475 an URL state transition (i.e. back/forward navigation).
476 (ChartsToolbar.prototype._setInputElementValue): Added. Updates the values of _slider and _editor.
477 (ChartsToolbar.prototype._enterTextMode): Added. Hide the elements used by the slider mode and
479 (ChartsToolbar.prototype._exitTextMode): Added. Does the opposite.
480 (ChartsToolbar.prototype._sliderValueMayHaveChanged): Renamed from _inputValueMayHaveChanged.
481 (ChartsToolbar.prototype._editorValueMayHaveChanged): Added. Similar to _sliderValueMayHaveChanged
482 but also corrects the value of _editor if needed.
483 (ChartsToolbar.prototype._callNumberOfDaysCallback): Extracted from _inputValueMayHaveChanged.
484 Also fixed a bug that we didn't update the URL state when the change event was fired without
485 modifying the effective number of days.
486 (ChartsToolbar.cssTemplate): Tweaked the style to support the new mode. Also set a fixed width on
487 the span showing the number of days in the slider mode.
489 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
491 Zooming button is broken on v3 UI
492 https://bugs.webkit.org/show_bug.cgi?id=152777
494 Reviewed by Chris Dumez.
496 Bring up the zoom button in z-index so that users can click it.
498 * public/v3/components/interactive-time-series-chart.js:
499 (InteractiveTimeSeriesChart.cssTemplate):
501 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
503 v3 UI doesn't preserve the time range when charts page is opened from a dashboard
504 https://bugs.webkit.org/show_bug.cgi?id=152776
506 Reviewed by Chris Dumez.
508 Fixed the bug by moving the construction of charts URL from DashboardPage.prototype.open to
509 DashboardPage.prototype.render and re-rendering the entire page upon an URL state transition.
511 * public/v3/pages/charts-page.js:
512 (ChartsPage.createStateForDashboardItem): Takes the start time for the charts page.
514 * public/v3/pages/dashboard-page.js:
515 (DashboardPage.prototype.updateFromSerializedState): Merged _numberOfDaysDidChange and
516 _updateChartsDomainFromToolbar into this function since they're not used elsewhere. Also re-render
517 the entire page when transition between different number of days to show.
518 (DashboardPage.prototype._numberOfDaysDidChange): Deleted.
519 (DashboardPage.prototype._updateChartsDomainFromToolbar): Deleted.
520 (DashboardPage.prototype.render): Construct URL for each charts here.
521 (DashboardPage.prototype._createChartForCell): Don't construct URL here since this function is
522 called once when the dashboard page is opened, and not when the time range is changed.
524 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
526 Build fix for an old version of PHP after r194618.
528 * public/api/measurement-set.php:
530 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
532 A/B testing results should be visualized intuitively on v3 UI
533 https://bugs.webkit.org/show_bug.cgi?id=152496
535 Rubber-stamped by Chris Dumez.
537 Add the "stacking block" view of A/B testing results to the analysis task page on v3 UI.
539 The patch enhances JSON APIs at /api/analysis-task /api/measurement-set/ to reduce the number of
540 HTTP requests, and adds two UI components: TestGroupResultsTable and AnalysisResultsViewer both
541 of which inherits from an abstract superclass: ResultsTable.
543 ResultsTable provides a tabular presentation of measured values in regular measurement sets and
544 A/B testing results using groups of bar graphs created by BarGraphGroup. TestGroupResultsTable
545 inherits from this class to display A/B testing configurations and the averaged results for each
546 configuration, and AnalysisResultsViewer inherits from it to provide an intuitive visualization
547 of the outcomes of all A/B testing results associated with a given analysis task.
549 * public/api/analysis-tasks.php:
550 (main): Add the capability to find the analysis task based on its build request.
551 This allows /v3/#/analysis/task/?buildRequest=<id> to be hyperlinked on buildbot page.
553 * public/api/measurement-set.php:
554 (main): Removed the unused startTime and endTime, and added "analysisTask" to query parameters.
555 (AnalysisResultsFetcher): Added. Used to fetch measured data associated with every build request
557 (AnalysisResultsFetcher::__construct):
558 (AnalysisResultsFetcher::fetch): Unlike MeasurementSetFetcher, we fetch the list of commits and
559 list of measurements separately since there will be a lot less builds and commits than measured
560 data (since we're fetching measured values for all tests and their metrics).
561 (AnalysisResultsFetcher::fetch_commits): Fetches commits.
562 (AnalysisResultsFetcher::format_measurement): Like MeasurementSetFetcher::format_measurement but
563 with config_type and config_metric since we're returning measured data for all metrics and test
565 (AnalysisResultsFetcher::format_map): Similar to MeasurementSetFetcher::format_map.
567 * public/v3/components/analysis-results-viewer.js: Added.
568 (AnalysisResultsViewer): Added.
569 (AnalysisResultsViewer.prototype.didUpdateResults): This callback is called by AnalysisTaskPage
570 when A/B testing results become available.
571 (AnalysisResultsViewer.prototype.render): Overrides ResultsTable's render to highlight the block
572 representing the currently selected test group.
574 (AnalysisResultsViewer.prototype.buildRowGroups): Creates a list of rows with "stacking blocks"
575 that visualizes A/B testing results. The algorithm works as follows: 1. Create all table rows.
576 2. Find which row is associated with each set in each test group. 3. Layout "blocks".
578 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Collects root sets from all data
579 in the measurement set as well as A/B testing **requests** (results may contain more repositories
580 than requested but they aren't interesting for the purpose of visualizing results for the entire
583 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Create table rows. First,
584 create table rows for measurement set points that have a matching test group (i.e. either set A
585 or set B of an A/B testing uses the same root set as a point). Second, insert a new row for each
586 root set in each test group which didn't find a matching measurement set point. There is a little
587 subtlety that some A/B testing may specify revisions for a subset of repositories and/or some A/B
588 testing results may appear as if it goes back in time with respect to other A/B testing results.
589 For example, consider creating two A/B test groups for WebKit changes and OS changes separately.
590 There could be no coherent linearization of those two A/B testing in which both WebKit and OS
591 versions move forward.
593 (AnalysisResultsViewer.RootSetInTestGroup): Added. Represents a pair (test group, root set) since
594 a root set could be shared by multiple test groups.
595 (AnalysisResultsViewer.TestGroupStackingBlock): Added. A stacked block representing a test group.
596 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex): Associates a row number with
597 either set A or set B.
598 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Creates a table cell
600 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Returns true if this test group
601 has failed and this block should look "thin" without any label.
602 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus): Computes the
603 status for this test group.
605 (AnalysisResultsViewer.TestGroupStackingGrid): Added. AnalysisResultsViewer uses this class to
606 layout blocks representing test groups.
607 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.insertBlockToColumn): Inserts a new block
608 to layout. We keep all test groups doing the same A/B test next to each other.
609 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.layout): Layouts each block / test group
610 in the order they are created.
611 (AnalysisResultsViewer.TestGroupStackingGrid.prototype._layoutBlock): Places the block in the
612 left-most column that can accommodate it while avoiding columns of a different thin-ness. A column
613 is thin if its A/B testing has failed, and not thin otherwise.
614 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.createCellsForRow): Creates table cells for
615 a given row. For each column, generate a table cell if we're in the first row and the first block
616 starts in a later row, a block starts in the current row, or the last block ended in the previous
617 row and the next block or the last row appears later.
619 * public/v3/components/bar-graph-group.js: Added. A component for showing a group of bar graphs.
620 (BarGraphGroup): Added. Creates a group of bar graphs with the same value range. It's used by
621 AnalysisResultsViewer and ResultsTable to show bar graphs to compare values.
622 (SingleBarGraph): A component created and collectively controlled by BarGraphGroup.
624 * public/v3/components/results-table.js: Added.
625 (ResultsTable): An abstract superclass for TestGroupResultsTable and AnalysisResultsViewer.
627 (ResultsTable.prototype.render): Renders the table. 1. Call "buildRowGroups()" implemented by
628 a subclass to obtain the list of rows. 2. Compute the list of repositories to show. 3. For each
629 cell in the table, compute the number of rows to show the same value (for rowspan). 4. Render the
630 table with an extra list of repositories if exists.
632 (ResultsTable.prototype._computeRepositoryList): Compute the list of repositories to list
633 revisions in the table. Omit repositories not present in any row or for which all rows have the
634 same revision. In the latter case, include it in the extra repositories listed below the table.
635 This minimizes the amount of redundant information presented to the user.
637 (ResultsTableRow): Added. Represents a single row in the table. ResultsTable constructs necessary
638 table cells to tabulate the associated root sets, and shows the associated result using a grouped
639 bar graph. Additional columns are used by AnalysisResultsViewer to show stacked blocks for A/B
642 * public/v3/components/test-group-results-table.js: Added.
643 (TestGroupResultsTable):
644 (TestGroupResultsTable.prototype.didUpdateResults):
645 (TestGroupResultsTable.prototype.setTestGroup):
646 (TestGroupResultsTable.prototype.heading):
647 (TestGroupResultsTable.prototype.render):
648 (TestGroupResultsTable.prototype.buildRowGroups):
650 * public/v3/index.html:
651 * public/v3/models/analysis-results.js: Added.
652 (AnalysisResults): Added. Like MeasurementSet, this class represents a set of measured values
653 associated with a given analysis task.
654 (AnalysisResults.prototype.find): Returns a measured valued for a given build and metric.
655 (AnalysisResults.prototype.add): Adds a new measured value. Used by AnalysisResults.fetch.
656 (AnalysisResults.fetch): Fetches data and creates AnalysisResults for a given analysis task.
658 * public/v3/models/analysis-task.js:
659 (AnalysisTask.prototype.startMeasurementId): Added.
660 (AnalysisTask.prototype.endMeasurementId): Added.
661 (AnalysisTask.fetchByBuildRequestId): Added.
662 (AnalysisTask._fetchSubset): Uses DataModelObject.cachedFetch.
664 * public/v3/models/build-request.js: Added.
665 (BuildRequest): Added. Represents a single A/B testing request associated with a test group.
667 * public/v3/models/builder.js:
668 (Build): Added. Represents a build associated with a given A/B testing result.
670 * public/v3/models/commit-log.js:
671 (CommitLog): Made this class inherit from DataModelObject.
672 (CommitLog.ensureSingleton): Added. Finds the singleton object created for a given revision
673 in the specified repository. This helps RootSet and other classes compare commits fast.
674 (CommitLog.prototype.repository): Added.
675 (CommitLog.fetchBetweenRevisions): Uses CommitLog.ensureSingleton.
677 * public/v3/models/data-model.js:
679 (DataModelObject.namedStaticMap): Added.
680 (DataModelObject.ensureNamedStaticMap): Renamed from namedStaticMap instead of implicitly
681 assuming that the non-static version always creates the map.
682 (DataModelObject.prototype.namedStaticMap): Added.
683 (DataModelObject.cachedFetch): Extracted from AnalysisTask._fetchSubset so that TestGroup's
684 fetchByTask could also use it.
687 * public/v3/models/measurement-adaptor.js: Added.
688 (MeasurementAdaptor): Extracted from MeasurementCluster. This class is responsible for
689 re-formatting the data received via /api/measurement-set JSON API inside the v3 UI.
690 (MeasurementAdaptor.prototype.extractId): Added.
691 (MeasurementAdaptor.prototype.adoptToAnalysisResults): Added. Used by AnalysisResults.
692 (MeasurementAdaptor.aggregateAnalysisResults): Added. Used by TestGroupResultsTable to
693 aggregate results for each test configuration; e.g. computing the average for set A.
694 (MeasurementAdaptor.prototype.adoptToSeries): Extracted from MeasurementCluster.addToSeries.
695 Added rootSet() to each point. This allows AnalysisResultsViewer to compare them against root
696 sets associated with A/B testing results.
697 (MeasurementAdaptor.computeConfidenceInterval): Moved from MeasurementCluster.
699 * public/v3/models/measurement-cluster.js:
700 (MeasurementCluster):
701 (MeasurementCluster.prototype.addToSeries):
703 * public/v3/models/repository.js:
704 (Repository.prototype.hasUrlForRevision): Added.
706 * public/v3/models/root-set.js: Added.
707 (RootSet): Added. Represents a set of commits in measured results.
708 (MeasurementRootSet): Added. Ditto for results associated with A/B testing.
710 * public/v3/models/test-group.js: Added.
711 (TestGroup): Added. Represents a A/B testing on analysis task.
712 (TestGroup.prototype.createdAt): Added.
713 (TestGroup.prototype.buildRequests): Returns the list of build requests associated with this
715 (TestGroup.prototype.addBuildRequest): Added. Used by BuildRequest's constructor to associate
716 itself with this group.
717 (TestGroup.prototype.didSetResult): Added. Called by BuildRequest.setResult when measured
718 values are fetched and associated with a build request in this group.
720 * public/v3/models/test.js:
723 * public/v3/pages/analysis-task-page.js:
725 (AnalysisTaskPage.prototype.updateFromSerializedState): Fetch the analysis task, test groups
726 associated with it, and all A/B testing results based on the task id or the build request id
727 specified in the URL.
728 (AnalysisTaskPage.prototype._didFetchTask): Added. Start fetching the measured data. This is
729 the data on charts page for which this analysis task was created, not results of A/B testing.
730 (AnalysisTaskPage.prototype._didFetchMeasurement): Added. Display the fetched data in a table
731 inside AnalysisResultsViewer.
732 (AnalysisTaskPage.prototype._didFetchTestGroups): Added. Display the list of A/B test groups
733 as well as the results of the first A/B testing.
734 (AnalysisTaskPage.prototype._didFetchAnalysisResults): Added.
735 (AnalysisTaskPage.prototype._assignTestResultsIfPossible): Added. Once both the analysis task,
736 A/B test groups as well as their results are fetched, update build requests in each test group
738 (AnalysisTaskPage.prototype.render): Show the list of test groups and highlight the currently
740 (AnalysisTaskPage.prototype._showTestGroup): Added. A callback used by AnalysisResultsViewer
741 and TestGroupResultsTable to notify this class when the user selects a new test group.
742 (AnalysisTaskPage.htmlTemplate): Updated the template.
743 (AnalysisTaskPage.cssTemplate): Ditto.
745 * public/v3/pages/charts-page.js:
746 (ChartsPage.createStateForAnalysisTask): Added. Creates a URL state object for opening a chart
747 associated with an analysis task.
749 2015-12-22 Ryosuke Niwa <rniwa@webkit.org>
751 Analysis task page is slow to load
752 https://bugs.webkit.org/show_bug.cgi?id=152517
754 Reviewed by Andreas Kling.
756 The slowness comes from r194130 which made the JSON API at /api/analysis-tasks to report the start
757 and the end of each analysis task. This query was adding ~2s to the total JSON generation time.
759 Cache these values on analysis_task table since they never change once an analysis task is created.
761 * init-database.sql: Added columns task_start_run_time and task_end_run_time to analysis_task table.
762 Also added the missing drop statements at the top.
764 * public/api/analysis-tasks.php:
765 (fetch_and_push_bugs_to_tasks): Don't fetch the latest commit time of the start and the end.
766 (format_task): Report task_start_run_time and task_end_run_time as startRunTime and endRunTime.
768 * public/privileged-api/create-analysis-task.php:
769 (main): Set start_run_time and end_run_time when creating an analysis task.
770 (time_for_run): Added.
772 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
774 v3 UI shouldn't open/close pane selector by mouseenter/leave
775 https://bugs.webkit.org/show_bug.cgi?id=152399
777 Reviewed by Andreas Kling.
779 Removed the code to open and close the pane selector by mouseenter and mouseleave
780 since multiple people have complained about the behavior.
782 * public/v3/pages/charts-toolbar.js:
783 (ChartsToolbar): Removed the event listeners.
784 (ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
785 to better support the use case of adding multiple panes.
786 (ChartsToolbar.cssTemplate): Tweaked CSS.
788 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
790 Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
791 https://bugs.webkit.org/show_bug.cgi?id=152389
793 Reviewed by Darin Adler.
795 Compute the x coordinate of the popover from the center of each annotation bar.
797 Also adjust the x coordinate to keep the popover within the charts.
799 * public/v3/components/interactive-time-series-chart.js:
800 (InteractiveTimeSeriesChart.prototype._renderChartContent):
802 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
804 Dashboard charts should have uniform widths on v3 UI
805 https://bugs.webkit.org/show_bug.cgi?id=152395
807 Reviewed by Chris Dumez.
809 Fix the bug by applying table-layout: fixed on the dashboard table.
811 * public/v3/pages/dashboard-page.js:
812 (DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
813 (DashboardPage.cssTemplate): Adjusted CSS accordingly.
815 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
817 Closing a pane on v3 UI always closes the last pane
818 https://bugs.webkit.org/show_bug.cgi?id=152388
820 Reviewed by Chris Dumez.
822 The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
823 Fixed it by passing in "this" pane object to the first argument.
825 * public/v3/pages/chart-pane.js:
828 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
830 Perf Dashboard v3 UI doesn't show recent data points on v2 UI
831 https://bugs.webkit.org/show_bug.cgi?id=152368
833 Reviewed by Chris Dumez.
835 The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
836 which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
837 to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
839 !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
841 Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
843 * public/api/measurement-set.php:
844 (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
845 * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
846 of the last modified date depends on when tests run, we can't assert it to be a certain value.
848 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
850 v3 UI should show and link the build number on charts page
851 https://bugs.webkit.org/show_bug.cgi?id=152359
853 Reviewed by Chris Dumez.
855 Show the hyperlinked build number in the v3 UI.
857 * public/v3/models/builder.js:
858 (Builder): Renamed _buildURL to _buildUrlTemplate.
859 (Builder.prototype.urlForBuild): Added.
860 * public/v3/pages/chart-pane-status-view.js:
861 (ChartPaneStatusView):
862 (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
863 (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
864 if the current point is set by an indicator (not by a selection).
866 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
868 v3 dashboard doesn't stretch charts to fill the screen
869 https://bugs.webkit.org/show_bug.cgi?id=152354
871 Reviewed by Chris Dumez.
873 The bug was caused by a workaround to avoid canvas stretching table cell too much.
875 Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
876 so that it does not contribute to the intrinsic/natural width of the cell.
878 * public/v3/components/time-series-chart.js:
879 (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
880 (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
881 the canvas does not resize with it.
882 * public/v3/pages/dashboard-page.js:
883 (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
885 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
887 The chart status on v3 UI sometimes show wrong revision ranges
888 https://bugs.webkit.org/show_bug.cgi?id=152331
890 Reviewed by Chris Dumez.
892 The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
893 when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
894 finds the sampled data point immediately preceding the current point (at which the indicator is shown).
896 * public/v3/components/chart-status-view.js:
897 (ChartStatusView.prototype.updateStatusIfNeeded):
899 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
901 Perf dashboard's cycler page should use v3 UI
902 https://bugs.webkit.org/show_bug.cgi?id=152324
904 Reviewed by Chris Dumez.
906 Use the v3 UI in cycler.html after r194130.
908 * public/cycler.html:
909 * public/v3/index.html: Removed the reference to a non-existent platform-selector.js.
911 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
913 Add v3 UI to perf dashboard
914 https://bugs.webkit.org/show_bug.cgi?id=152311
916 Reviewed by Chris Dumez.
918 Add the third iteration of the perf dashboard UI. UI for viewing and modifying analysis tasks is coming soon.
919 The v3 UI is focused on speed, and removes all third-party script dependencies including jQuery, d3, and Ember.
920 Both the DOM-based UI and graphing are implemented manually.
923 The entire app is structured using new component library implemented in components/base.js. Each component is
924 an instance of a subclass of ComponentBase which owns a single DOM element. Each subclass may supply static
925 methods named htmlTemplate and cssTemplate as the template for a component instance. ComponentBase automatically
926 clones the templates inside the associated element (or its shadow root on the supported browsers). Each subclass
927 must supply a method called "render()" which constructs and updates the DOM as needed.
929 There is a special component called Page, which represents an entire page. Each Page is opened by PageRouter's
930 "route()" function. Each subclass of Page supplies "open()" for initialization and "updateFromSerializedState()"
931 for a hash URL transition.
934 The key feature of the v3 UI is the split of time series into chunks called clusters (see r194120). On an internal
935 instance of the dashboard, the v2 UI downloads 27MB of data whereas the same page loads only 3MB of data in the v3.
936 The key logic for fetching time series in chunks is implemented by MeasurementSet in /v3/models/measurement-set.js.
937 We first fetch the cached primary cluster (the cluster that contains the newest data) at:
938 /data/measurement-set-<platform-id>-<metric-id>.json
940 If that's outdated according to lastModified in manifest.json, then we immediately re-fetch the primary cluster at:
941 /api/measurement-set/?platform=<platform-id>&metric=<metric-id>
943 Once the up-to-date primary cluster is fetched, we fetch all "secondary" clusters. For each cluster being fetched,
944 including the primary, we invoke registered callbacks.
947 In addition, the v3 UI reduces the initial page load time by loading a single bundled JS file generated by
948 tools/bundle-v3-scripts.py. index.html has a fallback to load all 44 JS files individually during development.
950 * public/api/analysis-tasks.php:
951 (fetch_and_push_bugs_to_tasks): Added the code to fetch start and end run times. This is necessary in V3 UI
952 because no longer fetch the entire time series. See r194120 for the new measurement set JSON API.
953 (format_task): Compute the category of an analysis task based on "result" value. This will be re-vamped once
954 I add the UI for the analysis task page in v3.
956 * public/include/json-header.php:
957 (require_format): CamelCase the name.
958 (require_match_one_of_values): Ditto.
959 (validate_arguments): Renamed from require_existence_of and used in measurement-set.php landed in r194120.
962 * public/v3/components: Added.
964 * public/v3/components/base.js: Added.
965 (ComponentBase): The base component class.
966 (ComponentBase.prototype.element): Returns the DOM element associated with the DOM element.
967 (ComponentBase.prototype.content): Returns the shadow root if one exists and the associated element otherwise.
968 (ComponentBase.prototype.render): To be implemented by a subclass.
969 (ComponentBase.prototype.renderReplace): A helper function to "render" DOM contents.
970 (ComponentBase.prototype._constructShadowTree): Called inside the constructor to instantiate the templates.
971 (ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Instantiates components referred by
972 its element name inside the instantiated content.
973 (ComponentBase.isElementInViewport): A helper function. Returns true if the element is in the viewport and it has
974 non-zero width and height.
975 (ComponentBase.defineElement): Defines a custom element that can be automatically instantiated from htmlTemplate.
976 (ComponentBase.createElement): A helper function to create DOM tree to be used in "render()" method.
977 (ComponentBase._addContentToElement): A helper for "createElement".
978 (ComponentBase.createLink): A helper function to create a hyperlink or another clickable element (via callback).
979 (ComponentBase.createActionHandler): A helper function to create an event listener that prevents the default action
980 and stops the event propagation.
982 * public/v3/components/button-base.js: Added.
984 * public/v3/components/chart-status-view.js: Added.
985 (ChartStatusView): A component that reports the current status of time-series-chart. It's subclasses by
986 ChartPaneStatusView to provide additional information in the charts page's panes.
988 * public/v3/components/close-button.js: Added.
990 * public/v3/components/commit-log-viewer.js: Added.
991 (CommitLogViewer): A component that lists commit revisions along with commit messages for a range of data points.
993 * public/v3/components/interactive-time-series-chart.js: Added.
994 (InteractiveTimeSeriesChart): A subclass of InteractiveTimeSeriesChart with interactivity (selection & indicator).
995 Selection and indicator are mutually exclusive.
997 * public/v3/components/pane-selector.js: Added.
998 (PaneSelector): A component for selecting (platform, metric) pair to add in the charts page.
1000 * public/v3/components/spinner-icon.js: Added.
1002 * public/v3/components/time-series-chart.js: Added.
1003 (TimeSeriesChart): A canvas-based chart component without interactivity. It takes a source list and options as
1004 the constructor arguments. A source list is a list of measurement sets (measurement-set.js) with drawing options.
1005 This component fetches data via MeasurementSet.fetchBetween inside TimeSeriesChart.prototype.setDomain and
1006 progressively updates the charts as more data arrives. The canvas is updated on animation frame via rAF and all
1007 layout and rendering metrics are lazily computed in _layout. In addition, this component samples data before
1008 rendering the chart when there are more data points per pixel in _ensureSampledTimeSeries.
1010 * public/v3/index.html: Added. Loads bundled-scripts.js if it exists, or individual script files otherwise.
1012 * public/v3/instrumentation.js: Added. This class is used to gather runtime statistics of v3 UI. (It measures
1013 the performance of the perf dashboard UI).
1015 * public/v3/main.js: Added. Bootstraps the app.
1019 * public/v3/models: Added.
1020 * public/v3/models/analysis-task.js: Added.
1021 * public/v3/models/bug-tracker.js: Added.
1022 * public/v3/models/bug.js: Added.
1023 * public/v3/models/builder.js: Added.
1024 * public/v3/models/commit-log.js: Added.
1025 * public/v3/models/data-model.js: Added.
1026 (DataModelObject): The base class for various data objects that correspond to database tables. It supplies static
1027 hash map to find entries by id as well as other keys.
1028 (LabeledObject): A subclass of DataModelObject with the capability to find an object via its name.
1030 * public/v3/models/measurement-cluster.js: Added.
1031 (MeasurementCluster): Represents a single cluster or a chunk of data in a measurement set.
1033 * public/v3/models/measurement-set.js: Added.
1034 (MeasurementSet): Represents a measurement set.
1035 (MeasurementSet.findSet): Returns the singleton set given (metric, platform). We use singleton to avoid issuing
1036 multiple HTTP requests for the same JSON when there are multiple TimeSeriesChart that show the same graph (e.g. on
1037 charts page with overview and main charts).
1038 (MeasurementSet.prototype.findClusters): Finds the list of clusters to fetch in a given time range.
1039 (MeasurementSet.prototype.fetchBetween): Fetch clusters for a given time range and calls callback whenever new data
1040 arrives. The number of callbacks depends on the how many clusters need to be newly fetched.
1041 (MeasurementSet.prototype._fetchSecondaryClusters): Fetches non-primary (non-latest) clusters.
1042 (MeasurementSet.prototype._fetch): Issues a HTTP request to fetch a cluster.
1043 (MeasurementSet.prototype._didFetchJSON): Called when a cluster is fetched.
1044 (MeasurementSet.prototype._failedToFetchJSON): Called when the fetching of a cluster has failed.
1045 (MeasurementSet.prototype._invokeCallbacks): Invokes callbacks upon an approval of a new cluster.
1046 (MeasurementSet.prototype._addFetchedCluster): Adds the newly fetched cluster in the order.
1047 (MeasurementSet.prototype.fetchedTimeSeries): Returns a time series that contains data from all clusters that have
1049 (TimeSeries.prototype.findById): Additions to TimeSeries defined in /v2/data.js.
1050 (TimeSeries.prototype.dataBetweenPoints): Ditto.
1051 (TimeSeries.prototype.firstPoint): Ditto.
1053 * public/v3/models/metric.js: Added.
1054 * public/v3/models/platform.js: Added.
1055 * public/v3/models/repository.js: Added.
1056 * public/v3/models/test.js: Added.
1058 * public/v3/pages: Added.
1059 * public/v3/pages/analysis-category-page.js: Added. The "Analysis" page that lists the analysis tasks.
1060 * public/v3/pages/analysis-category-toolbar.js: Added. The toolbar to filter analysis tasks based on its category
1061 (unconfirmed, bisecting, identified, closed) and a keyword.
1063 * public/v3/pages/analysis-task-page.js: Added. Not implemented yet. It just has the hyperlink to the v2 UI.
1065 * public/v3/pages/chart-pane-status-view.js: Added.
1066 (ChartPaneStatusView): A subclass of ChartStatusView used in the charts page. In addition to the current value,
1067 comparison to baseline/target, it shows the list of repository revisions (e.g. WebKit revision, OS version).
1069 * public/v3/pages/chart-pane.js: Added.
1070 (ChartPane): A component a pane in the charts page. Each pane has the overview chart and the main chart. The zooming
1071 is synced across all panes in the charts page.
1073 * public/v3/pages/charts-page.js: Added. Charts page.
1074 * public/v3/pages/charts-toolbar.js: Added. The toolbar to set the number of days to show. This affects the overview
1075 chart's domain in each pane.
1077 * public/v3/pages/create-analysis-task-page.js: Added.
1078 (CreateAnalysisTaskPage): A page that gets shown momentarily while creating a new analysis task.
1080 * public/v3/pages/dashboard-page.js: Added. A dashboard page.
1081 * public/v3/pages/dashboard-toolbar.js: Added. Its toolbar with buttons to select the number of days to show.
1082 * public/v3/pages/domain-control-toolbar.js: Added. An abstract superclass of charts and dashboard toolbars.
1084 * public/v3/pages/heading.js: Added. A component for displaying the header and toolbar, if exists, on each page.
1085 * public/v3/pages/page-router.js: Added. This class is responsible for updating the URL hashes as well as opening
1086 and updating each page when the hash changes (via back/forward navigation).
1087 * public/v3/pages/page-with-charts.js: Added. An abstract subclass of page used by dashboards and charts page.
1088 Supplies helper functions for creating TimeSeriesChart options.
1089 * public/v3/pages/page-with-heading.js: Added. An abstract subclass of page that uses the heading component.
1090 * public/v3/pages/page.js: Added. The Page component.
1091 * public/v3/pages/toolbar.js: Added. An abstract toolbar component.
1093 * public/v3/remote.js: Added.
1094 (getJSON): Fetches JSON from the remote server.
1095 (getJSONWithStatus): Ditto. Rejects the response if the status is not "OK".
1096 (PrivilegedAPI.sendRequest): Posts a HTTP request to a privileged API in /privileged-api/.
1097 (PrivilegedAPI.requestCSRFToken): Creates a new CSRF token to request a privileged API post.
1099 * tools/bundle-v3-scripts.py: Added.
1100 (main): Bundles js files together and minifies them by jsmin.py for the v3 UI. Without this script, we're forced to
1101 download 44 JS files or making each JS file contain multiple classes.
1103 * tools/jsmin.py: Copied from WebInspector / JavaScriptCore code.
1105 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1107 Fix v2 UI after r194093.
1109 * public/v2/data.js:
1111 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1113 Add /api/measurement-set for v3 UI
1114 https://bugs.webkit.org/show_bug.cgi?id=152312
1116 Rubber-stamped by Chris Dumez.
1118 The new API JSON allows the front end to fetch measured data in chunks called a "cluster" as specified
1119 in config.json for each measurement set specified by the pair of a platform and a metric.
1121 When the front end needs measured data in a given time range (t_0, t_1) for a measurement set, it first
1122 fetches the primary cluster by /api/measurement-set/?platform=<platform-id>&metric=<metric-id>.
1123 The primary cluster is the last cluster in the set (returning the first cluster here is not useful
1124 since we don't typically show very old data), and provides the information needed to fetch other clusters.
1126 Fetching the primary cluster also creates JSON files at:
1127 /data/measurement-set-<platform-id>-<metric-id>-<cluster-end-time>.json
1128 to allow latency free access for secondary clusters. The front end code can also fetch the cache of
1129 the primary cluster at: /data/measurement-set-<platform-id>-<metric-id>.json.
1131 Because the front end code has to behave as if all data is fetched, each cluster contains one data point
1132 immediately before the first data point and one immediately after the last data point. This avoids having
1133 to fetch multiple empty clusters for manually specified baseline data. To support this behavior, we generate
1134 all clusters for a given measurement set at once when the primary cluster is requested.
1136 Furthermore, all measurement sets are divided at the same time into clusters so that the boundary of clusters
1137 won't shift as more data are reported to the server.
1139 * config.json: Added clusterStart and clusterSize as options.
1140 * public/api/measurement-set.php: Added.
1142 (MeasurementSetFetcher::__construct):
1143 (MeasurementSetFetcher::fetch_config_list): Finds configurations that belongs to this (platform, metric) pair.
1144 (MeasurementSetFetcher::at_end): Returns true if we've reached the end of all clusters for this set.
1145 (MeasurementSetFetcher::fetch_next_cluster): Generates the JSON data for the next cluster. We generate clusters
1146 in increasing chronological order (the oldest first and the newest last).
1147 (MeasurementSetFetcher::execute_query): Executes the main query.
1148 (MeasurementSetFetcher::format_map): Returns the mapping of a measurement field to an array index. This removes
1149 the need to have key names for each measurement and reduces the JSON size by ~10%.
1150 (MeasurementSetFetcher::format_run): Creates an array that contains data for a single measurement. The order
1151 matches that of keys in format_map.
1152 (MeasurementSetFetcher::parse_revisions_array): Added. Copied from runs.php.
1153 * tests/api-measurement-set.js: Added. Added tests for /api/measurement-set.
1155 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1157 Using fake timestamp in OS version make some results invisible
1158 https://bugs.webkit.org/show_bug.cgi?id=152289
1160 Reviewed by Stephanie Lewis.
1162 Fix various bugs after r194088.
1164 * public/api/commits.php:
1165 (format_commit): Include the commit order.
1166 * public/v2/data.js:
1167 (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
1168 * tools/pull-os-versions.py:
1169 (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
1170 (available_builds_from_command): Exit early when an exception is thrown.
1172 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1174 Fix a typo in the previous commit.
1176 * public/include/report-processor.php:
1178 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1180 Build fix after r192965. Suppress a warning about log being referred to as a closure variable.
1182 * public/include/report-processor.php:
1184 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1186 Using fake timestamp in OS version make some results invisible
1187 https://bugs.webkit.org/show_bug.cgi?id=152289
1189 Reviewed by Stephanie Lewis.
1191 Added commit_order column to explicitly order OS versions. This fixes the bug whereby which
1192 baseline results reported with only OS versions are shown with x coordinate set to 10 years ago.
1194 To migrate the existing database, run:
1195 ALTER TABLE commits ADD COLUMN commit_order integer;
1196 CREATE INDEX commit_order_index ON commits(commit_order);
1198 Then for each repository $1,
1199 UPDATE commits SET (commit_time, commit_order) = (NULL, CAST(EXTRACT(epoch from commit_time) as integer))
1200 WHERE commit_repository = $1;
1203 * init-database.sql: Added the column.
1204 * public/api/commits.php:
1205 (fetch_commits_between): Use commit_order to order commits when commit_time is missing.
1206 * public/api/report-commits.php:
1207 (main): Set commit_order.
1208 * tools/pull-os-versions.py:
1209 (OSBuildFetcher.fetch_and_report_new_builds):
1210 (OSBuildFetcher._assign_order): Renamed from _assign_fake_timestamps. Set the order instead of a fake timestmap.
1212 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1214 Perf dashboard can't merge when the destination platform is missing baseline/target
1215 https://bugs.webkit.org/show_bug.cgi?id=152286
1217 Reviewed by Stephanie Lewis.
1219 The bug was caused by the query to migrate test configurations to new platform checking
1220 configuration type and metric separately; that is, it assumes the configuration exists
1221 only if either the same type or the same metric exists in the destination.
1223 Fixed the bug by checking both conditions simultaneously for each configuration.
1225 * public/admin/platforms.php:
1226 * tests/admin-platforms.js: Added a test.
1228 2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
1230 Perf dashboard's buildbot sync config JSON duplicates too much information
1231 https://bugs.webkit.org/show_bug.cgi?id=152196
1233 Reviewed by Stephanie Lewis.
1235 Added shared, per-builder, and per-test (called type) configurations.
1237 * tools/sync-with-buildbot.py:
1239 (load_config.merge):
1241 2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
1243 Perf dashboard should avoid overflow during geometric mean computation
1244 https://bugs.webkit.org/show_bug.cgi?id=151773
1246 Reviewed by Chris Dumez.
1248 * public/include/report-processor.php:
1250 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
1252 Perf dashboard should extend baseline and target to the future
1253 https://bugs.webkit.org/show_bug.cgi?id=151511
1255 Reviewed by Darin Adler.
1257 * public/v2/data.js:
1258 (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
1259 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
1260 (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
1261 (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
1262 * public/v2/manifest.js:
1263 (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
1265 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
1267 Perf dashboard should always show comparison to baseline and target even if one is missing
1268 https://bugs.webkit.org/show_bug.cgi?id=151510
1270 Reviewed by Darin Adler.
1272 Show the comparison status against the baseline when baseline is present but target is missing.
1274 To make the code more readable, this patch splits the logic into three cases:
1275 1. Both baseline and target are present
1276 2. Only baseline is present
1277 3. Only target is present
1279 Also extracted a helper function to construct the label.
1282 (.labelForDiff): Added.
1283 (App.Pane.computeStatus):
1285 2015-11-23 Commit Queue <commit-queue@webkit.org>
1287 Unreviewed, rolling out r192716 and r192717.
1288 https://bugs.webkit.org/show_bug.cgi?id=151582
1290 The patch was incorrect. We always need at least one data
1291 point in each configuration (Requested by rniwa on #webkit).
1293 Reverted changesets:
1295 "Perf dashboard's should not include results more than 366
1297 https://bugs.webkit.org/show_bug.cgi?id=151529
1298 http://trac.webkit.org/changeset/192716
1300 "Build fix for old version of PHP."
1301 http://trac.webkit.org/changeset/192717
1303 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1305 Build fix for old version of PHP.
1307 * public/api/runs.php:
1309 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1311 Perf dashboard's should not include results more than 366 days old in JSON
1312 https://bugs.webkit.org/show_bug.cgi?id=151529
1314 Reviewed by Timothy Hatcher.
1316 Don't return results more than 366 days old in /api/runs/ JSON API.
1317 This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.
1319 * public/api/runs.php:
1320 (main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
1321 Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
1322 of doing so will be included in elapsedTime.
1323 (RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
1324 (RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
1325 (RunsGenerator::parse_revisions_array): Compute the max of commit times.
1327 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1329 Remove chartPointRadius from interactive chart component
1330 https://bugs.webkit.org/show_bug.cgi?id=151480
1332 Reviewed by Darin Adler.
1334 Replaced the parameter by CSS rules.
1336 * public/v2/chart-pane.css:
1338 (.chart .dot.foreground):
1339 (.chart .highlight):
1341 * public/v2/index.html:
1342 * public/v2/interactive-chart.js:
1343 (App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
1344 (App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):
1346 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1348 Perf dashboard's runs API uses more than 128MB of memory
1349 https://bugs.webkit.org/show_bug.cgi?id=151478
1351 Reviewed by Andreas Kling.
1353 Don't fetch all query results at once to avoid using twice as much memory as needed.
1354 Use iterative API to format each result at a time.
1356 This change is also a 5% runtime performance gain.
1358 * public/api/runs.php:
1359 (RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
1360 no longer needed as we pass in each configuration type explicitly to fetch_runs.
1361 (RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
1362 Also moved the logic to compute the last modified time here.
1363 (RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
1364 (RunsGeneratorForTestGroup):
1365 (RunsGeneratorForTestGroup::__construct):
1366 (RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.
1368 * public/include/db.php:
1369 (generate_data_file): Lock the file to avoid corruption.
1371 2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
1373 Perf dashboard always fetches charts JSON twice
1374 https://bugs.webkit.org/show_bug.cgi?id=151483
1376 Reviewed by Andreas Kling.
1378 Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
1379 obsolete (shouldRefetch is set true) or corrupt (the second closure).
1384 2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
1386 Internal perf dashboard takes forever to load
1387 https://bugs.webkit.org/show_bug.cgi?id=151430
1389 Rubber-stamped by Antti Koivisto.
1391 Fix a few performance problems with the perf dashboard v2 UI.
1394 (App.DashboardRow._createPane): Set "inDashboard" to true.
1395 (App.Pane._fetch): Immediately show the cached chart instead of waiting for the refetched data which invokes
1396 a PHP JSON API. Also don't fetch the analysis tasks when the chart is shown in the dashboard since we don't
1397 show annotate charts in the dashboard.
1399 2015-10-15 Ryosuke Niwa <rniwa@webkit.org>
1401 Unreviewed fix of a test after r190687.
1403 * tests/admin-regenerate-manifest.js:
1405 2015-10-12 Ryosuke Niwa <rniwa@webkit.org>
1407 Perf dashboard tools shouldn't require server credentials in multiple configuration files
1408 https://bugs.webkit.org/show_bug.cgi?id=149994
1410 Reviewed by Chris Dumez.
1412 Made detect-changes.js and pull-svn.py pull username and passwords from the server config JSON to reduce
1413 the number of JSON files that need to include credentials.
1415 Also made each script reload the server config after sleep to allow dynamic credential updates.
1417 In addition, change the server config JSON's format to include scheme, host, and port numbers separately
1418 instead of a url since detect-changes.js needs each value separately.
1420 This reduces the number of JSONs with credentials to two for our internal dashboard.
1422 * tools/detect-changes.js:
1423 (main): Added a property argument parsing. Now takes --server-config-json, --change-detection-config-json,
1424 and --seconds-to-sleep like other scripts.
1425 (parseArgument): Added.
1426 (fetchManifestAndAnalyzeData): Reload the server config JSON.
1427 (loadServerConfig): Added. Set settings.perfserver and settings.slave from the server config JSON. Also
1428 add settings.perfserver.host to match the old format.
1429 (configurationsForTesting): Fixed a bug that we throw an exception when a dashboard contains an empty cell.
1431 * tools/pull-os-versions.py:
1432 (main): Use load_server_config after each sleep.
1434 * tools/pull-svn.py:
1435 (main): Use load_server_config after each sleep.
1436 (fetch_commits_and_submit): Use the perf dashboard's auth as subversion credential when useServerAuth is set.
1438 * tools/sync-with-buildbot.py:
1439 (main): Use load_server_config after each sleep.
1442 (load_server_config): Extracted from python scripts. Computes server's url from scheme, host, and port number
1443 to match the old format python scripts except.
1445 2015-10-11 Ryosuke Niwa <rniwa@webkit.org>
1447 Build fix after r190817. Now that pull-os-versions store fake timestamps, we need to bypass timestamp
1448 checks for OS versions when bots try to report new results. Otherwise, we fail to process the reports
1449 with a MismatchingCommitTime error.
1451 * public/include/report-processor.php:
1452 (ReportProcessor::resolve_build_id):
1454 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
1456 Perf dashboard erroneously shows an old OS build in A/B testing range
1457 https://bugs.webkit.org/show_bug.cgi?id=149942
1459 Reviewed by Darin Adler.
1461 Ordering OS builds lexicologically turned out be a bad idea since 15A25 falls between 15A242 and 15A251.
1462 Use a fake/synthetic timestamp to force the commonly understood total order instead.
1464 Refactored pull-os-versions.py to share the server config JSON with other scripts. Also made the script
1465 support pulling multiple sources; e.g. both OS X and iOS.
1467 Also removed superfluous feature to submit results in chunks. The perf dashboard can handle thousands of
1468 revisions being submitted at once just fine.
1470 * public/api/commits.php:
1471 (main): A partial revert of r185574 since we no longer need to order builds lexicologically.
1473 * tools/pull-os-versions.py:
1474 (main): Takes --os-config-json, --server-config-json, and --seconds-to-sleep as arguments instead of
1475 a single --config argument to share the server config JSON with other scripts.
1476 (OSBuildFetcher): Extracted out of main. This class is instantiated for each OS kind (e.g. OS X).
1477 (OSBuildFetcher.__init__): Added.
1478 (OSBuildFetcher._fetch_available_builds): Extracted out of main. Fetches available builds from a website
1480 (OSBuildFetcher.fetch_and_report_new_builds): Extracted out of main. Submits the fetched builds after
1481 filtering out the ones we've already reported.
1482 (OSBuildFetcher._assign_fake_timestamps): Creates a fake timestamp to establish a total order amongst each
1483 OS X / iOS style build number such as 12A3456b.
1485 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
1487 pull-svn.py fails to sync revisions when SVN credentials is not setup
1488 https://bugs.webkit.org/show_bug.cgi?id=149941
1490 Reviewed by Chris Dumez.
1492 Added the support for specifying subversion credentials.
1494 Also added the support for pulling from multiple subversion servers. Subversion servers are specified
1495 in a JSON configuration file specified by --svn-config formatted as follows:
1500 "url": "http://svn.webkit.org/repository/webkit",
1501 "username": "webkitten",
1502 "password": "webkitten's password",
1503 "trustCertificate": true,
1504 "accountNameFinderScript":
1505 ["python", "/Volumes/Data/WebKit/Tools/Scripts/webkit-patch", "find-users"]
1510 In addition, refactored it to use the shared server config JSON for the dashboard access.
1512 * tools/pull-svn.py:
1513 (main): Now takes --svn-config-json, --server-config-json, --seconds-to-sleep and --max-fetch-count
1514 as required options instead of seven unnamed arguments.
1515 (fetch_commits_and_submit): Extracted from main. Fetches at most max_fetch_count new revisions from
1516 the subversion server, and submits them in accordance with server_config.
1517 (fetch_commit_and_resolve_author): Now takes a single repository dictionary instead of two separate
1518 arguments for name and URL to pass down the repository's authentication info to fetch_commit.
1519 (fetch_commit): Ditto. Add appropriate arguments when username and passwords are specified.
1520 (resolve_author_name_from_account): Use a list argument instead of a single string argument now that
1521 the argument comes from a JSON instead of sys.argv.
1523 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1525 Unreviewed race condition fix. Exit early when xScale or yScale is not defined.
1527 * public/v2/interactive-chart.js:
1528 (App.InteractiveChartComponent._updateRangeBarRects):
1530 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1532 Add a page that cycles through v2 dashboards
1533 https://bugs.webkit.org/show_bug.cgi?id=149907
1535 Reviewed by Chris Dumez.
1537 Add cycler.html that goes through each dashboard on v2 UI.
1539 This allows the dashboards to be cycled through on a TV screen.
1541 * public/cycler.html: Added.
1542 (loadURLAt): Appends a new iframe to load the next URL (i is the index of the dashboard to be shown)
1543 at the end of body. We don't immediately show the new iframe since it might take a while to load.
1544 (showNewFrameIfLoaded): Remove the current iframe and show the next iframe if the next dashboard has
1545 finished loading. We can't rely on DOMContentLoaded or load events because we use asynchronous XHR to
1546 load each chart's data. Instead, wait until some chart becomes available or fails to load and none of
1547 charts are still in progress to be shown.
1549 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1551 Allow custom revisions to be specified in A/B testing
1552 https://bugs.webkit.org/show_bug.cgi?id=149905
1554 Reviewed by Chris Dumez.
1556 Allow custom revision number on each "repository" when creating a test group.
1558 * public/v2/app.css:
1559 (form .analysis-group [name=customValue]): Added.
1562 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
1563 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
1564 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
1565 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
1566 revision option is selected.
1568 * public/v2/index.html: Added a text field for specifying a custom revision number.
1570 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1572 Make the site name configurable in perf dashboard
1573 https://bugs.webkit.org/show_bug.cgi?id=149894
1575 Reviewed by Chris Dumez.
1577 Added "siteTitle" as a new configuration key to specify the site name.
1579 * public/include/db.php:
1580 (config): Now takes the default value as an argument.
1581 * public/include/manifest.php:
1582 (ManifestGenerator::generate): Include siteTitle in the manifest.
1583 * public/index.html: Update the title and the heading when the manifest is loaded.
1584 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
1585 * public/v2/manifest.js:
1586 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
1588 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1590 Perf dashboard doesn't show analysis tasks anchored at outliers
1591 https://bugs.webkit.org/show_bug.cgi?id=149870
1593 Reviewed by Chris Dumez.
1595 The bug was caused by the computation of start and end times of analysis tasks being dependent on
1596 time series provided to the interactive chart component even though they are already filtered.
1598 Since the interactive chart component shouldn't be messing with the underlying data models, moved
1599 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
1600 the unfiltered time series newly exposed on ChartData.
1602 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
1604 * public/admin/fetch-from-remote.php:
1605 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
1606 and Ember can start hanging browsers (took me three hours to debug this).
1609 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
1610 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
1611 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
1612 Filter the results manually instead.
1613 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
1614 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
1615 need to call a private method on it.
1616 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
1617 This will cause chartData to be modified so just exit early and wait for getting called again.
1619 * public/v2/interactive-chart.js:
1620 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
1623 * public/v2/manifest.js:
1624 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
1625 to compute the end points of analysis tasks when their end points are outliers.
1627 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1629 Unreviewed. Fix a typo in r190645.
1631 * public/include/db.php:
1633 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1635 V2 UI shouldn't sort dashboards lexicologically
1636 https://bugs.webkit.org/show_bug.cgi?id=149856
1638 Reviewed by Chris Dumez.
1640 Don't sort the dashboards by name in App.Manifest.
1643 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
1644 * public/v2/manifest.js:
1645 (App.Manifest.._fetchedManifest):
1647 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1649 V2 UI fails to show the data for the very first point in charts
1650 https://bugs.webkit.org/show_bug.cgi?id=149857
1652 Reviewed by Chris Dumez.
1654 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
1655 Explicitly check the type of this property instead.
1657 * public/v2/data.js:
1658 (TimeSeries.prototype.seriesBetweenPoints):
1660 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1662 Perf dashboard should have the capability to test local UI with production data
1663 https://bugs.webkit.org/show_bug.cgi?id=149834
1665 Reviewed by Chris Dumez.
1667 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
1669 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
1671 * config.json: Added remote server configurations.
1672 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
1673 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
1676 * public/include/db.php:
1677 (config_path): Extracted from generate_data_file.
1678 (generate_data_file):
1679 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
1680 run-with-remote-server.py.
1681 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
1683 (abspath_from_root):
1685 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
1689 * public/js/helper-classes.js:
1691 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
1693 build-requests should use conform to JSON API format
1694 https://bugs.webkit.org/show_bug.cgi?id=146375
1696 Reviewed by Stephanie Lewis.
1698 Instead of returning single dictionary that maps root set id to a dictionary of repository names
1699 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
1700 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
1701 matches what we do in /api/test-groups.
1703 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
1704 This is useful for debugging purposes.
1706 * public/api/build-requests.php:
1707 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
1708 (update_builds): Extracted from main.
1710 * public/include/build-requests-fetcher.php:
1711 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
1712 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
1713 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
1714 Moved the logic to exit early when the root set had already been fetched here.
1716 * public/v2/analysis.js:
1717 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
1720 * tools/pull-os-versions.py:
1722 (setup_auth): Moved to util.py
1724 * tools/sync-with-buildbot.py:
1725 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
1726 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
1728 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
1729 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
1730 (config_for_request): Fixed a bug that the script blows up when the build request is missing
1731 the repository specified in the configuration. This tolerance is necessary when a new repository
1732 dependency is added but we want to run A/B tests for old builds without the dependency.
1733 (fetch_json): No longer takes auth.
1736 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
1738 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
1740 Build fix. A/B testing is broken when continuous builders report revisions out of order.
1743 (App.AnalysisTaskController.Ember.Controller.extend.):
1745 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
1747 A/B testing results should be shown even if they were submitted to different platforms
1748 https://bugs.webkit.org/show_bug.cgi?id=146219
1750 Reviewed by Andreas Kling.
1752 Fetch A/B testing results regardless of the platform to which results are submitted
1753 by providing the platform ID to which the results were submitted for each test group.
1755 * public/api/test-groups.php:
1756 (main): Include the platform id in the test groups.
1757 * public/v2/analysis.js:
1758 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
1760 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
1762 Remove unnecessary svn:executable flags
1763 https://bugs.webkit.org/show_bug.cgi?id=146107
1765 Reviewed by Alexey Proskuryakov.
1767 * public/js/helper-classes.js: Removed property svn:executable.
1768 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
1769 * public/v2/app.css: Removed property svn:executable.
1770 * public/v2/app.js: Removed property svn:executable.
1771 * public/v2/chart-pane.css: Removed property svn:executable.
1772 * public/v2/data.js: Removed property svn:executable.
1773 * public/v2/index.html: Removed property svn:executable.
1774 * public/v2/js/d3/LICENSE: Removed property svn:executable.
1775 * public/v2/js/d3/d3.js: Removed property svn:executable.
1776 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
1777 * public/v2/js/ember-data.js: Removed property svn:executable.
1778 * public/v2/js/ember.js: Removed property svn:executable.
1779 * public/v2/js/handlebars.js: Removed property svn:executable.
1780 * public/v2/js/jquery.min.js: Removed property svn:executable.
1781 * public/v2/js/statistics.js: Removed property svn:executable.
1782 * public/v2/manifest.js: Removed property svn:executable.
1783 * public/v2/popup.js: Removed property svn:executable.
1785 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1787 Reading the list of analysis tasks is extremely slow
1788 https://bugs.webkit.org/show_bug.cgi?id=146086
1790 Reviewed by Darin Adler.
1792 The bug was caused by Ember data requesting manifest.js hundreds of times.
1793 Fetch it ahead of time in each route instead.
1796 (App.AnalysisRoute.model):
1797 (App.AnalysisTaskRoute.model):
1799 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1801 Update ReadMe.md and Install.md per database changes
1802 https://bugs.webkit.org/show_bug.cgi?id=146076
1804 Reviewed by Darin Adler.
1811 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1813 Increase the popup dismissal time from 100ms to 500ms
1814 https://bugs.webkit.org/show_bug.cgi?id=146077
1816 Rubber-stamped by Andreas Kling.
1818 * public/v2/popup.js:
1819 (App.PopupView.scheduleHiding):
1821 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
1823 v2 UI should have buttons to breakdown a test
1824 https://bugs.webkit.org/show_bug.cgi?id=146010
1826 Reviewed by Chris Dumez.
1828 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
1829 as well as "Breakdown" to add all subtests' metrics.
1831 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
1832 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
1835 (App.ChartsController.addAlternativePanes): Added.
1836 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
1837 (App.TestProxyForPopup.actionName): Added.
1838 (App.TestProxyForPopup.actionArgument): Added.
1839 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
1840 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
1841 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
1842 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
1843 that are already present in the list of panes.
1844 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
1845 * public/v2/index.html:
1846 * public/v2/manifest.js:
1847 (App.Metric.childMetrics): Added.
1849 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1851 Build fix after r185574.
1854 (set get App.Pane.Ember.Object.extend.):
1856 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1860 * tools/pull-os-versions.py:
1863 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1865 Perf dashboard should be able to list iOS versions as well as OS X versions
1866 https://bugs.webkit.org/show_bug.cgi?id=146003
1868 Reviewed by Stephanie Lewis.
1870 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
1871 information specified in config.json.
1873 * tools/pull-os-versions.py: Renamed from pull-osx.py.
1874 (main): Use available_builds_from_command when 'customCommands' is specified.
1875 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
1876 (fetch_available_builds): Now takes the repository name.
1878 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1880 Removed a superfluous console.log per Chris's comment.
1884 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1886 Analysis task should show all possible revisions for A/B testing
1887 https://bugs.webkit.org/show_bug.cgi?id=145996
1889 Reviewed by Chris Dumez.
1891 * public/api/commits.php:
1892 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
1893 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
1894 have a "commit time".
1897 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
1898 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
1899 the fetched list of commits if available.
1900 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
1901 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
1902 of points shown in the A/B testing configurations become too long.
1904 * public/v2/commits-viewer.js:
1905 (App.CommitsViewerComponent.commitsChanged):
1907 * public/v2/data.js:
1908 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
1910 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
1912 Add a script to post new OS X builds to perf dashboard
1913 https://bugs.webkit.org/show_bug.cgi?id=145955
1915 Reviewed by Darin Adler.
1917 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
1919 * public/api/report-commits.php:
1920 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
1921 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
1923 * tools/pull-osx.py: Added.
1924 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
1925 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
1926 (setup_auth): Sets up basic or digest auth to access the dashboard.
1927 (fetch_available_builds): Fetches and parses the XML document from an internal website.
1928 (textContent): A helper function to get the text content out of a XML node.
1929 (submit_commits): Submits commits to the perf dashboard.
1931 * tools/pull-svn.py:
1934 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
1936 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
1938 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
1939 https://bugs.webkit.org/show_bug.cgi?id=145940
1941 Reviewed by Darin Adler.
1943 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
1944 Also deleted the code to mark points outside the envelop as outliers.
1948 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
1950 Unreviewed build fix for merging platforms.
1952 * public/admin/platforms.php:
1954 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
1956 Unreviewed build fix. Some builder names are really long.
1958 * init-database.sql:
1960 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
1962 Show results and status before revisions for A/B testing results
1963 https://bugs.webkit.org/show_bug.cgi?id=145327
1965 Reviewed by Chris Dumez.
1967 Place the results and the status columns before the columns for revisions.
1968 Also show the absolute difference as well as the relative difference between the averages of A and B.
1971 (App.TestGroupPane._populate):
1972 (App.TestGroupPane._computeStatisticalSignificance):
1973 * public/v2/index.html:
1975 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1977 Build fix after r184591.
1979 * public/v2/manifest.js:
1981 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1983 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
1985 * public/include/build-requests-fetcher.php:
1987 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1989 UI to associate bugs with an analysis task is crappy
1990 https://bugs.webkit.org/show_bug.cgi?id=145198
1992 Reviewed by Andreas Kling.
1994 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
1995 a bug and a separate select view with a text field to associate a new bug instead of implicitly
1996 updating or deleting the existing record based on what the user had typed.
1998 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
1999 a given analysis task since it's perfectly reasonable for a given task to be associated with
2000 multiple WebKit bugs.
2002 * public/privileged-api/associate-bug.php:
2003 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
2004 one that matches the analysis task and the bug tracker when the bug number is falsey.
2006 * public/v2/analysis.js:
2007 (App.Bug.url): Added.
2008 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
2010 * public/v2/app.css:
2013 (App.AnalysisTaskController.actions.addBug): Added.
2014 (App.AnalysisTaskController.actions.deleteBug): Added.
2015 (App.AnalysisTaskController.associateBug): Deleted.
2017 * public/v2/index.html: Updated the templates.
2019 * public/v2/manifest.js:
2020 (App.BugTracker.urlFromBugNumber): Added.
2022 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2024 A/B testing rootSets should provide commit times as well as revisions
2025 https://bugs.webkit.org/show_bug.cgi?id=145207
2027 Reviewed by Andreas Kling.
2029 Some continuous build systems need the commit time as well as the revision number / hash so provide one
2030 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
2032 * public/include/build-requests-fetcher.php:
2033 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
2034 the revision number as well as the commit time.
2035 * tools/sync-with-buildbot.py:
2036 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
2037 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
2038 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
2040 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
2042 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
2044 * public/v2/manifest.js:
2045 (App.Manifest.Ember.Controller.extend.):
2046 (App.Manifest.Ember.Controller.extend):
2048 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
2050 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
2051 https://bugs.webkit.org/show_bug.cgi?id=145181
2053 Rubber-stamped by Chris Dumez.
2055 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
2056 for clarity. This change also reduces the code complexity.
2058 * public/index.html:
2060 (App.AnalysisTaskController._chartDataChanged):
2061 (App.TestGroupPane._createConfigurationSummary):
2062 * public/v2/data.js:
2063 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
2065 * public/v2/interactive-chart.js: Removed the support for showing units separately.
2066 (App.InteractiveChartComponent._constructGraphIfPossible):
2067 (App.InteractiveChartComponent._relayoutDataAndAxes)
2069 * public/v2/manifest.js:
2070 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
2071 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
2072 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
2073 automatically include unit.
2075 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
2077 REGRESSION: v2 UI reports a higher memory usage
2078 https://bugs.webkit.org/show_bug.cgi?id=145151
2080 Reviewed by Chris Dumez.
2082 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
2083 Fixed the bug by manually implementing the formatter as done in v1.
2085 * public/v2/manifest.js:
2086 (App.Manfiest._formatBytes): Added.
2087 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
2089 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
2091 Unreviewed build fix. Add "Duration" as a time metric.
2093 * public/js/helper-classes.js:
2094 * public/v2/data.js:
2095 (RunsData.unitFromMetricName):
2097 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
2099 Perf dashboard treats Speedometer and JetStream as smaller is better
2100 https://bugs.webkit.org/show_bug.cgi?id=144711
2102 Reviewed by Chris Dumez.
2104 Added the support for "Score" metric.
2106 * public/js/helper-classes.js:
2108 * public/v2/data.js:
2109 (RunsData.unitFromMetricName):
2110 (RunsData.isSmallerBetter):
2112 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
2114 Build fix after r183232.
2116 * public/include/json-header.php:
2118 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
2120 Perf dashboard should automatically detect regressions
2121 https://bugs.webkit.org/show_bug.cgi?id=141443
2123 Reviewed by Anders Carlsson.
2125 Added a node.js script detect-changes.js to detect potential regressions and progressions
2126 on the graphs tracked on v2 dashboards.
2128 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
2129 columns to analysis_tasks to keep the segmentation and test range selection strategies used
2130 to create an analysis task.
2132 * public/api/analysis-tasks.php:
2133 (format_task): Include task_segmentation and analysis_tasks in the results.
2135 * public/include/json-header.php:
2136 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
2137 of a CSRF prevention token.
2138 (should_authenticate_as_slave): Added.
2139 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
2140 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
2141 to a CSRF attack, we don't need to check a CSRF token.
2143 * public/privileged-api/create-analysis-task.php:
2144 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
2145 analysis task. Also add or find segmentation and test range selection strategies if specified.
2147 * public/privileged-api/create-test-group.php:
2148 (main): Use ensure_privileged_api_data_and_token_or_slave.
2150 * public/privileged-api/generate-csrf-token.php:
2153 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
2155 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
2156 (Array.prototype.find): Added a polyfill to be used in node.js.
2157 (RunsData.fetchRuns):
2158 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
2159 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
2160 in detect-changes.js.
2161 (RunsData.unitFromMetricName): Ditto.
2162 (RunsData.isSmallerBetter): Ditto.
2163 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
2164 times are identical.
2165 (TimeSeries): When commit times are identical, order points based on build time. This is needed
2166 for when we trigger two builds at two different OS versions with the same WebKit revision since
2167 OS versions don't change the commit times.
2168 (TimeSeries.prototype.findPointByIndex): Added.
2169 (TimeSeries.prototype.rawValues): Added.
2171 * public/v2/js/statistics.js:
2172 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
2173 description of this strategy instead of the default probability. Also fixed a bug that debugging
2174 code was referring to non-existent variables.
2175 (Statistics.executeStrategy): Moved from App.Pane (app.js).
2177 * public/v2/manifest.js:
2178 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
2179 used in detect-changes.js.
2181 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
2182 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
2183 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
2184 (main): Loads the settings JSON specified in the argument.
2185 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
2186 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
2187 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
2188 and computes various values for when statistically significant changes are detected later.
2189 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
2190 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
2191 in chronological order and create a new analysis task for the very last change we detected. We'll
2192 eventually create an analysis task for all detected changes since we're repeating the analysis in
2193 fetchManifestAndAnalyzeData after some time.
2194 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
2195 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
2196 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
2197 tasks for the same range (e.g. humans may create one before the script gets to do it).
2198 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
2199 testing if available, and notify another server with a HTML message as specified.
2200 (findStrategyByLabel):
2201 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
2202 test or values are getting smaller in a larger-is-better test and vice versa.
2203 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
2204 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
2208 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
2209 (instantiateNotificationTemplate):
2212 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
2214 Perf dashboard should have UI to set status on analysis tasks
2215 https://bugs.webkit.org/show_bug.cgi?id=143977
2217 Reviewed by Chris Dumez.
2219 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
2220 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
2221 The latter will be a useful metric once we start automatically creating analysis tasks.
2223 * init-database.sql: Added two columns to analysis_tasks table.
2224 * public/api/analysis-tasks.php: Include the added columns in the JSON.
2225 * public/include/db.php:
2226 (Database::to_database_boolean): Added.
2227 * public/include/json-header.php:
2228 (require_match_one_of_values): Added.
2229 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
2231 * public/v2/analysis.js:
2232 (App.AnalysisTask.result): Added.
2233 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
2234 and we want to differentiate null from false in order to differentiate the null-ness of the value.
2235 (App.AnalysisTask.saveStatus): Added.
2236 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
2237 * public/v2/app.css:
2239 (App.AnalysisTaskController.analysisResultOptions): Added.
2240 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
2241 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
2242 been created if 'no change' is selected.
2243 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
2244 (App.AnalysisTaskController.actions.saveStatus): Added.
2245 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
2246 'result' and 'needed' values of the analysis task.
2248 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
2250 Unreviewed build fix. Updated config.json after recent changes.
2254 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
2256 Make the analysis page more useful
2257 https://bugs.webkit.org/show_bug.cgi?id=143617
2259 Reviewed by Chris Dumez.
2261 * public/api/analysis-tasks.php:
2262 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
2263 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
2264 * public/v2/analysis.js:
2265 (App.AnalysisTask.formattedCreatedAt): Added.
2266 (App.AnalysisTask._addLeadingZero): Added.
2267 (App.AnalysisTask.buildRequestCount): Added.
2268 (App.AnalysisTask.finishedBuildRequestCount): Added.
2269 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
2270 (App.AnalysisTask.testGroups):
2271 (App.AnalysisTask.triggerable):
2272 (App.AnalysisTask.label):
2274 * public/v2/app.css: Tweaked style rules for the analysis page.
2277 (App.buildPopup): Sort the list of platforms by name.
2278 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
2279 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
2280 such as "Bugzilla" with the corresponding text field.
2282 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
2283 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
2284 for the accompanying graph.
2286 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
2288 Perf dashboard should automatically select ranges for A/B testing
2289 https://bugs.webkit.org/show_bug.cgi?id=143580
2291 Reviewed by Chris Dumez.
2293 Added a new statistics option for picking a A/B test range selection strategy.
2294 The selected ranges are shown in the graph using the same UI to show analysis tasks.
2297 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
2298 charts page used by the dashboard since we've added a new parameter at the end.
2299 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
2300 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
2301 (App.Pane._cloneStrategy): Copy isSegmentation.
2302 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
2303 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
2304 selection strategy is picked by the user.
2305 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
2306 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
2307 the return value from the moving average time series to a dictionary that contains the moving
2308 average time series, a dictionary of anomalies, and an array of test ranges.
2309 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
2310 (App.ChartsController._serializePaneList): Ditto for serialization.
2311 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
2312 test range selection strategy.
2314 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
2316 * public/v2/index.html: Added UI for selecting a test range selection strategy.
2318 * public/v2/interactive-chart.js:
2319 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
2321 * public/v2/js/statistics.js:
2322 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
2323 (Statistics.TestRangeSelectionStrategies): Added.
2325 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
2327 The results of A/B testing should state statistical significance
2328 https://bugs.webkit.org/show_bug.cgi?id=143552
2330 Reviewed by Chris Dumez.
2332 Added statistical comparisons between results for each configuration on analysis task page using
2333 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
2336 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
2337 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
2339 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
2340 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
2341 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
2342 Also renamed "items" to "requests" for clarity.
2344 * public/v2/index.html: Added the template for showing statistical comparisons.
2346 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
2347 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
2348 probability and vice versa.
2349 (Statistics.supportedConfidenceIntervalProbabilities):
2350 (Statistics.confidenceIntervalDelta):
2351 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
2352 the probability that two values are sampled from distinct distributions using Welch's t-test.
2353 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
2354 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
2355 (.oneSidedToTwoSidedProbability): Extracted.
2356 (.twoSidedToOneSidedProbability): Extracted.
2357 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
2358 now that computeWelchsT takes two-sided probability.
2360 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
2362 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
2366 (App.Pane.refetchRuns):
2368 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
2370 Perf dashboard should have a way of marking outliers
2371 https://bugs.webkit.org/show_bug.cgi?id=143466
2373 Reviewed by Chris Dumez.
2375 Address kling's in-person comment to notify users when the new run status is saved in the database.
2378 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
2379 * public/v2/chart-pane.css: Fixed a typo.
2381 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
2383 Perf dashboard should have a way of marking outliers
2384 https://bugs.webkit.org/show_bug.cgi?id=143466
2386 Reviewed by Chris Dumez.
2388 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
2389 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
2391 * init-database.sql: Added run_marked_outlier column to test_runs table.
2393 * public/admin/tests.php:
2395 * public/api/runs.php:
2396 (main): Only emit Cache-Control and Expires headers in v1 UI.
2397 (RunsGenerator::format_run): Emit markedOutlier.
2399 * public/include/admin-header.php:
2401 * public/include/db.php:
2402 (Database::is_true): Made it static.
2404 * public/include/manifest.php:
2405 (Manifest::platforms):
2407 * public/index.html: Call into /api/runs/ with ?cache=true.
2409 * public/privileged-api/update-run-status.php: Added.
2410 (main): Updates the newly added column in test_runs table.
2414 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
2415 (App.Pane._didFetchRuns): Renamed from _updateChartData.
2416 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
2417 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
2418 the interactive chart component only observes changes to chartData and not individual properties of it.
2419 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
2420 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
2421 clone chartData here.
2423 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
2424 invoking App.Pane._setNewChartData.
2425 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
2426 opening the pane for marking points as outliers would be annoying.
2427 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
2428 (App.PaneController.selectedMeasurement): Added.
2429 (App.PaneController.showOutlierTitle): Added.
2430 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
2431 mark the selected point as an outlier via the newly added privileged API.
2433 * public/v2/chart-pane.css: Updated styles.
2435 * public/v2/data.js:
2436 (PrivilegedAPI._post): Report the semantic errors.
2437 (Measurement.prototype.markedOutlier): Added.
2438 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
2439 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
2440 whether the time series should include measurements marked as outliers or not.
2441 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
2442 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
2443 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
2445 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
2446 mark individual points as outliers.
2448 * public/v2/interactive-chart.js:
2449 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
2450 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
2451 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
2452 with the arrow key navigation support, this is no longer an issue.
2454 * public/v2/manifest.js:
2455 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
2456 updates the time series in this chart data in order to include or exclude outliers.
2458 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2460 Perf dashboard should be able to trigger A/B testing jobs for iOS
2461 https://bugs.webkit.org/show_bug.cgi?id=143398
2463 Reviewed by Chris Dumez.
2465 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
2467 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
2469 * public/api/triggerables.php:
2470 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
2471 * public/v2/analysis.js:
2472 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
2474 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
2475 some of the data points. This will happen when we modify the list of projects we build for iOS.
2476 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
2477 attempts to create an invalid test group; when there is already another test group of the same or when
2478 only either configuration specifies the revision for some repository.
2479 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
2480 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
2481 * tools/sync-with-buildbot.py:
2482 (find_request_updates):
2483 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
2484 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
2485 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
2486 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
2488 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2490 Add time series segmentation algorithms as moving averages
2491 https://bugs.webkit.org/show_bug.cgi?id=143362
2493 Reviewed by Chris Dumez.
2495 This patch implements two preliminary time series segmentation algorithms as moving averages.
2497 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
2498 If Welch's t-test implicates a statistically significance difference, then split the segment into two
2499 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
2500 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
2501 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
2503 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
2504 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
2505 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
2506 values y_1 through y_n with mean y_avg, we want to minimize the sum of (y_i - y_avg)^2 over i = 1
2507 through i = n. However, we also don't want to split every data point into a separate segment so we need
2508 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
2509 models discussed in [2] for simplicity. We will tune this cost function further in the future.
2511 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
2512 space is exponential with respect to the size of the time series since we could split at each data point.
2513 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
2514 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
2515 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
2516 exploring much of the problem space.
2518 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
2519 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
2520 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
2521 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
2522 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
2523 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
2524 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
2526 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
2527 a nonstationary time series", Physical Review E 69, 021108 (2004)
2529 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
2530 Lithuanian Mathematical Journal, vol 46, 2006
2532 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
2533 * public/v2/js/statistics.js:
2534 (Statistics.testWelchsT):
2535 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
2536 of each value array between which Welch's t-statistic is computed. This generalization helps the
2537 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
2538 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
2539 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
2540 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
2541 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
2543 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
2544 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
2546 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2548 REGRESSION: Perf dashboard sometimes fails to update zooming level
2549 https://bugs.webkit.org/show_bug.cgi?id=143359
2551 Reviewed by Darin Adler.
2553 The bug was caused by various bugs that ended up in an exception.
2556 (App.Pane._handleFetchErrors): Removed superfluous console.log.
2557 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
2558 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
2559 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
2560 to # when Ember.js fails to attach event listeners on time.
2561 * public/v2/interactive-chart.js:
2562 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
2563 the containing element's size is 0.
2564 (App.InteractiveChartComponent._updateBrush): Ditto.
2566 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
2568 Perf dashboard should have UI to test out anomaly detection strategies
2569 https://bugs.webkit.org/show_bug.cgi?id=143290
2571 Reviewed by Benjamin Poulain.
2573 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
2575 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
2576 as well as Welch's t-test that compares the last five points to the prior twenty points.
2578 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
2579 performance tests although they compare medians instead of means.
2581 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
2584 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
2585 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
2586 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
2587 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
2588 Only report the first data point when multiple consecutive data points are detected as anomalies.
2589 * public/v2/chart-pane.css: Updated styles.
2590 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
2591 * public/v2/js/statistics.js:
2592 (Statistics.testWelchsT): Added. Implements Welch's t-test.
2593 (.sampleMeanAndVarianceForValues): Added.
2594 (.createWesternElectricRule): Added.
2595 (.countValuesOnSameSide): Added.
2596 (Statistics.AnomalyDetectionStrategy): Added.
2598 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2600 REGRESSION: Searching commits can highlight wrong data points
2601 https://bugs.webkit.org/show_bug.cgi?id=143272
2603 Reviewed by Antti Koivisto.
2605 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
2606 return commit times with only second precision. This resulted in the frontend code to match a commit
2607 with the data point that included the next commit when the millisecond component of commit's timestamp
2608 wasn't identically 0.
2610 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
2611 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
2612 so miliseconds component was only preserved in /api/commits.
2614 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
2615 it returns time in milisecond precision.
2617 * public/api/commits.php:
2618 (fetch_commits_between): Use Database::to_js_time for format commit times.
2619 (format_commit): Ditto.
2620 * public/include/db.php:
2621 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
2622 * public/v2/data.js:
2623 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
2625 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2627 Perf dashboard should show relative change in values
2628 https://bugs.webkit.org/show_bug.cgi?id=143252
2630 Reviewed by Antti Koivisto.
2632 When a range of values are selected, show the percentage difference between the start and the end
2633 in addition to the absolute value difference. When a single point is selected, show the relative
2634 difference with respect to the previous point. Use two significant figures and always show plus sign
2635 when the difference is positive.
2637 * public/v2/app.js: Compute and format the relative difference.
2638 * public/v2/chart-pane.css: Don't let commits view shrink itself when they're all collapsed.
2639 * public/v2/index.html: Show the relative difference.
2641 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2643 REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
2644 https://bugs.webkit.org/show_bug.cgi?id=143254
2646 Reviewed by Antti Koivisto.
2648 The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
2649 or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
2650 so that the interactive chart component will observe a change to 'chartData'.
2653 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.
2655 2015-03-19 Ryosuke Niwa <rniwa@webkit.org>
2657 Unreviewed build fixes.
2659 * public/include/manifest.php:
2660 (Manifest::generate): These should be {} instead of [] when they're empty.
2661 * public/v2/data.js:
2662 (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
2663 * public/v2/manifest.js:
2664 (App.Metric.fullName): Fixed the typo.
2665 * tests/admin-regenerate-manifest.js: Fixed the test.
2667 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2669 Commit the erroneously reverted change.
2671 * public/api/runs.php:
2672 (RunsGenerator::results):
2674 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2676 Loading the perf dashboard takes multiple seconds
2677 https://bugs.webkit.org/show_bug.cgi?id=141860
2679 Reviewed by Andreas Kling.
2681 This patch introduces the caches of JSON files returned by /api/ in /data/ directory. It also records
2682 the last time test_runs rows associated with the requested platforms and metrics are inserted, updated,
2683 or removed in the caches as well as the manifest JSON files ("last modified time"). Because the manifest
2684 is regenerated each time a new test result is reported, the front end can compare last modified time in
2685 the manifest file with that in a /api/runs JSON cache to detect the stale-ness.
2687 More concretely, the front end first optimistically fetches the JSON in /data/. If the cache doesn't exit
2688 or the last modified time in the cache doesn't match with that in the manifest file, it would fetch it
2689 again via /api/runs. In the case the cache did exist, we render the charts based on the cache meanwhile.
2690 This dramatically reduces the perceived latency for the page load since charts are drawn immediately using
2691 the cache and we would only re-render the charts as new up-to-date JSON comes in.
2693 This patch also changes the format of runs JSONs by pushing the exiting properties into 'configurations'
2694 and adding 'lastModified' and 'elapsedTime' at the top level.
2696 * init-database.sql: Added config_runs_last_modified to test_configurations table as well as a trigger to
2697 auto-update this column upon changes to test_runs table.
2699 * public/admin/test-configurations.php:
2700 (add_run): Regenerate the manifest file to invalidate the /api/runs JSON cache.
2701 (delete_run): Ditto.
2703 * public/api/runs.php:
2704 (main): Fetch all columns of test_configurations table including config_runs_last_modified. Also generate
2705 the cache in /data/ directory.
2706 (RunsGenerator::__construct): Compute the last modified time for this (platform, metric) pair.
2707 (RunsGenerator::results): Put the old content in 'configurations' property and include 'lastModified' and
2708 'elapsedTime' properties. 'elapsedTime' is added for debugging purposes.
2709 (RunsGenerator::add_runs):
2710 (RunsGenerator::parse_revisions_array):
2712 * public/include/db.php:
2713 (CONFIG_DIR): Added.
2714 (generate_data_file): Added based on ManifestGenerator::store.
2715 (Database::to_js_time): Extracted from RunsGenerator::add_runs to share code.
2717 * public/include/json-header.php:
2718 (echo_success): Renamed from success_json. Return the serialized JSON instead of echo'ing it so that we can
2719 generate caches in /api/runs/.
2720 (exit_with_success):
2722 * public/include/manifest.php:
2723 (ManifestGenerator::generate): Added 'elapsedTime' property for the time taken to generate the manifest.
2724 It seems like we're generating it in 200-300ms for now so that's good.
2725 (ManifestGenerator::store): Uses generate_data_file.
2726 (ManifestGenerator::platforms): Added 'lastModified' array to each platform entry. This array contains the
2727 last modified time for each (platform, metric) pair.
2729 * public/index.html:
2730 (fetchTest): Updated per the format change in runs JSON.
2733 (App.Pane._fetch): Fetch the cached JSON first. Refetch the uncached version if instructed as such.
2734 (App.Pane._updateChartData): Extracted from App.Pane._fetch.
2735 (App.Pane._handleFetchErrors): Ditto.
2737 * public/v2/data.js:
2738 (RunsData.fetchRuns): Takes the fourth argument indicating whether we should fetch the cached version or not.
2739 The cached JSON is located in /data/ with the same filename. When fetching a cached JSON results in 404,
2740 fulfill the promise with null as the result instead of rejecting it. The only client of this function which
2741 sets useCache to true is App.Manifest.fetchRunsWithPlatformAndMetric, and it handles this special case.
2743 * public/v2/manifest.js:
2744 (App.DateArrayTransform): Added. Handles the array of last modified dates in platform objects.
2745 (App.Platform.lastModifiedTimeForMetric): Added. Returns the last modified date in the manifest JSON.
2746 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes "useCache" like RunsData.fetchRuns. Set shouldRefetch
2747 to true if response is null (the cache didn't exit) or the cache is out-of-date.
2748 (App.Manifest._formatFetchedData): Extracted from App.Manifest.fetchRunsWithPlatformAndMetric.
2751 (initializeDatabase): Avoid splitting function definitions in the middle.
2753 * tests/api-report.js: Added tests to verify that reporting new test results updates the last modified time
2754 in test_configurations.
2756 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2758 REGRESSION(r180333): Analysis tasks can't be associated with bugs
2759 https://bugs.webkit.org/show_bug.cgi?id=141858
2761 Reviewed by Andreas Kling.
2763 Added back the erroneously removed table to associate bugs. Also moved "details-table-container" div outside
2764 of the chart-details partial template as it needs to wrap associate bugs in analysis task pages.
2766 * public/v2/chart-pane.css:
2767 * public/v2/index.html:
2769 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2771 Selecting revisions for A/B testing is hard
2772 https://bugs.webkit.org/show_bug.cgi?id=141824
2774 Reviewed by Andreas Kling.
2776 Update the revisions used in A/B testing based on the selection in the overview chart. This allows users to
2777 intuitively select revisions based on points shown in the chart. Removed the old select elements used to
2778 select A/B testing points manually.
2780 Also renamed 'testSets' to 'configurations', 'roots' to 'rootConfigurations', and 'revisions' in each root's
2781 sets to 'options' for clarity.
2783 * public/v2/app.css: Reorganized style rules.
2786 (App.AnalysisTaskController):
2787 (App.AnalysisTaskController._taskUpdated): Merged updateTestGroupPanes.
2788 (App.AnalysisTaskController._chartDataChanged): Renamed from paneDomain. It's now an observer instead of
2789 a property, which sets 'overviewDomain' property as well as other properties.
2790 (App.AnalysisTaskController.updateRootConfigurations): Renamed from updateRoots.
2791 (App.AnalysisTaskController._updateRootsBySelectedPoints): Added. Select roots based on the selected points
2792 in the overview chart.
2794 * public/v2/chart-pane.css: Added arrows next to the configuration names (e.g. 'A') to indicate whether
2795 individual build requests / test results are shown or not.
2797 * public/v2/index.html: Removed the select element per configuration column. Also moved the select element
2798 for the number of runs as it doesn't belong in the same table as the one that lists repositories and roots.
2800 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2802 Unreviewed test fixes after r179037, r179591, and r179763.
2804 * tests/admin-regenerate-manifest.js:
2805 * tests/admin-reprocess-report.js:
2807 2015-02-19 Ryosuke Niwa <rniwa@webkit.org>
2809 Relationship between A/B testing results are unclear
2810 https://bugs.webkit.org/show_bug.cgi?id=141810
2812 Reviewed by Andreas Kling.
2814 Show a "reference chart" indicating which two points have been tested in each test group pane.
2816 Now the chart shown at the top of an analysis task page is called the "overview pane", and we use the pane
2817 and the domain used in this chart to show charts in each test group.
2819 Also renamed an array of revisions used in the A/B test results tables from 'revisions' to 'revisionList'.
2821 * public/v2/analysis.js:
2822 (App.TestGroup._fetchTestResults): Renamed from _fetchChartData. Set 'testResults' instead of 'chartData'
2823 since this is the results of A/B testing results, not the data for charts shown next to them.
2825 * public/v2/app.css: Added CSS rules for reference charts.
2828 (App.AnalysisTaskController.paneDomain): Set 'overviewPane' and 'overviewDomain' on each test group pane.
2829 (App.TestGroupPane._populate): Updated per 'chartData' to 'testResults' rename.
2830 (App.TestGroupPane._updateReferenceChart): Get the chart data via the overview pane and find points that
2831 identically matches root sets. If one of configuration used a set of revisions for which no measurement
2832 was made in the original chart, don't show the reference chart as that would be misleading / confusing.
2833 (App.TestGroupPane._computeRepositoryList): Updated per 'chartData' to 'testResults' rename.
2834 (App.TestGroupPane._createConfigurationSummary): Ditto. Also renamed 'revisions' to 'revisionList'.
2835 In addition, renamed 'buildNumber' to 'buildLabel' and prefixed it with "Build ".
2837 * public/v2/data.js:
2838 (Measurement.prototype.revisionForRepository): Added.
2839 (Measurement.prototype.commitTimeForRepository): Cleanup.
2840 (TimeSeries.prototype.findPointByRevisions): Added. Finds a point based on a set of revisions.
2842 * public/v2/index.html: Added the reference chart. Streamlined the status label for each build request
2843 by including the build number in the title attribute instead of in the markup.
2845 * public/v2/interactive-chart.js:
2846 (App.InteractiveChartComponent._updateDomain): Fixed a typo introduced as a consequence of r179913.
2847 (App.InteractiveChartComponent._computeYAxisDomain): Expand the y-axis to show the highlighted points.
2848 (App.InteractiveChartComponent._highlightedItemsChanged): Adjust the y-axis as needed.
2850 2015-02-18 Ryosuke Niwa <rniwa@webkit.org>
2852 Analysis task pages are unusable
2853 https://bugs.webkit.org/show_bug.cgi?id=141786
2855 Reviewed by Andreas Kling.
2857 This patch makes following improvements to analysis task pages:
2858 1. Making the main chart interactive. This change required the use of App.Pane as well as moving the code to
2859 compute the data for the details pane from PaneController.
2860 2. Moving the form to add a new test group to the top of test groups instead of the bottom of them.
2861 3. Grouping the build requests in each test group by root sets instead of the order by which they were ran.
2862 This change required the creation of App.TestGroupPane as well as its methods.
2863 4. Show a box plot for each root set configuration as well as each build request. This change required
2864 App.BoxPlotComponent.
2865 5. Show revisions of each repository (e.g. WebKit) for each root set and build request.
2867 * public/api/build-requests.php:
2868 (main): Update per the rename of BuildRequestsFetcher::root_sets to BuildRequestsFetcher::root_sets_by_id.
2870 * public/api/test-groups.php:
2871 (main): Include root sets and roots in the response.
2872 (format_test_group):
2874 * public/include/build-requests-fetcher.php:
2875 (BuildRequestsFetcher::root_sets_by_id): Renamed from root_sets.
2876 (BuildRequestsFetcher::root_sets): Added.
2877 (BuildRequestsFetcher::roots): Added.
2878 (BuildRequestsFetcher::fetch_roots_for_set): Takes a boolean argument $resolve_ids. This flag is only set to
2879 true in /api/build-requests/ (as done prior to this patch) to use repository names as identifiers since
2880 tools/sync-with-buildbot.py can't convert repository names to their ids.
2882 * public/v2/analysis.js:
2884 (App.RootSet): Added.
2885 (App.RootSet.revisionForRepository): Added.
2886 (App.TestGroup.rootSets): Deleted the code to compute root set ids from build requests now that the JSON
2887 response at /api/test-groups will include them.
2888 (App.BuildRequest): Ditto. Also deleted 'configLetter' property, which has been moved to a proxy created by
2889 _createConfigurationSummary.
2890 (App.BuildRequest.statusLabel): Use 'Completed' as the human readable label for 'completed' status.
2891 (App.BuildRequest.aggregateStatuses): Added. Generates a human readable status for a set of build requests.
2893 * public/v2/app.css: Updated style rules for analysis task pages.
2896 (App.Pane): This class is now used in analysis task pages to make the main chart interactive.
2897 (App.Pane._updateDetails): Moved from App.PaneController.
2899 (App.PaneController._updateCanAnalyze): Updated the code per the move of selectedPoints.
2901 (App.AnalysisTaskController): Added 'details'.
2902 (App.AnalysisTaskController._taskUpdated):
2903 (App.AnalysisTaskController.paneDomain):Renamed from _fetchedRuns.
2904 (App.AnalysisTaskController.updateTestGroupPanes): Added. Creates App.TestGroupPane for each test group.
2905 (App.AnalysisTaskController.actions.toggleShowRequestList): Added.
2907 (App.TestGroupPane): Added.
2908 (App.TestGroupPane._populate): Added. Group build requests by root sets and create a summary for each group.
2909 (App.TestGroupPane._computeRepositoryList): Added. Returns a sorted list of repositories which is the union
2910 of all repositories appearing in root sets and builds associated with A/B testing results.
2911 (App.TestGroupPane._groupRequestsByConfigurations): Added. Groups build requests by root sets.
2912 (App.TestGroupPane._createConfigurationSummary): Added. Creates a summary for a group of build requests that
2913 use the same root set. We start by wrapping "raw" build requests in a proxy with formatted values,
2914 build numbers, etc... obtained from the fetched chart data. The list of revisions shown in the group summary
2915 is a union of revisions in the root set and the first build request in the group. We null-out revision info
2916 for a build request if it is identical to the one in the summary. The range of values is expanded as needed
2917 by the values in the group as well as 95% percentile confidence interval.
2919 (App.BoxPlotComponent): Added. Controls a box plot shown for each test group summary and build request.
2920 (App.BoxPlotComponent.didInsertElement): Added. Inserts a SVG element as well as two indicator rects to show
2921 the mean and the confidence interval.
2922 (App.BoxPlotComponent._updateBars): Added. Updates the dimensions of the indicator rects.
2923 (App.BoxPlotComponent.valueChanged): Added. Computes the relative dimensions of the indicator rects and
2924 calls _updateBars to update the rects.
2926 * public/v2/chart-pane.css: Added some style rules to be used in the details pane in analysis task pages.
2928 * public/v2/data.js:
2929 (Measurement.prototype.formattedRevisions):
2930 (Measurement.formatRevisionRange): Renamed from Measurement.prototype._formatRevisionRange so that it can be
2931 called in _createConfigurationSummary.
2933 * public/v2/index.html: Updated the templates for analysis task pages. Moved the form to create a new test
2934 group above all test groups, and replaced the list of data points by "details" pane used in the charts page.
2935 Also made the fetching of chartData no longer block showing of test groups.
2937 * public/v2/interactive-chart.js:
2938 (App.InteractiveChartComponent._updateDomain): Added an early exit to fix a newly revealed race condition.
2939 (App.InteractiveChartComponent._domainChanged): Ditto.
2940 (App.InteractiveChartComponent._updateSelectionToolbar): Made it respect 'zoomable' boolean property.
2942 * public/v2/js/statistics.js:
2943 (Statistics.min): Added.
2944 (Statistics.max): Added.
2946 * public/v2/manifest.js:
2947 (App.Manifest.fetchRunsWithPlatformAndMetric): Added formatWithDeltaAndUnit to be used in _createConfigurationSummary.
2949 2015-02-14 Ryosuke Niwa <rniwa@webkit.org>
2951 Build URL on new perf dashboard doesn't resolve $builderName
2952 https://bugs.webkit.org/show_bug.cgi?id=141583
2954 Reviewed by Darin Adler.
2956 Support $builderName in the build URL template.
2958 * public/js/helper-classes.js:
2959 (TestBuild.buildUrl): Replaced $builderName with the builder name.
2961 * public/v2/manifest.js:
2962 (App.Metric.fullName): Fixed the typo. We need &ni, not &in.
2963 (App.BuilderurlFromBuildNumber): Replaced $builderName with the builder name.
2965 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
2967 Unreviewed build fix after r179591.
2969 * public/api/commits.php:
2971 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
2973 The status of a A/B testing request always eventually becomes "Failed"
2974 https://bugs.webkit.org/show_bug.cgi?id=141523
2976 Reviewed by Andreas Kling.
2978 The bug was caused by /api/build-requests always setting the status of a build request to 'failed' when
2979 'failedIfNotCompleted' was sent by the buildbot sync'er.
2981 Fixed the bug by only setting the status to 'failed' if it wasn't set to 'completed'.
2983 * public/api/build-requests.php:
2986 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
2988 Unreviewed, remove empty directories.
2990 * public/data: Removed.
2992 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
2994 Perf dashboard should show the results of A/B testing
2995 https://bugs.webkit.org/show_bug.cgi?id=141500
2997 Reviewed by Chris Dumez.
2999 Added the support for fetching test_runs for a specific test group in /api/runs/, and used it in the
3000 analysis task page to fetch results for each test group.
3002 Merged App.createChartData into App.Manifest.fetchRunsWithPlatformAndMetric so that App.BuildRequest
3003 can use the formatter.
3005 * public/api/runs.php:
3006 (fetch_runs_for_config_and_test_group): Added.
3007 (fetch_runs_for_config): Just return the fetched rows since main will format them with RunsGenerator.
3008 (main): Use fetch_runs_for_config_and_test_group to fetch rows when a test group id is specified. Also
3009 use RunsGenerator to format results.
3010 (RunsGenerator): Added.
3011 (RunsGenerator::__construct): Added.
3012 (RunsGenerator::add_runs): Added.
3013 (RunsGenerator::format_run): Moved.
3014 (RunsGenerator::parse_revisions_array): Moved.
3016 * public/v2/analysis.js:
3017 (App.TestGroup): Fixed a typo. The property on a test group that refers to an analysis task is "task".
3018 (App.TestGroup._fetchChartData): Added. Fetches all A/B testing results for this group.
3019 (App.BuildRequest.configLetter): Renamed from config since this returns a letter that identifies the
3020 configuration associated with this build request such as "A" and "B".
3021 (App.BuildRequest.statusLabel): Added the missing label for failed build requests.
3022 (App.BuildRequest.url): Added. Returns the URL associated with this build request.
3023 (App.BuildRequest._meanFetched): Added. Retrieve the mean and the build number for this request via
3027 (App.Pane._fetch): Set chartData directly here.
3028 (App.Pane._updateMovingAverageAndEnvelope): Renamed from _computeChartData. No longer sets chartData
3029 now that it's done in App.Pane._fetch.
3030 (App.AnalysisTaskController._fetchedRuns): Updated per createChartData merge.
3032 * public/v2/data.js:
3033 (Measurement.prototype.buildId): Added.
3034 (TimeSeries.prototype.findPointByBuild): Added.
3036 * public/v2/index.html: Fixed a bug that build status URL was broken. We can't use link-to helper since
3037 url is not an Ember routed path.
3039 * public/v2/manifest.js:
3040 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes testGroupId as the third argument. Merged
3041 App.createChartData here so that App.BuildRequest can use the formatter
3043 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
3045 v2 UI should adjust the number of ticks on dashboards based on screen size
3046 https://bugs.webkit.org/show_bug.cgi?id=141502
3048 Reviewed by Chris Dumez.
3050 * public/v2/interactive-chart.js:
3051 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Compute the number of ticks based on the
3054 2015-02-11 Ryosuke Niwa <rniwa@webkit.org>
3056 New perf dashboard shows too much space around interesting data points
3057 https://bugs.webkit.org/show_bug.cgi?id=141487
3059 Reviewed by Chris Dumez.
3061 Revise the y-axis range adjustment algorithm in r179913. Instead of showing the entire moving average,
3062 show the current time series excluding points in the series outside the moving average envelope.
3065 (App.Pane._computeChartData): Don't deal with missing moving average or enveloping strategy here.
3066 (App.Pane._computeMovingAverageAndOutliers): Set isOutliner to true on all data points in the current
3067 time series if the point lies outside the moving average envelope. Don't expose the moving average or
3068 the envelope computed for this purpose if they're not set by the user.
3070 * public/v2/data.js:
3071 (TimeSeries.prototype.minMaxForTimeRange): Takes a boolean argument, ignoreOutlier. When the flag is set
3072 to true, min/max computation will ignore any point in the series with non-falsy "isOutliner" property.
3074 * public/v2/interactive-chart.js:
3075 (App.InteractiveChartComponent._constructGraphIfPossible): Unsupport hideMovingAverage and hideEnvelope.
3076 (App.InteractiveChartComponent._computeYAxisDomain): Removed the commented out code. Also moved the code
3077 to deal with showFullYAxis here.
3078 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Rewrote the code. Takes ignoreOutliners as an
3079 argument instead of directly inspecting showFullYAxis.
3081 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
3083 New perf dashboard shouldn't always show outliners
3084 https://bugs.webkit.org/show_bug.cgi?id=141445
3086 Reviewed by Chris Dumez.
3088 Use the simple moving average with an average difference envelope to compute the y-axis range to show
3089 to avoid expanding it spuriously to show one off outlier.
3092 (App.Pane): Don't show the full y-axis range by default.
3093 (App.Pane._computeChartData): Use the first strategies for the moving average and the enveloping if
3094 one is not specified by the user but without showing them in the charts.
3095 (App.Pane._computeMovingAverage): Takes moving average and enveloping strategies as arguments instead
3096 of retrieving via chosenMovingAverageStrategy and chosenEnvelopingStrategy.
3098 (App.ChartsController._parsePaneList): Added showFullYAxis as a query string argument to each pane.
3099 (App.ChartsController._serializePaneList): Ditto.
3101 * public/v2/chart-pane.css: Added a CSS rule for when y-axis is clickable.
3103 * public/v2/index.html: Pass in showFullYAxis as an argument to the main interactive chart.
3105 * public/v2/interactive-chart.js:
3106 (App.InteractiveChartComponent._constructGraphIfPossible): Add an event listener on y-axis labels when
3107 the chart is interactive so that toggle showFullYAxis. Also hide the moving average and/or the envelope
3108 if they are not specified by the user (i.e. only used to adjust y-axis range).
3109 (App.InteractiveChartComponent._updateDomain): Don't exit early if y-axis domains are different even if
3110 x-axis domain remained the same. Without this change, the charts would never redraw.
3111 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Use the moving average instead of the current
3112 time series to compute the y-axis range if showFullYAxis is false. When showFullYAxis is true, expand
3113 y-axis all the way down to 0 or the minimum value in the current time series whichever is smaller.
3115 * public/v2/js/statistics.js:
3116 (Statistics.MovingAverageStrategies): Use a wider window in Simple Moving Average by default.
3118 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
3120 Unreviewed build fix.
3123 (set get App.Pane.Ember.Object.extend):
3125 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
3127 New perf dashboard should have the ability to overlay moving average with an envelope
3128 https://bugs.webkit.org/show_bug.cgi?id=141438
3130 Reviewed by Andreas Kling.
3132 This patch adds three kinds of moving average strategies and two kinds of enveloping strategies:
3134 Simple Moving Average - The moving average x̄_i of x_i is computed as the arithmetic mean of values
3135 from x_(i - n) though x_(i + m) where n is a non-negative integer and m is a positive integer. It takes
3136 n, backward window size, and m, forward window size, as an argument.
3138 Cumulative Moving Average - x̄_i is computed as the arithmetic mean of all values x_0 though x_i.
3139 That is, x̄_1 = x_1 and x̄_i = ((i - 1) * M_(i - 1) + x_i) / i for all i > 1.
3141 Exponential Moving Average - x̄_i is computed as the weighted average of x_i and x̄_(i - 1) with α as
3142 an argument specifying x_i's weight. To be precise, x̄_1 = x_1 and x̄_i = α * x_i + (α - 1) x̄_(i-1).
3145 Average Difference - The enveloping delta d is computed as the arithmetic mean of the difference
3146 between each x_i and x̄_i.
3148 Moving Average Standard Deviation - d is computed like the standard deviation except the deviation
3149 for each term is measured from the moving average instead of the sample arithmetic mean. i.e. it uses
3150 the average of (x_i - x̄_i)^2 as the "sample variance" instead of the conventional (x_i - x̄)^2 where
3151 x̄ is the sample mean of all x_i's. This change was necessary since our time series is non-stationary.
3154 Each strategy is cloned for an App.Pane instance so that its parameterList can be configured per pane.
3155 The configuration of the currently chosen strategies is saved in the query string for convenience.
3157 Also added the "stat pane" to choose a moving average strategy and a enveloping strategy in each pane.
3159 * public/v2/app.css: Specify the fill color for all SVG groups in the pane toolbar icons.
3162 (App.Pane._fetch): Delegate the creation of 'chartData' to _computeChartData.
3163 (App.Pane.updateStatisticsTools): Added. Clones moving average and enveloping strategies for this pane.
3164 (App.Pane._cloneStrategy): Added. Clones a strategy for a new pane.
3165 (App.Pane._configureStrategy): Added. Finds and configures a strategy from the configuration retrieved