1 2016-03-22 Ryosuke Niwa <rniwa@webkit.org>
3 Add unit tests for test-group.js
4 https://bugs.webkit.org/show_bug.cgi?id=155781
6 Reviewed by Joseph Pecoraro.
8 Added unit tests for test-group.js that would have caught regressions fixed in r198503.
10 * public/v3/components/chart-pane-base.js:
11 (ChartPaneBase.prototype._renderAnnotations): Added a forgotten break statement.
12 * public/v3/models/build-request.js:
13 (BuildRequest.prototype.setResult):
15 * public/v3/models/test-group.js:
16 * unit-tests/measurement-set-tests.js: Use ./resources/v3-models.js to reduce the code duplication.
17 * unit-tests/resources/v3-models.js: Import more stuff from v3 models.
19 * unit-tests/test-groups-tests.js: Added. Added some unit tests for TestGroup.
21 (.testGroupWithStatusList):
23 2016-03-22 Ryosuke Niwa <rniwa@webkit.org>
29 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
31 Commit log viewer repaints too frequently after r198499
32 https://bugs.webkit.org/show_bug.cgi?id=155732
34 Reviewed by Joseph Pecoraro.
36 The bug was caused by InteractiveTimeSeriesChart invoking onchange callback whenever mouse moved even
37 if the current point didn't change. Fixed the bug by avoiding the work if the indicator hadn't changed
38 and avoiding work in the commit log viewer when the requested repository and the revision range were
39 the same as those of the last request.
41 * public/v3/components/commit-log-viewer.js:
43 (CommitLogViewer.prototype.currentRepository): Exit early when repository and the revision range are
44 identical to the one we already have to avoid repaints and issuing multiple network requests.
45 * public/v3/components/interactive-time-series-chart.js:
46 (InteractiveTimeSeriesChart.prototype._mouseMove): Don't invoke _notifyIndicatorChanged if the current
47 indicator hadn't changed.
48 * public/v3/pages/chart-pane.js:
49 (ChartPane.prototype._indicatorDidChange): Fixed the bug that unlocking the indicator wouldn't update
50 the URL. We need to check whether the lock state had changed. The old condition was also redundant
51 since _mainChartIndicatorWasLocked is always identically equal to isLocked per the prior assignment.
53 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
55 Fix A/B testing after r198503.
57 * public/include/build-requests-fetcher.php:
59 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
61 Analysis task page is broken after r198479
62 https://bugs.webkit.org/show_bug.cgi?id=155735
64 Rubber-stamped by Chris Dumez.
66 * public/api/measurement-set.php:
67 (AnalysisResultsFetcher::fetch_commits): We need to emit the commit ID as done for regular data.
68 * public/include/build-requests-fetcher.php:
69 (BuildRequestsFetcher::fetch_roots_for_set_if_needed): Ditto. Don't use a fake ID after r198479.
70 * public/v3/models/commit-log.js:
71 (CommitLog): Assert that all commit log IDs are integers to catch regressions like this in future.
72 * public/v3/models/root-set.js:
73 (RootSet): Don't resolve Repository here as doing so would modify the shared "root" entry in the JSON
74 we fetched, and subsequent construction of RootSet would fail since this line would blow up trying to
75 find the repository with "[object]" as the ID.
76 * public/v3/models/test-group.js:
77 (TestGroup._createModelsFromFetchedTestGroups): Resolve Repository here.
79 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
81 v3 UI sometimes don't update the list of revisions on the commit log viewer
82 https://bugs.webkit.org/show_bug.cgi?id=155729
84 Rubber-stamped by Chris Dumez.
86 Fixed multiple bugs that were affecting the list of blame range and commit logs for the range weren't
87 updated in some cases on v3 UI. Also, the commit log viewer state is now a part of the URL state so
88 opening and closing the commit log viewer will persist across page loads.
90 Also fixed a regression from r198479 that Test object can't be created for a top level test.
92 * public/v3/components/chart-pane-base.js:
93 (ChartPaneBase.prototype.configure):
94 (ChartPaneBase.prototype._mainSelectionDidChange): Fixed the bug that the list of blame range nor the
95 commit log viewer don't get updated when the selected range changes.
96 (ChartPaneBase.prototype._indicatorDidChange):
97 (ChartPaneBase.prototype._didFetchData):
98 (ChartPaneBase.prototype._updateStatus): Extracted from _indicatorDidChange and _didFetchData.
99 (ChartPaneBase.prototype._requestOpeningCommitViewer): Renamed from _openCommitViewer.
101 * public/v3/components/chart-status-view.js:
102 (ChartStatusView.prototype.updateStatusIfNeeded): Fixed the bug that the blame range doesn't get set
103 on the initial page load when the selection range is set but the chart data hadn't been fetched yet.
105 * public/v3/components/commit-log-viewer.js:
106 (CommitLogViewer.prototype.view): Fixed the bug that we don't clear out the old list of commits while
107 loading the next set of commits to show as it looked as if the list was never updated.
108 (CommitLogViewer.prototype.render): Fixed the bug that the view always show the last repository name
109 even if there were nothing being fetched or commits to show.
111 * public/v3/components/pane-selector.js:
112 (PaneSelector.prototype.focus): Removed superfluous call to console.log.
114 * public/v3/models/data-model.js:
115 (DataModelObject.listForStaticMap): Generalized the code for all to fix the bug in Test.
116 (DataModelObject.all):
118 * public/v3/models/test.js:
119 (Test): Fixed the bug that this code was relying on the static map to be an array.
120 (Test.topLevelTests): Use newly added listForStaticMap to convert the dictionary to an array.
122 * public/v3/pages/chart-pane-status-view.js:
123 (ChartPaneStatusView): Always initialize _usedRevisionRange as a triple to simplify code elsewhere.
124 (ChartPaneStatusView.prototype.render): Invoke _revisionCallback when user clicks on a repository
125 expansion mark (>>). Also fixed click handler from the row since this made selecting revision range
126 on the view cumbersome. Now user has to explicitly click on the expansion mark (>>).
127 (ChartPaneStatusView.prototype._setRevisionRange): Now takes shouldNotify, from, and to as arguments
128 as this function must not invoke_revisionCallback inside _updateRevisionListForNewCurrentRepository.
129 (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Use newly added setCurrentRepository
130 instead of manually invoking setCurrentRepository and updateRevisionListWithNotification.
131 (ChartPaneStatusView.prototype.setCurrentRepository): Fixed the bug that we weren't updating the
133 (ChartPaneStatusView.prototype.updateRevisionList): Renamed from updateRevisionListWithNotification
134 since we no longer call _revisionCallback. In general, callbacks are only meant to communicate user
135 initiated actions, and not program induced updates like this API so this was a bad pattern anyway.
136 ChartPane now explicitly updates the commit log viewer instead of relying on this function calling
137 _requestOpeningCommitViewer implicitly.
138 (ChartPaneStatusView.prototype._updateRevisionListForNewCurrentRepository): Extracted from
139 updateRevisionListWithNotification so that setCurrentRepository can also call this function.
141 * public/v3/pages/chart-pane.js:
142 (ChartPane.prototype._requestOpeningCommitViewer): Overrides ChartPaneBase's method. Open the same
143 repository in other panes via ChartsPage.setOpenRepository.
144 (ChartPane.prototype.setOpenRepository): This method is called when the user selected a repository in
145 another pane. Open the same repository in this pane if it wasn't already open.
147 * public/v3/pages/charts-page.js:
148 (ChartsPage): Added this._currentRepositoryId.
149 (ChartsPage.prototype.serializeState): Serialize _currentRepositoryId.
150 (ChartsPage.prototype.updateFromSerializedState): Set the commit log viewer's
151 (ChartsPage.prototype.setOpenRepository): Added.
153 * tests/api-measurement-set.js: Fixed a test after r198479.
155 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
157 V3 Perf Dashboard should automatically select initial range when creating a new task
158 https://bugs.webkit.org/show_bug.cgi?id=155677
160 Reviewed by Joseph Pecoraro.
162 Select the entire range of points for which the analysis task is created by default so that creating
163 a test group to confirm the regression / progression is easy.
165 * public/v3/pages/analysis-task-page.js:
166 (AnalysisTaskPage): Added a boolean flag which indicates the user had modified main chart's selection.
167 * public/v3/pages/analysis-task-page.js:
168 (AnalysisTaskPage.prototype.render): Set the main chart's selection to the entire range of points in
169 the analysis task if the user had never modified selection.
170 (AnalysisTaskPage.prototype._chartSelectionDidChange): This callback is invoked only when the user had
171 modified the selection so set _selectionWasModifiedByUser true here unconditionally.
173 2016-03-19 Ryosuke Niwa <rniwa@webkit.org>
175 Associated commits don't immediately show up on an analysis task page
176 https://bugs.webkit.org/show_bug.cgi?id=155692
178 Reviewed by Darin Adler.
180 The bug was caused by resolveCommits in AnalysisTask._constructAnalysisTasksFromRawData not being
181 able to find the matching commit log if the commit log had been created by the charts which don't
182 set the remote identifiers on each CommitLog objects.
184 Fixed the bug by modifying /api/measurement-set to include the commit ID, and making CommitLog
185 use the real database ID as its ID instead of a fake ID we create from repository and revision.
187 Also added a bunch of Mocha unit tests for AnalysisTask.fetchAll.
189 * public/api/measurement-set.php:
190 (MeasurementSetFetcher::execute_query): Fetch commit_id.
191 (MeasurementSetFetcher::format_run): Use pass-by-reference to avoid making a copy of the row.
192 (MeasurementSetFetcher::parse_revisions_array): Include commit_id as the first item in the result.
193 * public/v3/instrumentation.js:
194 * public/v3/models/analysis-task.js:
195 (AnalysisTask): Fixed a bug that _buildRequestCount and _finishedBuildRequestCount could be kept
196 as strings and hasPendingRequests() could return a wrong result because it would perform string
197 inequality instead of numerical inequality.
198 (AnalysisTask.prototype.updateSingleton): Ditto.
199 (AnalysisTask.prototype.dissociateCommit):
200 (AnalysisTask._constructAnalysisTasksFromRawData):
201 (AnalysisTask._constructAnalysisTasksFromRawData.resolveCommits): Use findById now that CommitLog
202 objects all use the same id as the database id.
203 * public/v3/models/commit-log.js:
205 (CommitLog.prototype.remoteId): Deleted since we no longer create a fake id for commit logs for
207 (CommitLog.findByRemoteId): Deleted.
208 (CommitLog.ensureSingleton): Deleted.
209 (CommitLog.fetchBetweenRevisions):
211 * public/v3/models/data-model.js:
212 (DataModelObject.clearStaticMap): Added to aid unit testing.
213 (DataModelObject.ensureNamedStaticMap): Fixed a typo. Each map is a dictionary, not an array.
214 * public/v3/models/metric.js:
215 * public/v3/models/platform.js:
216 * public/v3/models/root-set.js:
217 (RootSet): Updated per the interface change in CommitLog.ensureSingleton.
218 (MeasurementRootSet): Updated per /api/measurement-set change. Use the first value as the id.
219 * public/v3/models/test.js:
220 * unit-tests/analysis-task-tests.js: Added.
221 (sampleAnalysisTask):
222 (measurementCluster):
223 * unit-tests/checkconfig.js: Added some assertion message to help aid diagnosing the failure.
224 * unit-tests/measurement-adaptor-tests.js: Updated the sample data per the API change in
225 /api/measurement-set and also added assertions for commit log ids.
226 * unit-tests/measurement-set-tests.js:
228 * unit-tests/resources: Added.
229 * unit-tests/resources/mock-remote-api.js: Added. Extracted from measurement-set-tests.js to be
230 used in analysis-task-tests.js.
231 (assert.notReached.assert.notReached):
232 (global.RemoteAPI.getJSON):
233 (global.RemoteAPI.getJSONWithStatus):
235 * unit-tests/resources/v3-models.js: Added. Extracted from measurement-set-tests.js to be used in
236 analysis-task-tests.js and added more imports as needed.
240 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
242 Build fix after r198464.
244 * public/v3/components/analysis-results-viewer.js:
245 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
247 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
249 Build fix after r198234.
251 * public/api/commits.php:
252 (main): Typo: fetch_latest_reported -> fetch_last_reported.
253 * public/include/commit-log-fetcher.php:
254 (CommitLogFetcher::format_single_commit): commits should be an array.
256 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
258 Perf Dashboard v3 confuses better and worse on A/B task page
259 https://bugs.webkit.org/show_bug.cgi?id=155675
260 <rdar://problem/25208723>
262 Reviewed by Joseph Pecoraro.
264 The analysis results viewer on v3 UI sometimes treats regressions as progressions and vice versa when
265 the first set (i.e. set A) of the revisions used in an A/B testing never appears in the original graph,
266 and its latest commit time matches that of the second set, which appears in the original graph.
268 Because the analysis results viewer compares results in the increasing row number, this results in
269 B to be compared to A instead of A to be compared to B. Fixed the bug by preventing the wrong ordering
270 to occur in _buildRowsForPointsAndTestGroups by always inserting a root set A before B when B appears
271 and A doesn't appear in the original graph.
273 * public/v3/components/analysis-results-viewer.js:
274 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Remember the succeeding root set B
275 when creating an entry for root set A.
276 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Fixed the bug. Also un-duplicated
277 the code to create a new row.
278 (AnalysisResultsViewer.RootSetInTestGroup): Now takes a succeeding root set. e.g. it's B for A and
279 undefined for B in A/B testing.
280 (AnalysisResultsViewer.RootSetInTestGroup.prototype.succeedingRootSet): Added.
281 * public/v3/components/time-series-chart.js:
282 (TimeSeriesChart.computeTimeGrid): Fixed the bug that we would end up showing 0 AM instead of dates
283 when both dates and months change.
285 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
287 Add unit tests for measurement-set.js and measurement-adapter.js
288 https://bugs.webkit.org/show_bug.cgi?id=155673
290 Reviewed by Daniel Bates.
292 Add tests which were supposed to be added in r198462.
294 * unit-tests/measurement-adaptor-tests.js: Added.
295 * unit-tests/measurement-set-tests.js: Added.
296 (assert.notReached): Added.
297 (global.RemoteAPI.getJSON): Added.
298 (global.RemoteAPI.getJSONWithStatus): Added. A mock.
300 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
302 Add unit tests for measurement-set.js and measurement-adapter.js
303 https://bugs.webkit.org/show_bug.cgi?id=155673
305 Reviewed by Darin Adler.
307 Added mocha unit tests for MeasurementSet and MeasurementAdapter classes along with the necessary
308 refactoring to run these tests in node.
310 getJSON and getJSONStatus are now under RemoteAPI so that unit tests can mock them.
312 Removed the dependency on v2 UI's TimeSeries and Measurement class by adding a new implementation
313 of TimeSeries in v3 and removing the dependency on Measurement in chart-pane-status-view.js with
314 new helper methods on Build and CommitLog.
316 Many js files now use 'use strict' (node doesn't support class syntax in non-strict mode) and
317 module.exports to export symbols in node's require function.
319 * public/v3/index.html:
321 * public/v3/models/analysis-results.js:
322 (AnalysisResults.fetch):
323 * public/v3/models/analysis-task.js:
324 (AnalysisTask.fetchAll):
325 * public/v3/models/builder.js:
327 (Build.prototype.builder): Added. Used by ChartPaneStatusView.
328 (Build.prototype.buildNumber): Ditto.
329 (Build.prototype.buildTime): Ditto.
330 * public/v3/models/commit-log.js:
331 (CommitLog.prototype.diff): Ditto.
332 (CommitLog.fetchBetweenRevisions):
333 * public/v3/models/data-model.js:
334 (DataModelObject.cachedFetch):
335 * public/v3/models/measurement-adaptor.js:
336 (MeasurementAdaptor.prototype.applyToAnalysisResults): Renamed from adoptToAnalysisResults.
337 (MeasurementAdaptor.prototype.applyTo): Renamed from adoptToSeries. Now shares a lot more
338 code with applyToAnalysisResults. The code to set 'series' and 'seriesIndex' has been moved
339 to TimeSeries.append. 'measurement' is no longer needed as this patch removes its only use
340 in ChartPaneStatusView.
341 * public/v3/models/measurement-cluster.js:
342 (MeasurementCluster.prototype.addToSeries): Use TimeSeries.append instead of directly mutating
344 * public/v3/models/measurement-set.js:
345 (Array.prototype.includes): Added a polyfill for node.
346 (MeasurementSet.prototype._fetchSecondaryClusters): Removed a bogus assertion. When fetchBetween
347 is called with a mixture of clusters that have been fetched and not fetched, this assertion fails.
348 (MeasurementSet.prototype._fetch):
349 (TimeSeries.prototype.findById): Moved to time-series.js.
350 (TimeSeries.prototype.dataBetweenPoints): Ditto.
351 (TimeSeries.prototype.firstPoint): Ditto.
352 (TimeSeries.prototype.fetchedTimeSeries): Moved the code to extend the last point to TimeSeries'
354 * public/v3/models/repository.js:
355 * public/v3/models/root-set.js:
356 (MeasurementRootSet): Ignore repositories that had not been defined (e.g. it could be added after
357 manifest.json had been downloaded but before a given root set is created for an A/B testing).
358 * public/v3/models/time-series.js:
360 (TimeSeries.prototype.append): Added.
361 (TimeSeries.prototype.extendToFuture): Added.
362 (TimeSeries.prototype.firstPoint): Moved from measurement-set.js.
363 (TimeSeries.prototype.lastPoint): Added.
364 (TimeSeries.prototype.previousPoint): Added.
365 (TimeSeries.prototype.nextPoint): Added.
366 (TimeSeries.prototype.findPointByIndex): Added.
367 (TimeSeries.prototype.findById): Moved from measurement-set.js.
368 (TimeSeries.prototype.findPointAfterTime): Added.
369 (TimeSeries.prototype.dataBetweenPoints): Moved from measurement-set.js.
370 * public/v3/pages/chart-pane-status-view.js:
371 (ChartPaneStatusView.prototype.render): Use newly added helper functions on Build.
372 (ChartPaneStatusView.prototype._formatTime): Added.
373 (ChartPaneStatusView.prototype.setCurrentRepository):
374 (ChartPaneStatusView.prototype.computeChartStatusLabels): Rewrote the code using RootSet object on
375 currentPoint and previousPoint instead of Measurement class from v2 UI. Also sort the results using
376 sortByNamePreferringOnesWithURL.
377 * public/v3/remote.js:
378 (RemoteAPI.getJSON): Moved under RemoteAPI.
379 (RemoteAPI.getJSONWithStatus): Ditto.
381 (PrivilegedAPI.requestCSRFToken):
383 2016-03-17 Ryosuke Niwa <rniwa@webkit.org>
385 Add unit tests for config.json and statistics.js
386 https://bugs.webkit.org/show_bug.cgi?id=155626
388 Reviewed by Darin Adler.
390 Added mocha unit tests for statistics.js and validating config.json. For segmentations, I've extracted
391 real data from our internal perf dashboard.
393 Also fixed some bugs covered by these new tests.
395 * public/shared/statistics.js:
396 (Statistics.movingAverage): Fixed a bug that forwardWindowSize was never used.
397 (Statistics.exponentialMovingAverage): Fixed the bug that the moving average starts at 0. It should
398 start at the first value instead.
399 (.splitIntoSegmentsUntilGoodEnough): Fixed the bug that we may try to segment a time series into
400 more parts than there are data points. Clearly, that doesn't make any sense.
401 (.findOptimalSegmentation): Renamed local variables so that they're more descriptive, and rewrote
402 the debugging code was the old code was emitting some useless data. Also fixed the bug that the length
403 of "segmentation" was off by one (we need segmentCount + 1 elements in the array sine we always
404 include the start of the first segment = 0 and the end of the last segment = values.length).
405 (.SampleVarianceUpperTriangularMatrix):
406 (Statistics): Modernized the export code.
408 * tools/js/config.js: Added.
410 (Config.prototype.configFilePath): Added.
411 (Config.prototype.value): Added.
412 (Config.prototype.path): Added.
413 * tools/js/database.js: Added.
415 (Database.prototype.connect): Added.
416 (Database.prototype.disconnect): Added.
418 * unit-tests/checkconfig.js: Added. Validates config.json. This is useful while setting up
419 a local instance of the perf dashboard.
420 * unit-tests/statistics-tests.js: Added.
421 (assert.almostEqual): Added. Asserts that two floating values are within a given significant digits.
426 2016-03-17 Ryosuke Niwa <rniwa@webkit.org>
428 Fix a typo which was supposed to be fixed in r198351.
430 * public/v3/pages/analysis-task-page.js:
431 (AnalysisTaskPage.prototype.render):
433 2016-03-17 Ryosuke Niwa <rniwa@webkit.org>
435 An analysis task should be closed if a progression cause is identified
436 https://bugs.webkit.org/show_bug.cgi?id=155549
438 Reviewed by Chris Dumez.
440 Since a progression is desirable, we should close an analysis task once its cause is identified.
444 * init-database.sql: Fixed a typo.
445 * public/api/analysis-tasks.php:
446 * public/v3/models/analysis-task.js:
447 (AnalysisTask.prototype.dissociateBug): Renamed from dissociateBug.
448 * public/v3/pages/analysis-task-page.js:
449 (AnalysisTaskPage.prototype.render):
450 (AnalysisTaskPage.prototype._dissociateBug): Renamed from _dissociateBug.
451 (AnalysisTaskPage.prototype._dissociateCommit): Fixed the typo in the alert.
453 2016-03-16 Ryosuke Niwa <rniwa@webkit.org>
455 Analysis task page should allow specifying commits that caused or fixed a regression or a progression
456 https://bugs.webkit.org/show_bug.cgi?id=155529
458 Reviewed by Chris Dumez.
460 Added the capability to associate revisions that caused or fixed a progression or a regression for which
461 an analysis task was created. Added task_commits that stores this relationship and added the backend
462 support to retrieve this table in /api/analysis-tasks and an privileged API to update this table at
463 /privileged-api/associate-commit.
465 Also extracted a new component, MutableListView, out of AnalysisTaskPage to render and manipulate a list
466 of mutable items, and used it to render the list of associated bugs and commits. The view takes a list of
467 kinds (e.g. repositories or bug trackers), and accepts a pair of a kind and arbitrary text as a new item
470 * init-database.sql: Added task_commits table.
472 * public/api/analysis-tasks.php:
474 (fetch_associated_data_for_tasks): Renamed from fetch_and_push_bugs_to_tasks now that it also fetches
475 the list of commits associated with each analysis task by calling CommitLogFetcher::fetch_for_tasks.
476 Also fixe the bug that we were not taking
477 (format_task): No longer sets 'category' since the computation of category now depends on the list of
478 commits associated with this analysis task which aren't available until fetch_associated_data_for_tasks.
479 (determine_category): Added. Categorize any analysis tasks with "fixes" commits as "closed" and "causes"
480 commits as "identified".
482 * public/include/commit-log-fetcher.php:
483 (CommitLogFetcher::__construct): Remove the unused instance variable.
484 (CommitLogFetcher::fetch_for_tasks): Added. Fetches all commits associated with a list of analysis tasks.
485 Assumes the caller (fetch_associated_data_for_tasks) had setup "fixes" and "causes" fields on each task.
487 * public/privileged-api/associate-commit.php: Added. Updates task_commits table to associate or disassociate
488 a commit with an analysis task. When the specified analysis task and the specified commit are already
489 associated, we simply update the table instead of adding a duplicating entry or error. For dissociation,
490 the front-end specifies the commit ID.
493 * public/v3/index.html:
494 * public/v3/components/mutable-list-view.js: Added. Used by the list associated bugs and commits.
495 (MutableListView): Added.
496 (MutableListView.prototype.setList): Added.
497 (MutableListView.prototype.setKindList): Added.
498 (MutableListView.prototype.setAddCallback): Added. This callback is invoked when the user tries to add
499 a new item to the list.
500 (MutableListView.prototype.render): Added.
501 (MutableListView.prototype._submitted): Added.
502 (MutableListView.cssTemplate):
503 (MutableListView.htmlTemplate):
504 (MutableListItem): Added. RemovalLink could be a hyperlink or a callback and gets involved when the user
505 tries to delete this item.
506 (MutableListItem.prototype.content):
508 * public/v3/models/analysis-task.js:
509 (AnalysisTask): Added the support of the list of commits that fixed and caused changes.
510 (AnalysisTask.prototype.updateSingleton): Ditto.
511 (AnalysisTask.prototype.causes): Added.
512 (AnalysisTask.prototype.fixes): Added.
513 (AnalysisTask.prototype.associateCommit): Added. Use the API added at /privileged-api/associate-commit
514 to associate a new commit with this analysis task. Each commit has either caused or fixed the change.
515 (AnalysisTask.prototype.dissociateCommit): Added. Use the same API to disassociate each commit.
516 (AnalysisTask._constructAnalysisTasksFromRawData): Find all commits associated with each analysis task.
517 Because commit log objects use a fake ID fdue to /api/measurement-set not providing commit IDs, we must
518 use CommitLog.findByRemoteId to find each commit instead of usual CommitLog.findById.
519 (AnalysisTask._constructAnalysisTasksFromRawData.resolveCommits): Added.
521 * public/v3/models/build-request.js:
522 (BuildRequest.prototype.hasFinished): Renamed from hasCompleted since it was confusing for this._status
523 being "completed" wasn't a necessary condition for this function to return true.
525 * public/v3/models/commit-log.js:
526 (CommitLog): Added the static map for actual commit ID instead of a fake ID created in ensureSingleton.
527 (CommitLog.prototype.remoteId): Added. Returns the real commit ID.
528 (CommitLog.findByRemoteId): Added. Finds an CommitLog object using the real ID.
530 * public/v3/models/test-group.js:
531 (TestGroup.prototype.hasFinished): Renamed from hasCompleted to match the rename in BuildRequest.
533 * public/v3/pages/analysis-task-page.js:
534 (AnalysisTaskPage): Added lists for the commits that fixed and caused the change using MutableListView.
535 Also adopted MutableListView for the list of associated bugs.
536 (AnalysisTaskPage.prototype.render): Added the code to populate the newly added lists.
537 (AnalysisTaskPage.prototype._makeCommitListItem): Added.
538 (AnalysisTaskPage.prototype._associateBug): Now this is a callback from MutableListView.
539 (AnalysisTaskPage.prototype._associateCommit): Added.
540 (AnalysisTaskPage.prototype._dissociateCommit): Added.
541 (AnalysisTaskPage.htmlTemplate):
542 (AnalysisTaskPage.cssTemplate):
544 * public/v3/remote.js:
545 (getJSON): Spit out the entire responseText when JSON failed to parse to make debugging easier.
547 2016-03-15 Ryosuke Niwa <rniwa@webkit.org>
549 Extract the code to format commit logs into its own PHP file
550 https://bugs.webkit.org/show_bug.cgi?id=155514
552 Rubber-stamped by Chris Dumez.
554 Extracted CommitLogFetcher out of /api/commits so that it could be used in analysis-tasks.php
555 in the future to support associating cause/fix for each analysis task.
557 * public/api/commits.php:
558 * public/include/commit-log-fetcher.php: Added.
560 (CommitLogFetcher::__construct): Added.
561 (CommitLogFetcher::repository_id_from_name): Added.
562 (CommitLogFetcher::fetch_between): Added.
563 (CommitLogFetcher::fetch_oldest): Added.
564 (CommitLogFetcher::fetch_latest): Added.
565 (CommitLogFetcher::fetch_last_reported): Added.
566 (CommitLogFetcher::fetch_revision): Added.
567 (CommitLogFetcher::commit_for_revision): Added.
568 (CommitLogFetcher::format_single_commit): Added.
569 (CommitLogFetcher::format_commit): Added.
571 2016-03-09 Ryosuke Niwa <rniwa@webkit.org>
573 Build fix after r196870.
575 * public/include/report-processor.php:
577 2016-03-09 Ryosuke Niwa <rniwa@webkit.org>
579 Add Size metric to perf dashboard
580 https://bugs.webkit.org/show_bug.cgi?id=155266
582 Reviewed by Chris Dumez.
584 Added the "Size" metric and use bytes as its unit.
586 * public/js/helper-classes.js:
589 (RunsData.unitFromMetricName):
591 2016-02-20 Ryosuke Niwa <rniwa@webkit.org>
593 Add the support for universal slave password
594 https://bugs.webkit.org/show_bug.cgi?id=154476
596 Reviewed by David Kilzer.
598 Added the support for universalSlavePassword.
601 * public/include/report-processor.php:
602 (ReportProcessor::process):
603 (ReportProcessor::authenticate_and_construct_build_data): Extracted from process().
605 2016-02-19 Ryosuke Niwa <rniwa@webkit.org>
607 Analysis tasks page complains about missing repository but with a wrong name
608 https://bugs.webkit.org/show_bug.cgi?id=154468
610 Reviewed by Chris Dumez.
612 Fixed the bug by using the right variable in the template literal.
614 * public/v3/components/customizable-test-group-form.js:
615 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use querySelector here since Chrome doesn't have
616 getElementsByClassName on ShadowRoot.
617 * public/v3/pages/analysis-task-page.js:
618 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Use name which is the name of
621 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
623 Revert an unintended change made in the previous commit.
627 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
629 Perf dashboard should let user cancel pending A/B testing and hide failed ones
630 https://bugs.webkit.org/show_bug.cgi?id=154433
632 Reviewed by Chris Dumez.
634 Added a button to hide a test group in the details view (the bottom table) in the analysis task page, and
635 "Show hidden tests" link to show the hidden test groups on demand. When a test group is hidden, all pending
636 requests in the group will also be canceled since a common scenario of using this feature is that the user
637 had triggered an useless A/B testing; e.g. all builds will fail, wrong, etc... We can revisit and add the
638 capability to just cancel the pending requests and leaving the group visible later if necessary.
640 Run `ALTER TYPE build_request_status_type ADD VALUE 'canceled';` to add the new type.
642 * init-database.sql: Added testgroup_hidden column to analysis_test_groups table and added 'canceled'
643 as a value to build_request_status_type table.
644 * public/api/test-groups.php:
645 (format_test_group): Added 'hidden' field in the JSON result.
646 * public/privileged-api/update-test-group.php:
647 (main): Added the support for updating testgroup_hidden column. When this column is set to true, also
648 cancel all pending build requests (by setting its request_status to 'canceled' which will be ignore by
650 * public/v3/components/test-group-results-table.js:
651 (TestGroupResultsTable.prototype.setTestGroup): Reset _renderedTestGroup here so that the next call to
652 render() will update the table; e.g. when build requests' status change from 'Pending' to 'Canceled'.
653 * public/v3/models/build-request.js:
654 (BuildRequest.prototype.hasCompleted): A build request is considered complete/finished if it's canceled.
655 (BuildRequest.prototype.hasPending): Added.
656 (BuildRequest.prototype.statusLabel): Handle 'canceled' status.
657 * public/v3/models/test-group.js:
659 (TestGroup.prototype.updateSingleton): Added to update 'hidden' field.
660 (TestGroup.prototype.isHidden): Added.
661 (TestGroup.prototype.hasPending): Added.
662 (TestGroup.prototype.hasPending): Added.
663 (TestGroup.prototype.updateHiddenFlag): Added. Uses the privileged API to update testgroup_hidden column.
664 The JSON API also updates the status of the 'pending' build requests in the group to 'canceled'.
665 * public/v3/pages/analysis-task-page.js:
666 (AnalysisTaskPage): Added _showHiddenTestGroups and _filteredTestGroups as instance variables.
667 (AnalysisTaskPage.prototype._didFetchTestGroups):
668 (AnalysisTaskPage.prototype._showAllTestGroups): Added.
669 (AnalysisTaskPage.prototype._didUpdateTestGroupHiddenState): Extracted from _didFetchTestGroups.
670 (AnalysisTaskPage.prototype._renderTestGroupList): Use the filtered list of test groups to show the list
671 of test groups. When all test groups are shown, we would first show the hidden ones after the regular ones.
672 (AnalysisTaskPage.prototype._createTestGroupListItem): Extracted from _renderTestGroupList.
673 (AnalysisTaskPage.prototype._renderTestGroupDetails): Update the text inside the button to hide the test
674 group. Also show a warning text that the pending requests will be canceled if there are any.
675 (AnalysisTaskPage.prototype._hideCurrentTestGroup): Added.
676 (AnalysisTaskPage.cssTemplate): Updated the style.
678 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
680 The rows in the analysis results table should be expandable
681 https://bugs.webkit.org/show_bug.cgi?id=154427
683 Reviewed by Chris Dumez.
685 Added "(Expand)" link between rows that have hidden points. Upon click it inserts the hidden rows.
687 We insert around five rows at a time when there are hundreds of hidden points but we also avoid leaving
688 behind expandable rows of less than two rows.
690 Also fixed a bug in CustomizableTestGroupForm that getElementsById would throw in the shipping Safari
691 because getElementsById doesn't exist on Element.prototype by using class name instead.
693 * public/v3/components/analysis-results-viewer.js:
694 (AnalysisResultsViewer):
695 (AnalysisResultsViewer.prototype.setCurrentTestGroup): Removed superfluous call to render().
696 (AnalysisResultsViewer.prototype.setPoints): Always show the start and the end points.
697 (AnalysisResultsViewer.prototype.buildRowGroups):
698 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Add an instance of ExpandableRow which
699 shows a "(Expand)" link to show hidden rows here.
700 (AnalysisResultsViewer.prototype._expandBetween): Added. Expands rows between two points.
701 (AnalysisResultsViewer.cssTemplate): Added rules for "(Expand)" links.
702 (AnalysisResultsViewer.ExpandableRow): Added.
703 (AnalysisResultsViewer.ExpandableRow.prototype.resultContent): Added. Overrides what's in the results column.
704 (AnalysisResultsViewer.ExpandableRow.prototype.heading): Added. Generates "(Expand)" link.
706 * public/v3/components/customizable-test-group-form.js:
707 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use getElementsByClassName instead of
709 (CustomizableTestGroupForm.prototype._classForLabelAndRepository): Renamed from _idForLabelAndRepository.
710 (CustomizableTestGroupForm._constructRevisionRadioButtons): Set class name instead of id.
712 * public/v3/components/results-table.js:
713 (ResultsTable.prototype.render): Don't generate radio buttons to select a row when root set is missing;
714 e.g. for rows that show "(Expand)" links.
716 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
718 Statistically significant A/B testing results should be color coded in details view
719 https://bugs.webkit.org/show_bug.cgi?id=154414
721 Reviewed by Chris Dumez.
723 Color code the statistically significant comparisions in TestGroupResultsTable as done in the analysis
726 * public/v3/components/customizable-test-group-form.js:
727 (CustomizableTestGroupForm.cssTemplate): Build fix after r196768.
728 * public/v3/components/test-group-results-table.js:
729 (TestGroupResultsTable.prototype.buildRowGroups): Add the status as a class name.
730 (TestGroupResultsTable.cssTemplate): Added styles to color-code statistically significant results.
732 2016-02-17 Ryosuke Niwa <rniwa@webkit.org>
734 v3 UI should allow custom revisions for A/B testing
735 https://bugs.webkit.org/show_bug.cgi?id=154379
737 Reviewed by Chris Dumez.
739 Added the capability to customize revisions selected in the overview chart and the results viewer.
741 Newly added CustomizableTestGroupForm is responsible for allowing users to modify the set of revisions in
742 a new A/B testing group. Unlike TestGroupForm which doesn't know anything about which revisions are selected
743 for each project/repository, CustomizableTestGroupForm is aware of the list of revisions used in each set.
745 The list of revisions used in each set is represented by RootSet if users had not customized them, and
746 CustomRootSet otherwise; the latter was added since regular RootSet object requires CommitLog and other
747 DataModelObjects which are hard to create without corresponding database entries.
749 * public/v3/components/customizable-test-group-form.js: Added.
750 (CustomizableTestGroupForm): Added.
751 (CustomizableTestGroupForm.prototype.setRootSetMap): Added.
752 (CustomizableTestGroupForm.prototype._submitted): Overrides the superclass' method.
753 (CustomizableTestGroupForm.prototype._customize): Ditto. Unlike TestGroupForm's callback, this class'
754 callback passes in a root set map as the third argument.
755 (CustomizableTestGroupForm.prototype._computeRootSetMap): Added. Returns this._rootSetMap, which is set by
756 AnalysisTaskPage if user had not customized the root sets. Otherwise return a new map with CustomRootSet's.
757 (CustomizableTestGroupForm.prototype.render): Added. Creates a table to allow customization of root sets.
758 (CustomizableTestGroupForm._constructRevisionRadioButtons): Added.
759 (CustomizableTestGroupForm._createRadioButton): Added.
760 (CustomizableTestGroupForm.cssTemplate): Added.
761 (CustomizableTestGroupForm.formContent): Added. This method is called by TestGroupForm.htmlTemplate.
762 * public/v3/components/test-group-form.js:
763 (TestGroupForm): Updated the various methods to not directly mutate DOM. Store the state in instance
764 variables and update DOM in render() as done elsewhere.
765 (TestGroupForm.prototype.setNeedsName): Deleted. We no longer need this flag since TestGroupForm which is
766 used for retries never needs a name and CustomizableTestGroupForm which is used to create a new test group
767 always requires a name.
768 (TestGroupForm.prototype.setDisabled):
769 (TestGroupForm.prototype.setLabel):
770 (TestGroupForm.prototype.setRepetitionCount):
771 (TestGroupForm.prototype.render): Added.
772 (TestGroupForm.prototype._submitted): Moved the code to prevent the default action has been moved to the
773 constructor since this method is overridden by CustomizableTestGroupForm.
774 (TestGroupForm.cssTemplate): Added.
775 (TestGroupForm.htmlTemplate):
776 (TestGroupForm.formContent): Extracted from htmlTemplate.
777 * public/v3/index.html:
778 * public/v3/models/repository.js:
779 (Repository.sortByNamePreferringOnesWithURL): Added.
780 * public/v3/models/root-set.js:
781 (RootSet.prototype.revisionForRepository): Added so that _createTestGroupAfterVerifyingRootSetList can retrieve
782 the revision information from CustomRootSet without going through CommitLog objects since CustomRootSet doesn't
783 have associated CommitLog objects.
784 (CustomRootSet): Added. Used by CustomizableTestGroupForm to create a custom root map since regular RootSet
785 requires CommitLog and other related objects which are hard to create without database entries.
786 (CustomRootSet.prototype.setRevisionForRepository): Added.
787 (CustomRootSet.prototype.repositories): Added.
788 (CustomRootSet.prototype.revisionForRepository): Added.
789 * public/v3/pages/analysis-task-page.js:
791 (AnalysisTaskPage.prototype.render): Removed the reference to v2 UI since v3 UI is now strictly more powerful
792 than v2 UI. Also update the root set maps in each form here.
793 (AnalysisTaskPage.prototype._retryCurrentTestGroup): No longer takes unused name argument as it got removed
795 (AnalysisTaskPage.prototype._chartSelectionDidChange): No longer updates the disabled-ness here since it's now
796 done in render() via setRootSetMap().
797 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Now takes rootSetMap as an argument.
798 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): No longer updates the disabled-ness here
799 since it's now done in render() via setRootSetMap().
800 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Now takes rootSetMap as an argument.
801 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Take a dictionary of root set labels
802 such as A and B, which maps to a RootSet or a newly-added CustomRootSet.
803 (AnalysisTaskPage.htmlTemplate): Use customizable-test-group-form for creating a new A/B testing group. Retry
804 form will continue to use TestGroupForm since customizing revisions is non-sensical in retries.
805 (AnalysisTaskPage.cssTemplate): Updated the style.
807 2016-02-16 Ryosuke Niwa <rniwa@webkit.org>
809 v3 UI has the capability to schedule an A/B testing in a specific range
810 https://bugs.webkit.org/show_bug.cgi?id=154329
812 Reviewed by Chris Dumez.
814 Extended AnalysisTaskChartPane and ResultsTable so that users can select a range of points in either
815 the overview chart pane and the results viewer table. Extracted TestGroupForm out of the analysis task
816 page and used right below those two components in the analysis task page.
818 * public/v3/components/results-table.js:
820 (ResultsTable.prototype.setRangeSelectorLabels): Added.
821 (ResultsTable.prototype.setRangeSelectorCallback): Added.
822 (ResultsTable.prototype.selectedRange): Added.
823 (ResultsTable.prototype._rangeSelectorClicked): Added.
824 (ResultsTable.prototype.render): Generate radio boxes to select a range.
826 * public/v3/components/test-group-form.js:
828 (TestGroupForm.prototype.setStartCallback): Added.
829 (TestGroupForm.prototype.setNeedsName): Added.
830 (TestGroupForm.prototype.setDisabled): Added.
831 (TestGroupForm.prototype.setLabel): Added.
832 (TestGroupForm.prototype.setRepetitionCount): Added.
833 (TestGroupForm.prototype._submitted): Added.
834 (TestGroupForm.htmlTemplate): Extracted from AnalysisTaskPage.htmlTemplate.
836 * public/v3/index.html:
838 * public/v3/pages/analysis-task-page.js:
839 (AnalysisTaskChartPane.prototype._mainSelectionDidChange): Added. Delegates the work to AnalysisTaskPage.
840 (AnalysisTaskChartPane.prototype.selectedPoints): Added.
842 (AnalysisTaskPage.prototype.title):
843 (AnalysisTaskPage.prototype.render):
844 (AnalysisTaskPage.prototype._renderTestGroupDetails): Use TestGroupForm's methods instead of mutating DOM.
845 (AnalysisTaskPage.prototype._retryCurrentTestGroup):
846 (AnalysisTaskPage.prototype._chartSelectionDidChange): Added.
847 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Added.
848 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): Added.
849 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Added.
850 (AnalysisTaskPage.prototype._createRetryNameForTestGroup):
851 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Extracted from _retryCurrentTestGroup
852 so that we can call it in _createNewTestGroupFromChart and _createNewTestGroupFromViewer.
853 (AnalysisTaskPage.htmlTemplate):
855 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
857 Extract the code specific to v2 UI out of shared statistics.js
858 https://bugs.webkit.org/show_bug.cgi?id=154277
860 Reviewed by Chris Dumez.
862 Extracted statistics-strategies.js out of statistics.js for v2 UI and detect-changes.js. The intent is to
863 deprecate this file once we implement refined statistics tools in v3 UI and adopt it in detect-changes.js.
865 * public/shared/statistics.js:
866 (Statistics.movingAverage): Extracted from the "Simple Moving Average" strategy.
867 (Statistics.cumultaiveMovingAverage): Extracted from the "Cumulative Moving Average" strategy.
868 (Statistics.exponentialMovingAverage): Extracted from the "Exponential Moving Average" strategy.
869 Use a temporary "movingAverage" to keep the last moving average instead of relying on the previous
870 entry in "averages" array to avoid special casing an array of length 1 and starting the loop at i = 1.
871 (Statistics.segmentTimeSeriesGreedyWithStudentsTTest): Extracted from "Segmentation: Recursive t-test"
872 strategy. Don't create the list of averages to match segmentTimeSeriesByMaximizingSchwarzCriterion here.
873 It's done in newly added averagesFromSegments.
874 (Statistics.segmentTimeSeriesByMaximizingSchwarzCriterion): Extracted from
875 "Segmentation: Schwarz criterion" strategy.
876 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Just store the start index to match
878 (App.Pane.updateStatisticsTools):
879 (App.Pane._computeMovingAverageAndOutliers):
881 * public/v2/index.html:
882 * public/v2/statistics-strategies.js: Added.
883 (StatisticsStrategies.MovingAverageStrategies): Added.
884 (averagesFromSegments): Extracted from "Segmentation: Schwarz criterion" strategy. Now used by both
885 "Segmentation: Recursive t-test" and "Segmentation: Schwarz criterion" strategies.
886 (StatisticsStrategies.EnvelopingStrategies): Moved from Statistics.EnvelopingStrategies.
887 (StatisticsStrategies.TestRangeSelectionStrategies): Moved from Statistics.TestRangeSelectionStrategies.
888 (createWesternElectricRule): Moved from statistics.js.
889 (countValuesOnSameSide): Ditto.
890 (StatisticsStrategies.executeStrategy): Moved from Statistics.executeStrategy.
891 * tools/detect-changes.js:
892 (computeRangesForTesting):
894 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
896 v1 UI and v2 UI should share statistics.js
897 https://bugs.webkit.org/show_bug.cgi?id=154262
899 Reviewed by Chris Dumez.
901 Share statistics.js between v1 and v2 UI.
904 * public/js/shared.js: Deleted.
905 * public/js/statistics.js: Removed.
906 * public/shared: Added.
907 * public/shared/statistics.js: Moved from Websites/perf.webkit.org/public/v2/js/statistics.js.
908 * public/v2/index.html:
909 * public/v2/js/statistics.js: Removed.
910 * public/v3/index.html:
911 * tools/detect-changes.js:
913 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
915 v3 UI sometimes shows same dates twice on the x-axis of time series charts
916 https://bugs.webkit.org/show_bug.cgi?id=154210
918 Reviewed by Chris Dumez.
920 The bug was caused by the label generation code in TimeSeriesChart.computeTimeGrid never emitting hours.
922 Use hours instead of dates as labels when the current time's date is same as the previous label's date.
923 Always include dates before entering this mode to avoid just having hours as labels on the entire x-axis.
925 * public/v3/components/time-series-chart.js:
926 (TimeSeriesChart.prototype._renderXAxis): Slightly increase the "average" width of x-axis label.
927 (TimeSeriesChart.computeTimeGrid): See above. Also assert that the number of labels we generate never
928 exceeds maxLabels as a sanity check.
929 (TimeSeriesChart._timeIterators): Added an iterator that increments by two hours for zoomed graphs.
931 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
933 v3 UI should show status and associated bugs on analysis task pages
934 https://bugs.webkit.org/show_bug.cgi?id=154212
936 Reviewed by Chris Dumez.
938 Added the capability to see and modify the status and the list of associated of bugs on analysis task pages.
940 Also added the list of related tasks, which are analysis tasks associated with the same bug or have
941 overlapping time ranges with the same test metric but on a potentially different platform.
943 In addition, categorize analysis tasks with the status of "no change" or "inconclusive" as "closed" as no
944 further action can be taken (users can bring them back to non-closed state without any restrictions).
946 * public/api/analysis-tasks.php:
947 (format_task): Categorize 'unchanged' and 'inconclusive' analysis tasks as closed.
949 * public/privileged-api/associate-bug.php:
950 (main): Added shouldDelete as a new mechanism to disassociate a bug since v3 UI shares a single Bug object
951 between multiple analysis tasks (as it should have been in the first place).
953 * public/v3/components/chart-pane-base.js:
955 (ChartPaneBase.prototype._fetchAnalysisTasks): Since each analysis task's change type (status/result) could
956 change, we need to create annotation objects during each render() call.
957 (ChartPaneBase.prototype.render):
958 (ChartPaneBase.prototype._renderAnnotations): Extracted from ChartPaneBase.prototype._fetchAnalysisTasks to
959 do that. I was afraid of the perf impact of this but it doesn't seem to be an issue in my testing.
960 (ChartPaneBase.cssTemplate): Removed superfluous margins (moved to ChartPane.cssTemplate) around the charts
961 since they are only useful in the charts page.
963 * public/v3/models/analysis-task.js:
965 (AnalysisTask.prototype.updateSingleton): Added a comment as to why object.result cannot be renamed to
966 object.changeType in the JSON API.
967 (AnalysisTask.prototype.updateName): Added.
968 (AnalysisTask.prototype.updateChangeType): Added.
969 (AnalysisTask.prototype._updateRemoteState): Added.
970 (AnalysisTask.prototype.associateBug): Added.
971 (AnalysisTask.prototype.disassociateBug): Added.
972 (AnalysisTask.fetchRelatedTasks): Added. See above for the criteria of related-ness.
974 * public/v3/pages/analysis-task-page.js:
976 (AnalysisTaskPage.prototype.updateFromSerializedState):
977 (AnalysisTaskPage.prototype._fetchRelatedInfoForTaskId): Extracted from updateFromSerializedState.
978 (AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks): Added.
979 (AnalysisTaskPage.prototype.render): Render the list of associated bugs, the list of bug trackers (so that
980 users can use it to associate with a new bug), and the list of related analysis tasks.
981 (AnalysisTaskPage.prototype._renderTestGroupList): Extracted from render since it was getting too long.
982 (AnalysisTaskPage.prototype._renderTestGroupDetails): Ditto.
983 (AnalysisTaskPage.prototype._updateChangeType): Added.
984 (AnalysisTaskPage.prototype._associateBug): Added.
985 (AnalysisTaskPage.prototype._disassociateBug): Added.
986 (AnalysisTaskPage.htmlTemplate): Added various elements to show and modify the status, associate bugs,
987 and a list of related analysis tasks.
988 (AnalysisTaskPage.cssTemplate): Added various styles for those form controls.
990 * public/v3/pages/chart-pane.js:
991 (ChartPane.cssTemplate): Moved the margins from ChartPaneBase.cssTemplate.
993 2016-02-12 Ryosuke Niwa <rniwa@webkit.org>
995 Perf dashboard should allow renaming analysis tasks and test groups
996 https://bugs.webkit.org/show_bug.cgi?id=154200
998 Reviewed by Chris Dumez.
1000 Allow editing names of analysis tasks and A/B testing groups in the v3 UI.
1002 Added the support for updating the name to the privileged API at /privileged-api/update-analysis-task
1003 and added a new prevailed API to update A/B testing groups at /privileged-api/update-test-group.
1005 * public/privileged-api/update-analysis-task.php: Added the support for renaming the analysis task.
1008 * public/privileged-api/update-test-group.php: Added. Supports updating the test group's name.
1011 * public/v3/components/editable-text.js: Added.
1012 (EditableText): Added. A new editable text label control. It looks like a text node with "(Edit)" link
1013 at the end which allow users to go into the "editing mode", which reveals an input element.
1014 The user can exit the editing mode by either moving the focus away from the control or clicking on
1015 "(Save)" at the end. It calls _updateCallback in the latter case.
1016 (EditableText.prototype.editedText): Returns the current value of the input element user.
1017 (EditableText.prototype.setText): Sets the label. This does not live-update the input element until
1018 the user exists the current editing mode and re-enters it.
1019 (EditableText.prototype.setStartedEditingCallback): Sets a callback which gets called when the user
1020 requested to enter the editing mode. Since EditableText relies on AnalysisTaskPage to render, this
1021 callback only exits to call EditableText.render() in AnalysisTask._didStartEditingTaskName.
1022 (EditableText.prototype.setUpdateCallback): Sets a callback which gets called when the user exits
1023 the editing mode by activating the "(Save)" link. This callback MUST return a promise upon resolution
1024 of which the control gets out of the editing mode. While the promise is in flight, the input element
1026 (EditableText.prototype.render): Updates various states of the elements. When _updatingPromise is not
1027 falsy, we make the input element readonly and show '(...)' on the link. Don't show the action link
1028 if the label is empty (e.g. analysis task or test group is still being fetched).
1029 (EditableText.prototype._didClick): Called when the user clicked on the action link. Enter the editing
1030 mode or save the edited label via _updateCallback.
1031 (EditableText.prototype._didBlur): Exit the editing mode without saving if the input element is not
1032 focused, there is no inflight promise returned by _updateCallback, and the action link "(Save)" does
1034 (EditableText.prototype._didUpdate): Called when exiting the editing mode.
1035 (EditableText.htmlTemplate):
1036 (EditableText.cssTemplate):
1038 * public/v3/index.html: Include newly added editable-text.js.
1040 * public/v3/models/analysis-task.js:
1041 (AnalysisTask.prototype.updateSingleton): Added.
1042 (AnalysisTask.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
1043 the analysis task from the sever.
1044 (AnalysisTask._constructAnalysisTasksFromRawData): Use ensureSingleton instead of manually calling
1045 findById since we need to update the name of the singleton object we found (via updateSingleton).
1047 * public/v3/models/bug.js:
1048 (Bug.ensureSingleton): Moved the code to compute the synthetic id from AnalysisTask's
1049 _constructAnalysisTasksFromRawData.
1050 (Bug.prototype.updateSingleton): Added. Just assert that nothing changes.
1052 * public/v3/models/build-request.js:
1053 (BuildRequest.prototype.updateSingleton): Added. Assert that the intrinsic values of a build request
1054 doesn't change and update status text, status url, and build id as they could change.
1056 * public/v3/models/commit-log.js:
1057 (CommitLog): Made the constructor argument conform to the convention of id, object pair so that we can
1058 use DataModelObject.ensureSingleton.
1059 (CommitLog.ensureSingleton):
1060 (CommitLog.prototype.updateSingleton): Extracted from CommitLog.ensureSingleton.
1062 * public/v3/models/data-model.js:
1063 (DataModelObject.ensureSingleton): Call newly added updateSingleton.
1064 (DataModelObject.prototype.updateSingleton):
1065 (LabeledObject): Removed the name map since it's never used (findByName is never called anywhere).
1066 (LabeledObject.prototype.updateSingleton): Added. Updates _name.
1067 (LabeledObject.findByName): Deleted.
1069 * public/v3/models/test-group.js:
1070 (TestGroup.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
1071 the test group from the sever.
1072 (TestGroup._createModelsFromFetchedTestGroups): Removed bogus code. A root set doesn't have a test
1073 group associated with it since multiple test groups can share a single root set (this property doesn't
1076 * public/v3/pages/analysis-task-page.js:
1077 (AnalysisTaskPage): Removed useless _taskId and added this._testGroupLabelMap and this._taskNameLabel.
1078 (AnalysisTaskPage.prototype.updateFromSerializedState): Cleanup.
1079 (AnalysisTaskPage.prototype._didFetchTask): Assert that this function is called exactly once.
1080 (AnalysisTaskPage.prototype.render): Use this._task.id() to show the v2 link. Use EditableText to show
1081 the names of the analysis task and the associated test groups. Hide the overview chart and the list of
1082 test groups (along with the retry/confirm button) when the analysis task failed to fetch. We always
1083 update the names of the analysis task and the associated test groups since they could be updated by
1085 (AnalysisTaskPage.prototype._didStartEditingTaskName): Added.
1086 (AnalysisTaskPage.prototype._updateTaskName): Added.
1087 (AnalysisTaskPage.prototype._updateTestGroupName): Added.
1088 (AnalysisTaskPage.htmlTemplate): Updated the style.
1090 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1092 Land the change that was supposed to be the part of r196463.
1094 * public/v3/pages/analysis-task-page.js:
1095 (AnalysisTaskPage.prototype._didFetchTestGroups): Select the latest test group by default.
1097 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1099 Refine v3 UI's analysis task page
1100 https://bugs.webkit.org/show_bug.cgi?id=154152
1102 Reviewed by Chris Dumez.
1104 This patch makes the following refinements to the analysis task page:
1105 - Always show the relative different of in-progress A/B testing.
1106 - Make the annotations (colored bars) in the chart open other analysis tasks.
1107 - Order the A/B testing groups in the reverse chronological order.
1108 - Select the time range corresponding to the current test group.
1110 * public/v3/components/analysis-results-viewer.js:
1111 (AnalysisResultsViewer.cssTemplate): Fixed the bug that pending and running testing groups are no longer
1112 colored after r196440. Use a slightly more opaque color for currently running groups compared to pending ones.
1114 * public/v3/components/chart-pane-base.js:
1115 (ChartPaneBase.prototype.setMainSelection): Added.
1116 (ChartPaneBase.prototype._openAnalysisTask): Moved the code from ChartPane._openAnalysisTask so that it can be
1117 reused in both AnalysisTaskChartPane and ChartPane (in charts page).
1118 (ChartPaneBase.prototype.router): Added. Overridden by each subclass.
1120 * public/v3/components/test-group-results-table.js:
1121 (TestGroupResultsTable.prototype.buildRowGroups): Always show the summary (relative difference of A to B) as
1122 long as there are some results in each set.
1124 * public/v3/models/test-group.js:
1125 (TestGroup.prototype.compareTestResults): Always set .label and .fullLabel with the relative change as long as
1126 there are some values. Keep using "pending" and "running" in .status since that would determine the color of
1127 stacking blocks representing those A/B testing groups.
1129 * public/v3/pages/analysis-task-page.js:
1130 (AnalysisTaskChartPane):
1131 (AnalysisTaskChartPane.prototype.setPage): Added.
1132 (AnalysisTaskChartPane.prototype.router): Added.
1134 (AnalysisTaskPage.prototype.render): Show the list of A/B testing groups in the reverse chronological order.
1135 Also set the main chart's selection to the time range of the current test group.
1137 * public/v3/pages/chart-pane.js:
1138 (ChartPane.prototype.router): Added.
1139 (ChartPane.prototype._openAnalysisTask): Moved to ChartPaneBase.prototype._openAnalysisTask.
1141 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1143 Add a script to process backlogs created while perf dashboard was in the maintenance mode
1144 https://bugs.webkit.org/show_bug.cgi?id=154140
1146 Reviewed by Chris Dumez.
1148 Added a script to process the backlog JSONs created while the perf dashboard was put in the maintenance mode.
1149 It re-submits each JSON file to the perf dashboard using the same server config file used by syncing scripts.
1151 * public/include/report-processor.php:
1152 (TestRunsGenerator::test_value_list_to_values_by_iterations): Fixed a bug in the error message code. It was
1153 referencing an undeclared variable.
1154 * tools/process-maintenance-backlog.py: Added.
1156 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1158 AnalysisResultsViewer never uses this._smallerIsBetter
1159 https://bugs.webkit.org/show_bug.cgi?id=154134
1161 Reviewed by Chris Dumez.
1163 Removed the unused instance variable _smallerIsBetter from AnalysisResultsViewer and TestGroupStackingBlock.
1165 * public/v3/components/analysis-results-viewer.js:
1166 (AnalysisResultsViewer): Removed the unused _smallerIsBetter.
1167 (AnalysisResultsViewer.prototype.setSmallerIsBetter): Deleted.
1168 (AnalysisResultsViewer.prototype.buildRowGroups):
1169 (AnalysisResultsViewer.TestGroupStackingBlock): Removed the unused _smallerIsBetter.
1170 * public/v3/pages/analysis-task-page.js:
1171 (AnalysisTaskPage.prototype._didFetchTask):
1173 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1175 Build fix after r196440.
1177 * public/v3/models/test-group.js:
1178 (TestGroup.prototype.addBuildRequest): Clear the map instead of setting the property to null.
1180 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
1182 Perf dashboard should have UI to retry A/B testing
1183 https://bugs.webkit.org/show_bug.cgi?id=154090
1185 Reviewed by Chris Dumez.
1187 Added a button to re-try an existing A/B testing group with a custom repetition count. The same button functions
1188 as a way of confirming the progression/regression when there have been no A/B testing scheduled in the task.
1190 Also fixed the bug that A/B testing groups that have been waiting for other test groups will be shown as "running".
1192 * public/v3/components/results-table.js:
1193 (ResultsTable.cssTemplate): Don't pad the list of extra repositories when it's empty.
1195 * public/v3/components/test-group-results-table.js:
1196 (TestGroupResultsTable.prototype.buildRowGroups): Use TestGroup.labelForRootSet instead of manually
1197 computing the letter for each configuration set.
1199 * public/v3/models/build-request.js:
1200 (BuildRequest.prototype.hasStarted): Added.
1202 * public/v3/models/data-model.js:
1203 (DataModelObject.ensureSingleton): Added.
1204 (DataModelObject.cachedFetch): Added noCache option. This is used when re-fetching the test groups after
1207 * public/v3/models/measurement-cluster.js:
1208 (MeasurementCluster.prototype.startTime): Added.
1210 * public/v3/models/measurement-set.js:
1211 (MeasurementSet.prototype.hasFetchedRange): Added. Returns true only if there are no "holes" (cluster
1212 yet to be fetched) between the specified time range. This was added to fix a bug in AnalysisTaskPage's
1213 _didFetchMeasurement.
1215 * public/v3/models/test-group.js:
1216 (TestGroup): Added this._rootSetToLabel.
1217 (TestGroup.prototype.addBuildRequest): Reset this._rootSetToLabel along with this._requestedRootSets.
1218 (TestGroup.prototype.repetitionCount): Added. Returns the number of iterations executed per set. We assume that
1219 every root set in the test group shares a single repetition count.
1220 (TestGroup.prototype.requestedRootSets): Now populates this._rootSetToLabel for labelForRootSet.
1221 (TestGroup.prototype.labelForRootSet): Added.
1222 (TestGroup.prototype.hasStarted): Added.
1223 (TestGroup.prototype.compareTestResults): Use 'running' and 'pending' to differentiate test groups that are waiting
1224 for other groups to finish running from the ones that are actually running ('incomplete' before this patch).
1225 (TestGroup.fetchByTask):
1226 (TestGroup.createAndRefetchTestGroups): Added. Creates a new test group using the privileged-api/create-test-group
1227 and fetches the list of test groups for the specified analysis task.
1228 (TestGroup._createModelsFromFetchedTestGroups): Extracted from TestGroup.fetchByTask.
1230 * public/v3/pages/analysis-task-page.js:
1231 (AnalysisTaskPage): Initialize _renderedCurrentTestGroup to undefined so that we'd always can differentiate
1232 the initial call to AnalysisTaskPage.render and subsequent calls in which it's identical to _currentTestGroup.
1233 (AnalysisTaskPage.prototype._didFetchMeasurement): Fixed a bug that we don't exit early even when some
1234 clusters in between startPoint and endPoint are still being fetched via newly added hasFetchedRange.
1235 (AnalysisTaskPage.prototype.render): Update the default repetition count based on the current test group.
1236 Also update the label of the button to "Confirm the change" if there is no A/B testing in this task.
1237 (AnalysisTaskPage.prototype._retryCurrentTestGroup): Added. Re-triggers an existing A/B testing group or creates
1238 the A/B testing for the entire range of the analysis task.
1239 (AnalysisTaskPage.prototype._hasDuplicateTestGroupName): Added.
1240 (AnalysisTaskPage.prototype._createRetryNameForTestGroup): Added.
1241 (AnalysisTaskPage.htmlTemplate): Added form controls to re-trigger A/B testing.
1242 (AnalysisTaskPage.cssTemplate): Updated the style.
1244 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
1246 Removed the duplicated definition of ChartPaneBase.
1248 * public/v3/components/chart-pane-base.js:
1250 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
1252 Analysis task page on v3 UI should show charts
1253 https://bugs.webkit.org/show_bug.cgi?id=154057
1255 Reviewed by Chris Dumez.
1257 Extracted ChartPaneBase out of ChartPane and added an instance of its new subclass, AnalysisTaskChartPane,
1258 to the analysis task page. The main difference is that ChartPaneBase doesn't depend on the presence of
1259 this._chartsPage unlike ChartPane. It also doesn't have the header with toolbar (to show breakdown, etc...).
1261 * public/v3/components/base.js:
1262 (ComponentBase.prototype._constructShadowTree): Call htmlTemplate() and cssTemplate() with the right "this".
1264 * public/v3/components/chart-pane-base.js: Added.
1265 (ChartPaneBase): Extracted from ChartPane.
1266 (ChartPaneBase.prototype.configure): Extracted from the constructor. Separating this function allows the
1267 component to be instantiated inside a HTML template.
1268 (ChartPaneBase.prototype._fetchAnalysisTasks): Moved from ChartPane._fetchAnalysisTasks.
1269 (ChartPaneBase.prototype.platformId): Ditto.
1270 (ChartPaneBase.prototype.metricId): Ditto.
1271 (ChartPaneBase.prototype.setOverviewDomain): Ditto.
1272 (ChartPaneBase.prototype.setMainDomain): Ditto.
1273 (ChartPaneBase.prototype._overviewSelectionDidChange): Extracted from the constructor. This is overridden in
1274 ChartPane and unused in AnalysisTaskChartPane.
1275 (ChartPaneBase.prototype._mainSelectionDidChange): Extracted from ChartPane._mainSelectionDidChange.
1276 (ChartPaneBase.prototype._mainSelectionDidZoom): Extracted from ChartPane._mainSelectionDidZoom.
1277 (ChartPaneBase.prototype._indicatorDidChange): Extracted from ChartPane._indicatorDidChange.
1278 (ChartPaneBase.prototype._didFetchData): Moved from ChartPane._fetchAnalysisTasks.
1279 (ChartPaneBase.prototype._openAnalysisTask): Ditto.
1280 (ChartPaneBase.prototype._openCommitViewer): Ditto. Also fixed a bug that we don't show the spinner while
1281 waiting for the data to be fetched by calling this.render() here.
1282 (ChartPaneBase.prototype._keyup): Moved from ChartPane._keyup. Also fixed the bug that the revisions list
1283 doesn't update by calling this.render() here.
1284 (ChartPaneBase.prototype.render): Extracted from ChartPane.render.
1285 (ChartPaneBase.htmlTemplate): Extracted from ChartPane.htmlTemplate.
1286 (ChartPaneBase.paneHeaderTemplate): Added. This is overridden in ChartPane and unused in AnalysisTaskChartPane.
1287 (ChartPaneBase.cssTemplate): Extracted from ChartPane.htmlTemplate.
1289 * public/v3/components/chart-styles.js: Renamed from public/v3/pages/page-with-charts.js.
1290 (PageWithCharts): Renamed from PageWithCharts since it no longer extends PageWithHeading.
1291 (ChartStyles.createChartSourceList):
1293 * public/v3/components/commit-log-viewer.js:
1294 (CommitLogViewer.prototype.view): Set this._repository right away instead of waiting for the fetched data
1295 so that spinner will be shown while the data is being fetched.
1297 * public/v3/index.html:
1299 * public/v3/pages/analysis-task-page.js:
1300 (AnalysisTaskChartPane): Added extends ChartPaneBase.
1301 (AnalysisTaskPage): Added. this._chartPane.
1302 (AnalysisTaskPage.prototype._didFetchTask): Initialize this._chartPane with a domain.
1303 (AnalysisTaskPage.prototype.render): Render this._chartPane.
1304 (AnalysisTaskPage.htmlTemplate):
1306 * public/v3/pages/chart-pane-status-view.js:
1307 (ChartPaneStatusView): Removed the unused router from the argument list.
1308 (ChartPaneStatusView.prototype.pointsRangeForAnalysis): Renamed from analyzeData() since it was ambiguous.
1309 (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Fixed the bug that we don't update the list
1310 of the revisions here.
1311 (ChartPaneStatusView.prototype.computeChartStatusLabels):
1313 * public/v3/pages/chart-pane.js:
1314 (ChartPane): Now extends ChartPaneBase.
1315 (ChartPane.prototype._overviewSelectionDidChange): Extracted from the constructor.
1316 (ChartPane.prototype._mainSelectionDidChange):
1317 (ChartPane.prototype._mainSelectionDidZoom):
1318 (ChartPane.prototype._indicatorDidChange):
1319 (ChartPane.prototype.render):
1320 (ChartPane.prototype._renderActionToolbar):
1321 (ChartPane.paneHeaderTemplate): Extracted from htmlTemplate.
1322 (ChartPane.cssTemplate):
1323 (ChartPane.overviewOptions.selection.onchange): Deleted.
1324 (ChartPane.prototype._fetchAnalysisTasks): Deleted.
1325 (ChartPane.prototype.platformId): Deleted.
1326 (ChartPane.prototype.metricId): Deleted.
1327 (ChartPane.prototype.setOverviewDomain): Deleted.
1328 (ChartPane.prototype.setMainDomain): Deleted.
1329 (ChartPane.prototype._openCommitViewer): Deleted.
1330 (ChartPane.prototype._didFetchData): Deleted.
1331 (ChartPane.prototype._keyup): Deleted.
1333 * public/v3/pages/charts-page.js:
1335 (ChartsPage.createDomainForAnalysisTask): Extracted by createDomainForAnalysisTask; used to set the domain
1336 of the charts in the analysis task page.
1337 (ChartsPage.createStateForAnalysisTask):
1339 * public/v3/pages/dashboard-page.js:
1341 (DashboardPage.prototype._createChartForCell):
1343 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
1345 Add the support for maintenance mode
1346 https://bugs.webkit.org/show_bug.cgi?id=154072
1348 Reviewed by Chris Dumez.
1350 Added the crude support for maintenance mode whereby which the reports are stored in the filesystem
1351 instead of the database.
1353 * config.json: Added maintenanceMode and maintenanceDirectory as well as forgotten siteTitle and
1354 remoteServer.httpdMutexDir.
1355 * public/api/report.php:
1356 (main): Don't connect to the database or modify database when maintenanceMode is set.
1357 * public/include/json-header.php:
1358 (ensure_privileged_api_data): Exit with InMaintenanceMode when maintenanceMode is set. This prevents
1359 privileged API such as creating analysis tasks and new A/B testing groups from modifying the database.
1361 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
1363 Analysis task page on v3 show progression as regressions
1364 https://bugs.webkit.org/show_bug.cgi?id=154045
1366 Reviewed by Chris Dumez.
1368 The bug was caused by TestGroup.compareTestResults referring to undefined _smallerIsBetter.
1369 Retrieve it from the associated metric object via the owner analysis task.
1371 * public/v3/models/test-group.js:
1373 2016-02-05 Ryosuke Niwa <rniwa@webkit.org>
1375 Testing with remote server cache is unusably slow
1376 https://bugs.webkit.org/show_bug.cgi?id=153928
1378 Reviewed by Chris Dumez.
1380 Don't use the single process mode of httpd as it's way too slow even for testing.
1381 Also we'll hit a null pointer crash (http://svn.apache.org/viewvc?view=revision&revision=1711479)
1383 Since httpd exits immediately when launched in multi-process mode, remote-cache-server.py (renamed from
1384 run-with-remote-server.py) now has "start" and "stop" commands to start/stop the Apache. Also added
1385 "reset" command to reset the cache for convenience.
1387 * Install.md: Updated the instruction.
1388 * config.json: Fixed a typo: httpdErro*r*Log.
1389 * tools/remote-cache-server.py: Copied from Websites/perf.webkit.org/tools/run-with-remote-server.py.
1390 Now takes one of the following commands: "start", "stop", and "reset".
1392 (start_httpd): Extracted from main.
1393 (stop_httpd): Added.
1394 * tools/remote-server-relay.conf: Removed redundant (duplicate) LoadModule's.
1395 * tools/run-with-remote-server.py: Removed.
1397 2016-02-04 Ryosuke Niwa <rniwa@webkit.org>
1399 Perf dashboard should have a script to setup database
1400 https://bugs.webkit.org/show_bug.cgi?id=153906
1402 Reviewed by Chris Dumez.
1404 Added tools/setup-database.py to setup the database. It retrieves the database name, username, password
1405 and initializes a database at the specified location.
1407 * Install.md: Updated instruction to setup postgres to use setup-database.py.
1408 * tools/setup-database.py: Added.
1410 (load_database_config):
1411 (determine_psql_dir):
1412 (start_or_stop_database):
1413 (execute_psql_command):
1415 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
1417 buildbot syncing scripts sometimes schedule more than one requests per builder
1418 https://bugs.webkit.org/show_bug.cgi?id=153047
1420 Reviewed by Chris Dumez.
1422 The bug was caused by the check for singularity of scheduledRequests being conducted per configuration
1423 instead of per builder. So if there were multiple test configurations (e.g. Speedometer and Octane) that
1424 both used the same builder, then we may end up scheduling both at once.
1426 Fixed the bug by sharing a single set to keep track of the scheduled requests for all configurations per
1429 * tools/sync-with-buildbot.py:
1430 (load_config): Share a set amongst test configurations for each builder.
1431 (find_request_updates): Instead of creating a new set for each configuration, reuse the existing sets to
1432 share a single set agmonst test configurations for each builder.
1434 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
1436 Analysis results viewer sometimes doesn't show the correct relative difference
1437 https://bugs.webkit.org/show_bug.cgi?id=152930
1439 Reviewed by Chris Dumez.
1441 The bug was caused by single A/B testing result associated with multiple rows when there are multiple data
1442 points with the same root set which matches that of an A/B testing.
1444 Fixed the bug by detecting such a case, and only associating each A/B testing result with the row created
1445 for the first matching point.
1447 * public/v3/components/analysis-results-viewer.js:
1448 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
1450 2016-01-08 Ryosuke Niwa <rniwa@webkit.org>
1452 Make v3 UI analysis task page is hard to understand
1453 https://bugs.webkit.org/show_bug.cgi?id=152917
1455 Reviewed by Antti Koivisto.
1457 Add a dark gray border around the selected block in the analysis results viewer instead of using darker
1458 shades since that looks as if they were bigger regression/progression.
1460 Explicitly show "Failed" as the label instead of omitting with "-" when all build requests in an A/B
1461 testing group fails.
1463 * public/v3/components/analysis-results-viewer.js:
1464 (AnalysisResultsViewer.cssTemplate): Tweaked the style to underline text in the hovered blocks and the
1465 selected blocks and show a dark gray border around the selected blocks.
1466 (AnalysisResultsViewer.TestGroupStackingBlock):
1467 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Use this._title for title.
1468 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
1469 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForRootSet): Deleted.
1471 * public/v3/components/results-table.js:
1472 (ResultsTable.prototype.render):
1473 (ResultsTable.prototype._createRevisionListCells): Extracted from ResultsTable.prototype.render.
1474 (ResultsTable.cssTemplate): Tweaked the style.
1476 (ResultsTableRow.prototype.constructor): Added _labelForWholeRow to store the label for the entire row.
1477 This is used to show the comparison result of two root sets (e.g. A vs B).
1478 (ResultsTableRow.prototype.setLabelForWholeRow): Added.
1479 (ResultsTableRow.prototype.labelForWholeRow): Added.
1480 (ResultsTableRow.prototype.resultContent): Extracted from buildHeading. Creates a hyperlinked bar graph
1481 used for each A/B testing result.
1482 (ResultsTableRow.prototype.buildHeading): Deleted since we need to set colspan on the second table cell
1483 when we're creating a row with _labelForWholeRow.
1485 * public/v3/components/test-group-results-table.js:
1486 (TestGroupResultsTable.prototype.buildRowGroups): Added rows to show relative differences and statistical
1487 significance between root sets (e.g. A vs B).
1489 * public/v3/models/build-request.js:
1490 (BuildRequest.prototype.hasCompleted): Added.
1492 * public/v3/models/test-group.js:
1493 (TestGroup.prototype.compareTestResults): Extracted from AnalysisResultsViewer.TestGroupStackingBlock's
1494 _computeTestGroupStatus and generalized to be reused in TestGroupResultsTable.
1495 (TestGroup.prototype._valuesForRootSet): Moved from AnalysisResultsViewer.TestGroupStackingBlock.
1497 * public/v3/pages/analysis-task-page.js:
1498 (AnalysisTaskPage.cssTemplate): Tweaked the style.
1500 2016-01-07 Ryosuke Niwa <rniwa@webkit.org>
1502 Perf dashboard should automatically add aggregators
1503 https://bugs.webkit.org/show_bug.cgi?id=152818
1505 Reviewed by Chris Dumez.
1507 When an aggregator entry is missing in aggregators table, automatically insert it in /api/report.
1509 In a very early version of the perf dashboard, we had the ability to define a custom aggregator
1510 in an admin page. In practice, nobody used or needed this feature so we got rid of it even before
1511 the dashboard was landed into WebKit repository. This patch cleans up that mess.
1514 (main): Added the filtering capability.
1515 (TestEnvironment): Expose the config JSON in the test environment.
1517 * public/include/report-processor.php:
1518 (ReportProcessor): Renamed name_to_aggregator now that it only contains ID.
1519 (ReportProcessor::__construct): No longer fetches the aggregator table. An equivalent work is done
1520 in newly added ensure_aggregators.
1521 (ReportProcessor::process): Calls ensure_aggregators which populates name_to_aggregator_id.
1522 (ReportProcessor::ensure_aggregators): Added. Add the builtin aggregators: Arithmetic, Geometric,
1523 Harmonic, and Total.
1524 (TestRunsGenerator): Renamed name_to_aggregator now that it only contains ID.
1525 (TestRunsGenerator::__construct):
1526 (TestRunsGenerator::add_aggregated_metric): Don't include aggregator_definition here since it's
1527 never used now that all the aggregations are done natively in PHP.
1528 (TestRunsGenerator::$aggregators): Added. We don't include SquareSum since it's only used for
1529 computing run_square_sum_cache in test_runs table and it's useless elsewhere.
1530 (TestRunsGenerator::aggregate_values): Add a comment about that.
1532 * tests/api-report.js: Updated a test case to reflect the change.
1534 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1536 Perf dashboard JSON API should fail gracefully when postgres is down
1537 https://bugs.webkit.org/show_bug.cgi?id=152812
1539 Reviewed by Chris Dumez.
1541 Even though all JSON APIs returned DatabaseConnectionFailure as the status when Database::connect
1542 returned a falsy value, PHP was spitting out warnings and producing HTTP responses that cannot be
1543 parsed as a JSON when pg_connect failed.
1545 Fixed the bug by suppressing warning messages in pg_connect.
1547 * public/include/db.php:
1548 (Database::connect): Use '@' prefix to suppress warning messages.
1550 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1552 Perf dashboard should auto-generate manifest file when one is missing
1553 https://bugs.webkit.org/show_bug.cgi?id=152813
1555 Reviewed by Chris Dumez.
1557 When /data/manifest.json is missing, fall back to newly added /api/manifest instead of
1558 silently failing to show the UI. This will make the initial setup easier.
1560 * public/api/manifest.php: Added.
1562 * public/include/manifest.php:
1563 (Manifest::manifest): Added.
1564 * public/v3/main.js:
1566 (didFetchManifest): Extracted from fetchManifest.
1568 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1570 Commit another forgotten change, this time, for r194653.
1572 * public/v3/models/measurement-set.js:
1574 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1576 The sampling of time series on v3 UI is too aggressive
1577 https://bugs.webkit.org/show_bug.cgi?id=152804
1579 Reviewed by Chris Dumez.
1581 Fixed a bug that we were always halving the number of data points in _sampleTimeSeries
1582 and increased the number of data points allowed to make the sampling less aggressive.
1584 * public/v3/components/time-series-chart.js:
1585 (TimeSeriesChart.prototype._ensureSampledTimeSeries): Increase the number of maximum points
1586 to 2x the number of pixels divided by the radius of each point.
1587 (TimeSeriesChart.prototype._sampleTimeSeries.findMedian): Changed the semantics of endIndex
1588 to mean the index after the last point and renamed it to indexAfterEnd.
1589 (TimeSeriesChart.prototype._sampleTimeSeries): Fixed a bug that this code always coerced two
1590 data points into one sampled data point despite of the fact i and j are sufficiently apart
1591 since data[j].time - data[i].time > timePerSample by definition.
1593 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1595 Commit the forgotten change for r194651.
1597 * public/v3/pages/domain-control-toolbar.js:
1598 (DomainControlToolbar.prototype.setStartTime):
1600 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1602 The right hand side of main chart appears to be cut off as you zoom out on v3 UI
1603 https://bugs.webkit.org/show_bug.cgi?id=152778
1605 Reviewed by Antti Koivisto.
1607 Add a padding on x-axis after the end time to make the main chart more easily interactive.
1609 * public/v3/components/time-series-chart.js:
1610 (TimeSeriesChart.prototype._computeHorizontalRenderingMetrics):
1612 * public/v3/pages/page-with-charts.js:
1613 (PageWithCharts.mainChartOptions): Add a padding of 5px at the end of x-axis.
1615 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1617 v3 UI should use four sig-figs to label y-axis of the main charts
1618 https://bugs.webkit.org/show_bug.cgi?id=152779
1620 Reviewed by Antti Koivisto.
1622 Increase the number of significant figures used in the main charts to four as done in v2 UI.
1624 * public/v3/pages/chart-pane.js:
1625 (ChartPane.constructor): Create a formatter with four significant figures.
1626 * public/v3/pages/page-with-charts.js:
1627 (PageWithCharts.mainChartOptions): Increase the width of y-axis labels.
1629 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1631 v3 UI's time range slider is harder to use than that of v2 UI
1632 https://bugs.webkit.org/show_bug.cgi?id=152780
1634 Reviewed by Antti Koivisto.
1636 Improved the time range slider by using a cubic mapping to time range and providing a text field
1637 to directly edit the number of days to show.
1639 Now an user can enter the text mode to directly edit the number of days to show by clicking on
1640 the number of days (text field is always there with opacity=0).
1642 * public/v3/pages/charts-toolbar.js:
1643 (ChartsToolbar): Store the minimum and maximum number of days allowed. Also rename _inputElement
1644 to _slider and added a new type=number text field as _editor.
1645 (ChartsToolbar.prototype.render):
1646 (ChartsToolbar.prototype.setStartTime): Exit the text mode when the number of days is changed by
1647 an URL state transition (i.e. back/forward navigation).
1648 (ChartsToolbar.prototype._setInputElementValue): Added. Updates the values of _slider and _editor.
1649 (ChartsToolbar.prototype._enterTextMode): Added. Hide the elements used by the slider mode and
1650 show the text field.
1651 (ChartsToolbar.prototype._exitTextMode): Added. Does the opposite.
1652 (ChartsToolbar.prototype._sliderValueMayHaveChanged): Renamed from _inputValueMayHaveChanged.
1653 (ChartsToolbar.prototype._editorValueMayHaveChanged): Added. Similar to _sliderValueMayHaveChanged
1654 but also corrects the value of _editor if needed.
1655 (ChartsToolbar.prototype._callNumberOfDaysCallback): Extracted from _inputValueMayHaveChanged.
1656 Also fixed a bug that we didn't update the URL state when the change event was fired without
1657 modifying the effective number of days.
1658 (ChartsToolbar.cssTemplate): Tweaked the style to support the new mode. Also set a fixed width on
1659 the span showing the number of days in the slider mode.
1661 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1663 Zooming button is broken on v3 UI
1664 https://bugs.webkit.org/show_bug.cgi?id=152777
1666 Reviewed by Chris Dumez.
1668 Bring up the zoom button in z-index so that users can click it.
1670 * public/v3/components/interactive-time-series-chart.js:
1671 (InteractiveTimeSeriesChart.cssTemplate):
1673 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1675 v3 UI doesn't preserve the time range when charts page is opened from a dashboard
1676 https://bugs.webkit.org/show_bug.cgi?id=152776
1678 Reviewed by Chris Dumez.
1680 Fixed the bug by moving the construction of charts URL from DashboardPage.prototype.open to
1681 DashboardPage.prototype.render and re-rendering the entire page upon an URL state transition.
1683 * public/v3/pages/charts-page.js:
1684 (ChartsPage.createStateForDashboardItem): Takes the start time for the charts page.
1686 * public/v3/pages/dashboard-page.js:
1687 (DashboardPage.prototype.updateFromSerializedState): Merged _numberOfDaysDidChange and
1688 _updateChartsDomainFromToolbar into this function since they're not used elsewhere. Also re-render
1689 the entire page when transition between different number of days to show.
1690 (DashboardPage.prototype._numberOfDaysDidChange): Deleted.
1691 (DashboardPage.prototype._updateChartsDomainFromToolbar): Deleted.
1692 (DashboardPage.prototype.render): Construct URL for each charts here.
1693 (DashboardPage.prototype._createChartForCell): Don't construct URL here since this function is
1694 called once when the dashboard page is opened, and not when the time range is changed.
1696 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1698 Build fix for an old version of PHP after r194618.
1700 * public/api/measurement-set.php:
1702 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1704 A/B testing results should be visualized intuitively on v3 UI
1705 https://bugs.webkit.org/show_bug.cgi?id=152496
1707 Rubber-stamped by Chris Dumez.
1709 Add the "stacking block" view of A/B testing results to the analysis task page on v3 UI.
1711 The patch enhances JSON APIs at /api/analysis-task /api/measurement-set/ to reduce the number of
1712 HTTP requests, and adds two UI components: TestGroupResultsTable and AnalysisResultsViewer both
1713 of which inherits from an abstract superclass: ResultsTable.
1715 ResultsTable provides a tabular presentation of measured values in regular measurement sets and
1716 A/B testing results using groups of bar graphs created by BarGraphGroup. TestGroupResultsTable
1717 inherits from this class to display A/B testing configurations and the averaged results for each
1718 configuration, and AnalysisResultsViewer inherits from it to provide an intuitive visualization
1719 of the outcomes of all A/B testing results associated with a given analysis task.
1721 * public/api/analysis-tasks.php:
1722 (main): Add the capability to find the analysis task based on its build request.
1723 This allows /v3/#/analysis/task/?buildRequest=<id> to be hyperlinked on buildbot page.
1725 * public/api/measurement-set.php:
1726 (main): Removed the unused startTime and endTime, and added "analysisTask" to query parameters.
1727 (AnalysisResultsFetcher): Added. Used to fetch measured data associated with every build request
1728 on an analysis task.
1729 (AnalysisResultsFetcher::__construct):
1730 (AnalysisResultsFetcher::fetch): Unlike MeasurementSetFetcher, we fetch the list of commits and
1731 list of measurements separately since there will be a lot less builds and commits than measured
1732 data (since we're fetching measured values for all tests and their metrics).
1733 (AnalysisResultsFetcher::fetch_commits): Fetches commits.
1734 (AnalysisResultsFetcher::format_measurement): Like MeasurementSetFetcher::format_measurement but
1735 with config_type and config_metric since we're returning measured data for all metrics and test
1737 (AnalysisResultsFetcher::format_map): Similar to MeasurementSetFetcher::format_map.
1739 * public/v3/components/analysis-results-viewer.js: Added.
1740 (AnalysisResultsViewer): Added.
1741 (AnalysisResultsViewer.prototype.didUpdateResults): This callback is called by AnalysisTaskPage
1742 when A/B testing results become available.
1743 (AnalysisResultsViewer.prototype.render): Overrides ResultsTable's render to highlight the block
1744 representing the currently selected test group.
1746 (AnalysisResultsViewer.prototype.buildRowGroups): Creates a list of rows with "stacking blocks"
1747 that visualizes A/B testing results. The algorithm works as follows: 1. Create all table rows.
1748 2. Find which row is associated with each set in each test group. 3. Layout "blocks".
1750 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Collects root sets from all data
1751 in the measurement set as well as A/B testing **requests** (results may contain more repositories
1752 than requested but they aren't interesting for the purpose of visualizing results for the entire
1755 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Create table rows. First,
1756 create table rows for measurement set points that have a matching test group (i.e. either set A
1757 or set B of an A/B testing uses the same root set as a point). Second, insert a new row for each
1758 root set in each test group which didn't find a matching measurement set point. There is a little
1759 subtlety that some A/B testing may specify revisions for a subset of repositories and/or some A/B
1760 testing results may appear as if it goes back in time with respect to other A/B testing results.
1761 For example, consider creating two A/B test groups for WebKit changes and OS changes separately.
1762 There could be no coherent linearization of those two A/B testing in which both WebKit and OS
1763 versions move forward.
1765 (AnalysisResultsViewer.RootSetInTestGroup): Added. Represents a pair (test group, root set) since
1766 a root set could be shared by multiple test groups.
1767 (AnalysisResultsViewer.TestGroupStackingBlock): Added. A stacked block representing a test group.
1768 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex): Associates a row number with
1769 either set A or set B.
1770 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Creates a table cell
1772 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Returns true if this test group
1773 has failed and this block should look "thin" without any label.
1774 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus): Computes the
1775 status for this test group.
1777 (AnalysisResultsViewer.TestGroupStackingGrid): Added. AnalysisResultsViewer uses this class to
1778 layout blocks representing test groups.
1779 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.insertBlockToColumn): Inserts a new block
1780 to layout. We keep all test groups doing the same A/B test next to each other.
1781 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.layout): Layouts each block / test group
1782 in the order they are created.
1783 (AnalysisResultsViewer.TestGroupStackingGrid.prototype._layoutBlock): Places the block in the
1784 left-most column that can accommodate it while avoiding columns of a different thin-ness. A column
1785 is thin if its A/B testing has failed, and not thin otherwise.
1786 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.createCellsForRow): Creates table cells for
1787 a given row. For each column, generate a table cell if we're in the first row and the first block
1788 starts in a later row, a block starts in the current row, or the last block ended in the previous
1789 row and the next block or the last row appears later.
1791 * public/v3/components/bar-graph-group.js: Added. A component for showing a group of bar graphs.
1792 (BarGraphGroup): Added. Creates a group of bar graphs with the same value range. It's used by
1793 AnalysisResultsViewer and ResultsTable to show bar graphs to compare values.
1794 (SingleBarGraph): A component created and collectively controlled by BarGraphGroup.
1796 * public/v3/components/results-table.js: Added.
1797 (ResultsTable): An abstract superclass for TestGroupResultsTable and AnalysisResultsViewer.
1799 (ResultsTable.prototype.render): Renders the table. 1. Call "buildRowGroups()" implemented by
1800 a subclass to obtain the list of rows. 2. Compute the list of repositories to show. 3. For each
1801 cell in the table, compute the number of rows to show the same value (for rowspan). 4. Render the
1802 table with an extra list of repositories if exists.
1804 (ResultsTable.prototype._computeRepositoryList): Compute the list of repositories to list
1805 revisions in the table. Omit repositories not present in any row or for which all rows have the
1806 same revision. In the latter case, include it in the extra repositories listed below the table.
1807 This minimizes the amount of redundant information presented to the user.
1809 (ResultsTableRow): Added. Represents a single row in the table. ResultsTable constructs necessary
1810 table cells to tabulate the associated root sets, and shows the associated result using a grouped
1811 bar graph. Additional columns are used by AnalysisResultsViewer to show stacked blocks for A/B
1814 * public/v3/components/test-group-results-table.js: Added.
1815 (TestGroupResultsTable):
1816 (TestGroupResultsTable.prototype.didUpdateResults):
1817 (TestGroupResultsTable.prototype.setTestGroup):
1818 (TestGroupResultsTable.prototype.heading):
1819 (TestGroupResultsTable.prototype.render):
1820 (TestGroupResultsTable.prototype.buildRowGroups):
1822 * public/v3/index.html:
1823 * public/v3/models/analysis-results.js: Added.
1824 (AnalysisResults): Added. Like MeasurementSet, this class represents a set of measured values
1825 associated with a given analysis task.
1826 (AnalysisResults.prototype.find): Returns a measured valued for a given build and metric.
1827 (AnalysisResults.prototype.add): Adds a new measured value. Used by AnalysisResults.fetch.
1828 (AnalysisResults.fetch): Fetches data and creates AnalysisResults for a given analysis task.
1830 * public/v3/models/analysis-task.js:
1831 (AnalysisTask.prototype.startMeasurementId): Added.
1832 (AnalysisTask.prototype.endMeasurementId): Added.
1833 (AnalysisTask.fetchByBuildRequestId): Added.
1834 (AnalysisTask._fetchSubset): Uses DataModelObject.cachedFetch.
1836 * public/v3/models/build-request.js: Added.
1837 (BuildRequest): Added. Represents a single A/B testing request associated with a test group.
1839 * public/v3/models/builder.js:
1840 (Build): Added. Represents a build associated with a given A/B testing result.
1842 * public/v3/models/commit-log.js:
1843 (CommitLog): Made this class inherit from DataModelObject.
1844 (CommitLog.ensureSingleton): Added. Finds the singleton object created for a given revision
1845 in the specified repository. This helps RootSet and other classes compare commits fast.
1846 (CommitLog.prototype.repository): Added.
1847 (CommitLog.fetchBetweenRevisions): Uses CommitLog.ensureSingleton.
1849 * public/v3/models/data-model.js:
1851 (DataModelObject.namedStaticMap): Added.
1852 (DataModelObject.ensureNamedStaticMap): Renamed from namedStaticMap instead of implicitly
1853 assuming that the non-static version always creates the map.
1854 (DataModelObject.prototype.namedStaticMap): Added.
1855 (DataModelObject.cachedFetch): Extracted from AnalysisTask._fetchSubset so that TestGroup's
1856 fetchByTask could also use it.
1859 * public/v3/models/measurement-adaptor.js: Added.
1860 (MeasurementAdaptor): Extracted from MeasurementCluster. This class is responsible for
1861 re-formatting the data received via /api/measurement-set JSON API inside the v3 UI.
1862 (MeasurementAdaptor.prototype.extractId): Added.
1863 (MeasurementAdaptor.prototype.adoptToAnalysisResults): Added. Used by AnalysisResults.
1864 (MeasurementAdaptor.aggregateAnalysisResults): Added. Used by TestGroupResultsTable to
1865 aggregate results for each test configuration; e.g. computing the average for set A.
1866 (MeasurementAdaptor.prototype.adoptToSeries): Extracted from MeasurementCluster.addToSeries.
1867 Added rootSet() to each point. This allows AnalysisResultsViewer to compare them against root
1868 sets associated with A/B testing results.
1869 (MeasurementAdaptor.computeConfidenceInterval): Moved from MeasurementCluster.
1871 * public/v3/models/measurement-cluster.js:
1872 (MeasurementCluster):
1873 (MeasurementCluster.prototype.addToSeries):
1875 * public/v3/models/repository.js:
1876 (Repository.prototype.hasUrlForRevision): Added.
1878 * public/v3/models/root-set.js: Added.
1879 (RootSet): Added. Represents a set of commits in measured results.
1880 (MeasurementRootSet): Added. Ditto for results associated with A/B testing.
1882 * public/v3/models/test-group.js: Added.
1883 (TestGroup): Added. Represents a A/B testing on analysis task.
1884 (TestGroup.prototype.createdAt): Added.
1885 (TestGroup.prototype.buildRequests): Returns the list of build requests associated with this
1887 (TestGroup.prototype.addBuildRequest): Added. Used by BuildRequest's constructor to associate
1888 itself with this group.
1889 (TestGroup.prototype.didSetResult): Added. Called by BuildRequest.setResult when measured
1890 values are fetched and associated with a build request in this group.
1892 * public/v3/models/test.js:
1895 * public/v3/pages/analysis-task-page.js:
1897 (AnalysisTaskPage.prototype.updateFromSerializedState): Fetch the analysis task, test groups
1898 associated with it, and all A/B testing results based on the task id or the build request id
1899 specified in the URL.
1900 (AnalysisTaskPage.prototype._didFetchTask): Added. Start fetching the measured data. This is
1901 the data on charts page for which this analysis task was created, not results of A/B testing.
1902 (AnalysisTaskPage.prototype._didFetchMeasurement): Added. Display the fetched data in a table
1903 inside AnalysisResultsViewer.
1904 (AnalysisTaskPage.prototype._didFetchTestGroups): Added. Display the list of A/B test groups
1905 as well as the results of the first A/B testing.
1906 (AnalysisTaskPage.prototype._didFetchAnalysisResults): Added.
1907 (AnalysisTaskPage.prototype._assignTestResultsIfPossible): Added. Once both the analysis task,
1908 A/B test groups as well as their results are fetched, update build requests in each test group
1910 (AnalysisTaskPage.prototype.render): Show the list of test groups and highlight the currently
1912 (AnalysisTaskPage.prototype._showTestGroup): Added. A callback used by AnalysisResultsViewer
1913 and TestGroupResultsTable to notify this class when the user selects a new test group.
1914 (AnalysisTaskPage.htmlTemplate): Updated the template.
1915 (AnalysisTaskPage.cssTemplate): Ditto.
1917 * public/v3/pages/charts-page.js:
1918 (ChartsPage.createStateForAnalysisTask): Added. Creates a URL state object for opening a chart
1919 associated with an analysis task.
1921 2015-12-22 Ryosuke Niwa <rniwa@webkit.org>
1923 Analysis task page is slow to load
1924 https://bugs.webkit.org/show_bug.cgi?id=152517
1926 Reviewed by Andreas Kling.
1928 The slowness comes from r194130 which made the JSON API at /api/analysis-tasks to report the start
1929 and the end of each analysis task. This query was adding ~2s to the total JSON generation time.
1931 Cache these values on analysis_task table since they never change once an analysis task is created.
1933 * init-database.sql: Added columns task_start_run_time and task_end_run_time to analysis_task table.
1934 Also added the missing drop statements at the top.
1936 * public/api/analysis-tasks.php:
1937 (fetch_and_push_bugs_to_tasks): Don't fetch the latest commit time of the start and the end.
1938 (format_task): Report task_start_run_time and task_end_run_time as startRunTime and endRunTime.
1940 * public/privileged-api/create-analysis-task.php:
1941 (main): Set start_run_time and end_run_time when creating an analysis task.
1942 (time_for_run): Added.
1944 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1946 v3 UI shouldn't open/close pane selector by mouseenter/leave
1947 https://bugs.webkit.org/show_bug.cgi?id=152399
1949 Reviewed by Andreas Kling.
1951 Removed the code to open and close the pane selector by mouseenter and mouseleave
1952 since multiple people have complained about the behavior.
1954 * public/v3/pages/charts-toolbar.js:
1955 (ChartsToolbar): Removed the event listeners.
1956 (ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
1957 to better support the use case of adding multiple panes.
1958 (ChartsToolbar.cssTemplate): Tweaked CSS.
1960 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1962 Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
1963 https://bugs.webkit.org/show_bug.cgi?id=152389
1965 Reviewed by Darin Adler.
1967 Compute the x coordinate of the popover from the center of each annotation bar.
1969 Also adjust the x coordinate to keep the popover within the charts.
1971 * public/v3/components/interactive-time-series-chart.js:
1972 (InteractiveTimeSeriesChart.prototype._renderChartContent):
1974 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1976 Dashboard charts should have uniform widths on v3 UI
1977 https://bugs.webkit.org/show_bug.cgi?id=152395
1979 Reviewed by Chris Dumez.
1981 Fix the bug by applying table-layout: fixed on the dashboard table.
1983 * public/v3/pages/dashboard-page.js:
1984 (DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
1985 (DashboardPage.cssTemplate): Adjusted CSS accordingly.
1987 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1989 Closing a pane on v3 UI always closes the last pane
1990 https://bugs.webkit.org/show_bug.cgi?id=152388
1992 Reviewed by Chris Dumez.
1994 The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
1995 Fixed it by passing in "this" pane object to the first argument.
1997 * public/v3/pages/chart-pane.js:
2000 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
2002 Perf Dashboard v3 UI doesn't show recent data points on v2 UI
2003 https://bugs.webkit.org/show_bug.cgi?id=152368
2005 Reviewed by Chris Dumez.
2007 The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
2008 which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
2009 to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
2011 !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
2013 Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
2015 * public/api/measurement-set.php:
2016 (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
2017 * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
2018 of the last modified date depends on when tests run, we can't assert it to be a certain value.
2020 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
2022 v3 UI should show and link the build number on charts page
2023 https://bugs.webkit.org/show_bug.cgi?id=152359
2025 Reviewed by Chris Dumez.
2027 Show the hyperlinked build number in the v3 UI.
2029 * public/v3/models/builder.js:
2030 (Builder): Renamed _buildURL to _buildUrlTemplate.
2031 (Builder.prototype.urlForBuild): Added.
2032 * public/v3/pages/chart-pane-status-view.js:
2033 (ChartPaneStatusView):
2034 (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
2035 (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
2036 if the current point is set by an indicator (not by a selection).
2038 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
2040 v3 dashboard doesn't stretch charts to fill the screen
2041 https://bugs.webkit.org/show_bug.cgi?id=152354
2043 Reviewed by Chris Dumez.
2045 The bug was caused by a workaround to avoid canvas stretching table cell too much.
2047 Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
2048 so that it does not contribute to the intrinsic/natural width of the cell.
2050 * public/v3/components/time-series-chart.js:
2051 (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
2052 (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
2053 the canvas does not resize with it.
2054 * public/v3/pages/dashboard-page.js:
2055 (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
2057 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
2059 The chart status on v3 UI sometimes show wrong revision ranges
2060 https://bugs.webkit.org/show_bug.cgi?id=152331
2062 Reviewed by Chris Dumez.
2064 The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
2065 when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
2066 finds the sampled data point immediately preceding the current point (at which the indicator is shown).
2068 * public/v3/components/chart-status-view.js:
2069 (ChartStatusView.prototype.updateStatusIfNeeded):
2071 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2073 Perf dashboard's cycler page should use v3 UI
2074 https://bugs.webkit.org/show_bug.cgi?id=152324
2076 Reviewed by Chris Dumez.
2078 Use the v3 UI in cycler.html after r194130.
2080 * public/cycler.html:
2081 * public/v3/index.html: Removed the reference to a non-existent platform-selector.js.
2083 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2085 Add v3 UI to perf dashboard
2086 https://bugs.webkit.org/show_bug.cgi?id=152311
2088 Reviewed by Chris Dumez.
2090 Add the third iteration of the perf dashboard UI. UI for viewing and modifying analysis tasks is coming soon.
2091 The v3 UI is focused on speed, and removes all third-party script dependencies including jQuery, d3, and Ember.
2092 Both the DOM-based UI and graphing are implemented manually.
2095 The entire app is structured using new component library implemented in components/base.js. Each component is
2096 an instance of a subclass of ComponentBase which owns a single DOM element. Each subclass may supply static
2097 methods named htmlTemplate and cssTemplate as the template for a component instance. ComponentBase automatically
2098 clones the templates inside the associated element (or its shadow root on the supported browsers). Each subclass
2099 must supply a method called "render()" which constructs and updates the DOM as needed.
2101 There is a special component called Page, which represents an entire page. Each Page is opened by PageRouter's
2102 "route()" function. Each subclass of Page supplies "open()" for initialization and "updateFromSerializedState()"
2103 for a hash URL transition.
2106 The key feature of the v3 UI is the split of time series into chunks called clusters (see r194120). On an internal
2107 instance of the dashboard, the v2 UI downloads 27MB of data whereas the same page loads only 3MB of data in the v3.
2108 The key logic for fetching time series in chunks is implemented by MeasurementSet in /v3/models/measurement-set.js.
2109 We first fetch the cached primary cluster (the cluster that contains the newest data) at:
2110 /data/measurement-set-<platform-id>-<metric-id>.json
2112 If that's outdated according to lastModified in manifest.json, then we immediately re-fetch the primary cluster at:
2113 /api/measurement-set/?platform=<platform-id>&metric=<metric-id>
2115 Once the up-to-date primary cluster is fetched, we fetch all "secondary" clusters. For each cluster being fetched,
2116 including the primary, we invoke registered callbacks.
2119 In addition, the v3 UI reduces the initial page load time by loading a single bundled JS file generated by
2120 tools/bundle-v3-scripts.py. index.html has a fallback to load all 44 JS files individually during development.
2122 * public/api/analysis-tasks.php:
2123 (fetch_and_push_bugs_to_tasks): Added the code to fetch start and end run times. This is necessary in V3 UI
2124 because no longer fetch the entire time series. See r194120 for the new measurement set JSON API.
2125 (format_task): Compute the category of an analysis task based on "result" value. This will be re-vamped once
2126 I add the UI for the analysis task page in v3.
2128 * public/include/json-header.php:
2129 (require_format): CamelCase the name.
2130 (require_match_one_of_values): Ditto.
2131 (validate_arguments): Renamed from require_existence_of and used in measurement-set.php landed in r194120.
2134 * public/v3/components: Added.
2136 * public/v3/components/base.js: Added.
2137 (ComponentBase): The base component class.
2138 (ComponentBase.prototype.element): Returns the DOM element associated with the DOM element.
2139 (ComponentBase.prototype.content): Returns the shadow root if one exists and the associated element otherwise.
2140 (ComponentBase.prototype.render): To be implemented by a subclass.
2141 (ComponentBase.prototype.renderReplace): A helper function to "render" DOM contents.
2142 (ComponentBase.prototype._constructShadowTree): Called inside the constructor to instantiate the templates.
2143 (ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Instantiates components referred by
2144 its element name inside the instantiated content.
2145 (ComponentBase.isElementInViewport): A helper function. Returns true if the element is in the viewport and it has
2146 non-zero width and height.
2147 (ComponentBase.defineElement): Defines a custom element that can be automatically instantiated from htmlTemplate.
2148 (ComponentBase.createElement): A helper function to create DOM tree to be used in "render()" method.
2149 (ComponentBase._addContentToElement): A helper for "createElement".
2150 (ComponentBase.createLink): A helper function to create a hyperlink or another clickable element (via callback).
2151 (ComponentBase.createActionHandler): A helper function to create an event listener that prevents the default action
2152 and stops the event propagation.
2154 * public/v3/components/button-base.js: Added.
2156 * public/v3/components/chart-status-view.js: Added.
2157 (ChartStatusView): A component that reports the current status of time-series-chart. It's subclasses by
2158 ChartPaneStatusView to provide additional information in the charts page's panes.
2160 * public/v3/components/close-button.js: Added.
2162 * public/v3/components/commit-log-viewer.js: Added.
2163 (CommitLogViewer): A component that lists commit revisions along with commit messages for a range of data points.
2165 * public/v3/components/interactive-time-series-chart.js: Added.
2166 (InteractiveTimeSeriesChart): A subclass of InteractiveTimeSeriesChart with interactivity (selection & indicator).
2167 Selection and indicator are mutually exclusive.
2169 * public/v3/components/pane-selector.js: Added.
2170 (PaneSelector): A component for selecting (platform, metric) pair to add in the charts page.
2172 * public/v3/components/spinner-icon.js: Added.
2174 * public/v3/components/time-series-chart.js: Added.
2175 (TimeSeriesChart): A canvas-based chart component without interactivity. It takes a source list and options as
2176 the constructor arguments. A source list is a list of measurement sets (measurement-set.js) with drawing options.
2177 This component fetches data via MeasurementSet.fetchBetween inside TimeSeriesChart.prototype.setDomain and
2178 progressively updates the charts as more data arrives. The canvas is updated on animation frame via rAF and all
2179 layout and rendering metrics are lazily computed in _layout. In addition, this component samples data before
2180 rendering the chart when there are more data points per pixel in _ensureSampledTimeSeries.
2182 * public/v3/index.html: Added. Loads bundled-scripts.js if it exists, or individual script files otherwise.
2184 * public/v3/instrumentation.js: Added. This class is used to gather runtime statistics of v3 UI. (It measures
2185 the performance of the perf dashboard UI).
2187 * public/v3/main.js: Added. Bootstraps the app.
2191 * public/v3/models: Added.
2192 * public/v3/models/analysis-task.js: Added.
2193 * public/v3/models/bug-tracker.js: Added.
2194 * public/v3/models/bug.js: Added.
2195 * public/v3/models/builder.js: Added.
2196 * public/v3/models/commit-log.js: Added.
2197 * public/v3/models/data-model.js: Added.
2198 (DataModelObject): The base class for various data objects that correspond to database tables. It supplies static
2199 hash map to find entries by id as well as other keys.
2200 (LabeledObject): A subclass of DataModelObject with the capability to find an object via its name.
2202 * public/v3/models/measurement-cluster.js: Added.
2203 (MeasurementCluster): Represents a single cluster or a chunk of data in a measurement set.
2205 * public/v3/models/measurement-set.js: Added.
2206 (MeasurementSet): Represents a measurement set.
2207 (MeasurementSet.findSet): Returns the singleton set given (metric, platform). We use singleton to avoid issuing
2208 multiple HTTP requests for the same JSON when there are multiple TimeSeriesChart that show the same graph (e.g. on
2209 charts page with overview and main charts).
2210 (MeasurementSet.prototype.findClusters): Finds the list of clusters to fetch in a given time range.
2211 (MeasurementSet.prototype.fetchBetween): Fetch clusters for a given time range and calls callback whenever new data
2212 arrives. The number of callbacks depends on the how many clusters need to be newly fetched.
2213 (MeasurementSet.prototype._fetchSecondaryClusters): Fetches non-primary (non-latest) clusters.
2214 (MeasurementSet.prototype._fetch): Issues a HTTP request to fetch a cluster.
2215 (MeasurementSet.prototype._didFetchJSON): Called when a cluster is fetched.
2216 (MeasurementSet.prototype._failedToFetchJSON): Called when the fetching of a cluster has failed.
2217 (MeasurementSet.prototype._invokeCallbacks): Invokes callbacks upon an approval of a new cluster.
2218 (MeasurementSet.prototype._addFetchedCluster): Adds the newly fetched cluster in the order.
2219 (MeasurementSet.prototype.fetchedTimeSeries): Returns a time series that contains data from all clusters that have
2221 (TimeSeries.prototype.findById): Additions to TimeSeries defined in /v2/data.js.
2222 (TimeSeries.prototype.dataBetweenPoints): Ditto.
2223 (TimeSeries.prototype.firstPoint): Ditto.
2225 * public/v3/models/metric.js: Added.
2226 * public/v3/models/platform.js: Added.
2227 * public/v3/models/repository.js: Added.
2228 * public/v3/models/test.js: Added.
2230 * public/v3/pages: Added.
2231 * public/v3/pages/analysis-category-page.js: Added. The "Analysis" page that lists the analysis tasks.
2232 * public/v3/pages/analysis-category-toolbar.js: Added. The toolbar to filter analysis tasks based on its category
2233 (unconfirmed, bisecting, identified, closed) and a keyword.
2235 * public/v3/pages/analysis-task-page.js: Added. Not implemented yet. It just has the hyperlink to the v2 UI.
2237 * public/v3/pages/chart-pane-status-view.js: Added.
2238 (ChartPaneStatusView): A subclass of ChartStatusView used in the charts page. In addition to the current value,
2239 comparison to baseline/target, it shows the list of repository revisions (e.g. WebKit revision, OS version).
2241 * public/v3/pages/chart-pane.js: Added.
2242 (ChartPane): A component a pane in the charts page. Each pane has the overview chart and the main chart. The zooming
2243 is synced across all panes in the charts page.
2245 * public/v3/pages/charts-page.js: Added. Charts page.
2246 * public/v3/pages/charts-toolbar.js: Added. The toolbar to set the number of days to show. This affects the overview
2247 chart's domain in each pane.
2249 * public/v3/pages/create-analysis-task-page.js: Added.
2250 (CreateAnalysisTaskPage): A page that gets shown momentarily while creating a new analysis task.
2252 * public/v3/pages/dashboard-page.js: Added. A dashboard page.
2253 * public/v3/pages/dashboard-toolbar.js: Added. Its toolbar with buttons to select the number of days to show.
2254 * public/v3/pages/domain-control-toolbar.js: Added. An abstract superclass of charts and dashboard toolbars.
2256 * public/v3/pages/heading.js: Added. A component for displaying the header and toolbar, if exists, on each page.
2257 * public/v3/pages/page-router.js: Added. This class is responsible for updating the URL hashes as well as opening
2258 and updating each page when the hash changes (via back/forward navigation).
2259 * public/v3/pages/page-with-charts.js: Added. An abstract subclass of page used by dashboards and charts page.
2260 Supplies helper functions for creating TimeSeriesChart options.
2261 * public/v3/pages/page-with-heading.js: Added. An abstract subclass of page that uses the heading component.
2262 * public/v3/pages/page.js: Added. The Page component.
2263 * public/v3/pages/toolbar.js: Added. An abstract toolbar component.
2265 * public/v3/remote.js: Added.
2266 (getJSON): Fetches JSON from the remote server.
2267 (getJSONWithStatus): Ditto. Rejects the response if the status is not "OK".
2268 (PrivilegedAPI.sendRequest): Posts a HTTP request to a privileged API in /privileged-api/.
2269 (PrivilegedAPI.requestCSRFToken): Creates a new CSRF token to request a privileged API post.
2271 * tools/bundle-v3-scripts.py: Added.
2272 (main): Bundles js files together and minifies them by jsmin.py for the v3 UI. Without this script, we're forced to
2273 download 44 JS files or making each JS file contain multiple classes.
2275 * tools/jsmin.py: Copied from WebInspector / JavaScriptCore code.
2277 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2279 Fix v2 UI after r194093.
2281 * public/v2/data.js:
2283 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2285 Add /api/measurement-set for v3 UI
2286 https://bugs.webkit.org/show_bug.cgi?id=152312
2288 Rubber-stamped by Chris Dumez.
2290 The new API JSON allows the front end to fetch measured data in chunks called a "cluster" as specified
2291 in config.json for each measurement set specified by the pair of a platform and a metric.
2293 When the front end needs measured data in a given time range (t_0, t_1) for a measurement set, it first
2294 fetches the primary cluster by /api/measurement-set/?platform=<platform-id>&metric=<metric-id>.
2295 The primary cluster is the last cluster in the set (returning the first cluster here is not useful
2296 since we don't typically show very old data), and provides the information needed to fetch other clusters.
2298 Fetching the primary cluster also creates JSON files at:
2299 /data/measurement-set-<platform-id>-<metric-id>-<cluster-end-time>.json
2300 to allow latency free access for secondary clusters. The front end code can also fetch the cache of
2301 the primary cluster at: /data/measurement-set-<platform-id>-<metric-id>.json.
2303 Because the front end code has to behave as if all data is fetched, each cluster contains one data point
2304 immediately before the first data point and one immediately after the last data point. This avoids having
2305 to fetch multiple empty clusters for manually specified baseline data. To support this behavior, we generate
2306 all clusters for a given measurement set at once when the primary cluster is requested.
2308 Furthermore, all measurement sets are divided at the same time into clusters so that the boundary of clusters
2309 won't shift as more data are reported to the server.
2311 * config.json: Added clusterStart and clusterSize as options.
2312 * public/api/measurement-set.php: Added.
2314 (MeasurementSetFetcher::__construct):
2315 (MeasurementSetFetcher::fetch_config_list): Finds configurations that belongs to this (platform, metric) pair.
2316 (MeasurementSetFetcher::at_end): Returns true if we've reached the end of all clusters for this set.
2317 (MeasurementSetFetcher::fetch_next_cluster): Generates the JSON data for the next cluster. We generate clusters
2318 in increasing chronological order (the oldest first and the newest last).
2319 (MeasurementSetFetcher::execute_query): Executes the main query.
2320 (MeasurementSetFetcher::format_map): Returns the mapping of a measurement field to an array index. This removes
2321 the need to have key names for each measurement and reduces the JSON size by ~10%.
2322 (MeasurementSetFetcher::format_run): Creates an array that contains data for a single measurement. The order
2323 matches that of keys in format_map.
2324 (MeasurementSetFetcher::parse_revisions_array): Added. Copied from runs.php.
2325 * tests/api-measurement-set.js: Added. Added tests for /api/measurement-set.
2327 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2329 Using fake timestamp in OS version make some results invisible
2330 https://bugs.webkit.org/show_bug.cgi?id=152289
2332 Reviewed by Stephanie Lewis.
2334 Fix various bugs after r194088.
2336 * public/api/commits.php:
2337 (format_commit): Include the commit order.
2338 * public/v2/data.js:
2339 (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
2340 * tools/pull-os-versions.py:
2341 (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
2342 (available_builds_from_command): Exit early when an exception is thrown.
2344 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2346 Fix a typo in the previous commit.
2348 * public/include/report-processor.php:
2350 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2352 Build fix after r192965. Suppress a warning about log being referred to as a closure variable.
2354 * public/include/report-processor.php:
2356 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2358 Using fake timestamp in OS version make some results invisible
2359 https://bugs.webkit.org/show_bug.cgi?id=152289
2361 Reviewed by Stephanie Lewis.
2363 Added commit_order column to explicitly order OS versions. This fixes the bug whereby which
2364 baseline results reported with only OS versions are shown with x coordinate set to 10 years ago.
2366 To migrate the existing database, run:
2367 ALTER TABLE commits ADD COLUMN commit_order integer;
2368 CREATE INDEX commit_order_index ON commits(commit_order);
2370 Then for each repository $1,
2371 UPDATE commits SET (commit_time, commit_order) = (NULL, CAST(EXTRACT(epoch from commit_time) as integer))
2372 WHERE commit_repository = $1;
2375 * init-database.sql: Added the column.
2376 * public/api/commits.php:
2377 (fetch_commits_between): Use commit_order to order commits when commit_time is missing.
2378 * public/api/report-commits.php:
2379 (main): Set commit_order.
2380 * tools/pull-os-versions.py:
2381 (OSBuildFetcher.fetch_and_report_new_builds):
2382 (OSBuildFetcher._assign_order): Renamed from _assign_fake_timestamps. Set the order instead of a fake timestmap.
2384 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2386 Perf dashboard can't merge when the destination platform is missing baseline/target
2387 https://bugs.webkit.org/show_bug.cgi?id=152286
2389 Reviewed by Stephanie Lewis.
2391 The bug was caused by the query to migrate test configurations to new platform checking
2392 configuration type and metric separately; that is, it assumes the configuration exists
2393 only if either the same type or the same metric exists in the destination.
2395 Fixed the bug by checking both conditions simultaneously for each configuration.
2397 * public/admin/platforms.php:
2398 * tests/admin-platforms.js: Added a test.
2400 2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
2402 Perf dashboard's buildbot sync config JSON duplicates too much information
2403 https://bugs.webkit.org/show_bug.cgi?id=152196
2405 Reviewed by Stephanie Lewis.
2407 Added shared, per-builder, and per-test (called type) configurations.
2409 * tools/sync-with-buildbot.py:
2411 (load_config.merge):
2413 2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
2415 Perf dashboard should avoid overflow during geometric mean computation
2416 https://bugs.webkit.org/show_bug.cgi?id=151773
2418 Reviewed by Chris Dumez.
2420 * public/include/report-processor.php:
2422 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
2424 Perf dashboard should extend baseline and target to the future
2425 https://bugs.webkit.org/show_bug.cgi?id=151511
2427 Reviewed by Darin Adler.
2429 * public/v2/data.js:
2430 (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
2431 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
2432 (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
2433 (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
2434 * public/v2/manifest.js:
2435 (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
2437 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
2439 Perf dashboard should always show comparison to baseline and target even if one is missing
2440 https://bugs.webkit.org/show_bug.cgi?id=151510
2442 Reviewed by Darin Adler.
2444 Show the comparison status against the baseline when baseline is present but target is missing.
2446 To make the code more readable, this patch splits the logic into three cases:
2447 1. Both baseline and target are present
2448 2. Only baseline is present
2449 3. Only target is present
2451 Also extracted a helper function to construct the label.
2454 (.labelForDiff): Added.
2455 (App.Pane.computeStatus):
2457 2015-11-23 Commit Queue <commit-queue@webkit.org>
2459 Unreviewed, rolling out r192716 and r192717.
2460 https://bugs.webkit.org/show_bug.cgi?id=151582
2462 The patch was incorrect. We always need at least one data
2463 point in each configuration (Requested by rniwa on #webkit).
2465 Reverted changesets:
2467 "Perf dashboard's should not include results more than 366
2469 https://bugs.webkit.org/show_bug.cgi?id=151529
2470 http://trac.webkit.org/changeset/192716
2472 "Build fix for old version of PHP."
2473 http://trac.webkit.org/changeset/192717
2475 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2477 Build fix for old version of PHP.
2479 * public/api/runs.php:
2481 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2483 Perf dashboard's should not include results more than 366 days old in JSON
2484 https://bugs.webkit.org/show_bug.cgi?id=151529
2486 Reviewed by Timothy Hatcher.
2488 Don't return results more than 366 days old in /api/runs/ JSON API.
2489 This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.
2491 * public/api/runs.php:
2492 (main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
2493 Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
2494 of doing so will be included in elapsedTime.
2495 (RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
2496 (RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
2497 (RunsGenerator::parse_revisions_array): Compute the max of commit times.
2499 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2501 Remove chartPointRadius from interactive chart component
2502 https://bugs.webkit.org/show_bug.cgi?id=151480
2504 Reviewed by Darin Adler.
2506 Replaced the parameter by CSS rules.
2508 * public/v2/chart-pane.css:
2510 (.chart .dot.foreground):
2511 (.chart .highlight):
2513 * public/v2/index.html:
2514 * public/v2/interactive-chart.js:
2515 (App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
2516 (App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):
2518 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2520 Perf dashboard's runs API uses more than 128MB of memory
2521 https://bugs.webkit.org/show_bug.cgi?id=151478
2523 Reviewed by Andreas Kling.
2525 Don't fetch all query results at once to avoid using twice as much memory as needed.
2526 Use iterative API to format each result at a time.
2528 This change is also a 5% runtime performance gain.
2530 * public/api/runs.php:
2531 (RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
2532 no longer needed as we pass in each configuration type explicitly to fetch_runs.
2533 (RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
2534 Also moved the logic to compute the last modified time here.
2535 (RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
2536 (RunsGeneratorForTestGroup):
2537 (RunsGeneratorForTestGroup::__construct):
2538 (RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.
2540 * public/include/db.php:
2541 (generate_data_file): Lock the file to avoid corruption.
2543 2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
2545 Perf dashboard always fetches charts JSON twice
2546 https://bugs.webkit.org/show_bug.cgi?id=151483
2548 Reviewed by Andreas Kling.
2550 Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
2551 obsolete (shouldRefetch is set true) or corrupt (the second closure).
2556 2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
2558 Internal perf dashboard takes forever to load
2559 https://bugs.webkit.org/show_bug.cgi?id=151430
2561 Rubber-stamped by Antti Koivisto.
2563 Fix a few performance problems with the perf dashboard v2 UI.
2566 (App.DashboardRow._createPane): Set "inDashboard" to true.
2567 (App.Pane._fetch): Immediately show the cached chart instead of waiting for the refetched data which invokes
2568 a PHP JSON API. Also don't fetch the analysis tasks when the chart is shown in the dashboard since we don't
2569 show annotate charts in the dashboard.
2571 2015-10-15 Ryosuke Niwa <rniwa@webkit.org>
2573 Unreviewed fix of a test after r190687.
2575 * tests/admin-regenerate-manifest.js:
2577 2015-10-12 Ryosuke Niwa <rniwa@webkit.org>
2579 Perf dashboard tools shouldn't require server credentials in multiple configuration files
2580 https://bugs.webkit.org/show_bug.cgi?id=149994
2582 Reviewed by Chris Dumez.
2584 Made detect-changes.js and pull-svn.py pull username and passwords from the server config JSON to reduce
2585 the number of JSON files that need to include credentials.
2587 Also made each script reload the server config after sleep to allow dynamic credential updates.
2589 In addition, change the server config JSON's format to include scheme, host, and port numbers separately
2590 instead of a url since detect-changes.js needs each value separately.
2592 This reduces the number of JSONs with credentials to two for our internal dashboard.
2594 * tools/detect-changes.js:
2595 (main): Added a property argument parsing. Now takes --server-config-json, --change-detection-config-json,
2596 and --seconds-to-sleep like other scripts.
2597 (parseArgument): Added.
2598 (fetchManifestAndAnalyzeData): Reload the server config JSON.
2599 (loadServerConfig): Added. Set settings.perfserver and settings.slave from the server config JSON. Also
2600 add settings.perfserver.host to match the old format.
2601 (configurationsForTesting): Fixed a bug that we throw an exception when a dashboard contains an empty cell.
2603 * tools/pull-os-versions.py:
2604 (main): Use load_server_config after each sleep.
2606 * tools/pull-svn.py:
2607 (main): Use load_server_config after each sleep.
2608 (fetch_commits_and_submit): Use the perf dashboard's auth as subversion credential when useServerAuth is set.
2610 * tools/sync-with-buildbot.py:
2611 (main): Use load_server_config after each sleep.
2614 (load_server_config): Extracted from python scripts. Computes server's url from scheme, host, and port number
2615 to match the old format python scripts except.
2617 2015-10-11 Ryosuke Niwa <rniwa@webkit.org>
2619 Build fix after r190817. Now that pull-os-versions store fake timestamps, we need to bypass timestamp
2620 checks for OS versions when bots try to report new results. Otherwise, we fail to process the reports
2621 with a MismatchingCommitTime error.
2623 * public/include/report-processor.php:
2624 (ReportProcessor::resolve_build_id):
2626 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2628 Perf dashboard erroneously shows an old OS build in A/B testing range
2629 https://bugs.webkit.org/show_bug.cgi?id=149942
2631 Reviewed by Darin Adler.
2633 Ordering OS builds lexicologically turned out be a bad idea since 15A25 falls between 15A242 and 15A251.
2634 Use a fake/synthetic timestamp to force the commonly understood total order instead.
2636 Refactored pull-os-versions.py to share the server config JSON with other scripts. Also made the script
2637 support pulling multiple sources; e.g. both OS X and iOS.
2639 Also removed superfluous feature to submit results in chunks. The perf dashboard can handle thousands of
2640 revisions being submitted at once just fine.
2642 * public/api/commits.php:
2643 (main): A partial revert of r185574 since we no longer need to order builds lexicologically.
2645 * tools/pull-os-versions.py:
2646 (main): Takes --os-config-json, --server-config-json, and --seconds-to-sleep as arguments instead of
2647 a single --config argument to share the server config JSON with other scripts.
2648 (OSBuildFetcher): Extracted out of main. This class is instantiated for each OS kind (e.g. OS X).
2649 (OSBuildFetcher.__init__): Added.
2650 (OSBuildFetcher._fetch_available_builds): Extracted out of main. Fetches available builds from a website
2652 (OSBuildFetcher.fetch_and_report_new_builds): Extracted out of main. Submits the fetched builds after
2653 filtering out the ones we've already reported.
2654 (OSBuildFetcher._assign_fake_timestamps): Creates a fake timestamp to establish a total order amongst each
2655 OS X / iOS style build number such as 12A3456b.
2657 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2659 pull-svn.py fails to sync revisions when SVN credentials is not setup
2660 https://bugs.webkit.org/show_bug.cgi?id=149941
2662 Reviewed by Chris Dumez.
2664 Added the support for specifying subversion credentials.
2666 Also added the support for pulling from multiple subversion servers. Subversion servers are specified
2667 in a JSON configuration file specified by --svn-config formatted as follows:
2672 "url": "http://svn.webkit.org/repository/webkit",
2673 "username": "webkitten",
2674 "password": "webkitten's password",
2675 "trustCertificate": true,
2676 "accountNameFinderScript":
2677 ["python", "/Volumes/Data/WebKit/Tools/Scripts/webkit-patch", "find-users"]
2682 In addition, refactored it to use the shared server config JSON for the dashboard access.
2684 * tools/pull-svn.py:
2685 (main): Now takes --svn-config-json, --server-config-json, --seconds-to-sleep and --max-fetch-count
2686 as required options instead of seven unnamed arguments.
2687 (fetch_commits_and_submit): Extracted from main. Fetches at most max_fetch_count new revisions from
2688 the subversion server, and submits them in accordance with server_config.
2689 (fetch_commit_and_resolve_author): Now takes a single repository dictionary instead of two separate
2690 arguments for name and URL to pass down the repository's authentication info to fetch_commit.
2691 (fetch_commit): Ditto. Add appropriate arguments when username and passwords are specified.
2692 (resolve_author_name_from_account): Use a list argument instead of a single string argument now that
2693 the argument comes from a JSON instead of sys.argv.
2695 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2697 Unreviewed race condition fix. Exit early when xScale or yScale is not defined.
2699 * public/v2/interactive-chart.js:
2700 (App.InteractiveChartComponent._updateRangeBarRects):
2702 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2704 Add a page that cycles through v2 dashboards
2705 https://bugs.webkit.org/show_bug.cgi?id=149907
2707 Reviewed by Chris Dumez.
2709 Add cycler.html that goes through each dashboard on v2 UI.
2711 This allows the dashboards to be cycled through on a TV screen.
2713 * public/cycler.html: Added.
2714 (loadURLAt): Appends a new iframe to load the next URL (i is the index of the dashboard to be shown)
2715 at the end of body. We don't immediately show the new iframe since it might take a while to load.
2716 (showNewFrameIfLoaded): Remove the current iframe and show the next iframe if the next dashboard has
2717 finished loading. We can't rely on DOMContentLoaded or load events because we use asynchronous XHR to
2718 load each chart's data. Instead, wait until some chart becomes available or fails to load and none of
2719 charts are still in progress to be shown.
2721 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2723 Allow custom revisions to be specified in A/B testing
2724 https://bugs.webkit.org/show_bug.cgi?id=149905
2726 Reviewed by Chris Dumez.
2728 Allow custom revision number on each "repository" when creating a test group.
2730 * public/v2/app.css:
2731 (form .analysis-group [name=customValue]): Added.
2734 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
2735 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
2736 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
2737 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
2738 revision option is selected.
2740 * public/v2/index.html: Added a text field for specifying a custom revision number.
2742 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2744 Make the site name configurable in perf dashboard
2745 https://bugs.webkit.org/show_bug.cgi?id=149894
2747 Reviewed by Chris Dumez.
2749 Added "siteTitle" as a new configuration key to specify the site name.
2751 * public/include/db.php:
2752 (config): Now takes the default value as an argument.
2753 * public/include/manifest.php:
2754 (ManifestGenerator::generate): Include siteTitle in the manifest.
2755 * public/index.html: Update the title and the heading when the manifest is loaded.
2756 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
2757 * public/v2/manifest.js:
2758 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
2760 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2762 Perf dashboard doesn't show analysis tasks anchored at outliers
2763 https://bugs.webkit.org/show_bug.cgi?id=149870
2765 Reviewed by Chris Dumez.
2767 The bug was caused by the computation of start and end times of analysis tasks being dependent on
2768 time series provided to the interactive chart component even though they are already filtered.
2770 Since the interactive chart component shouldn't be messing with the underlying data models, moved
2771 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
2772 the unfiltered time series newly exposed on ChartData.
2774 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
2776 * public/admin/fetch-from-remote.php:
2777 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
2778 and Ember can start hanging browsers (took me three hours to debug this).
2781 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
2782 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
2783 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
2784 Filter the results manually instead.
2785 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
2786 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
2787 need to call a private method on it.
2788 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
2789 This will cause chartData to be modified so just exit early and wait for getting called again.
2791 * public/v2/interactive-chart.js:
2792 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
2795 * public/v2/manifest.js:
2796 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
2797 to compute the end points of analysis tasks when their end points are outliers.
2799 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2801 Unreviewed. Fix a typo in r190645.
2803 * public/include/db.php:
2805 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2807 V2 UI shouldn't sort dashboards lexicologically
2808 https://bugs.webkit.org/show_bug.cgi?id=149856
2810 Reviewed by Chris Dumez.
2812 Don't sort the dashboards by name in App.Manifest.
2815 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
2816 * public/v2/manifest.js:
2817 (App.Manifest.._fetchedManifest):
2819 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2821 V2 UI fails to show the data for the very first point in charts
2822 https://bugs.webkit.org/show_bug.cgi?id=149857
2824 Reviewed by Chris Dumez.
2826 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
2827 Explicitly check the type of this property instead.
2829 * public/v2/data.js:
2830 (TimeSeries.prototype.seriesBetweenPoints):
2832 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2834 Perf dashboard should have the capability to test local UI with production data
2835 https://bugs.webkit.org/show_bug.cgi?id=149834
2837 Reviewed by Chris Dumez.
2839 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
2841 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
2843 * config.json: Added remote server configurations.
2844 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
2845 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
2848 * public/include/db.php:
2849 (config_path): Extracted from generate_data_file.
2850 (generate_data_file):
2851 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
2852 run-with-remote-server.py.
2853 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
2855 (abspath_from_root):
2857 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
2861 * public/js/helper-classes.js:
2863 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
2865 build-requests should use conform to JSON API format
2866 https://bugs.webkit.org/show_bug.cgi?id=146375
2868 Reviewed by Stephanie Lewis.
2870 Instead of returning single dictionary that maps root set id to a dictionary of repository names
2871 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
2872 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
2873 matches what we do in /api/test-groups.
2875 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
2876 This is useful for debugging purposes.
2878 * public/api/build-requests.php:
2879 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
2880 (update_builds): Extracted from main.
2882 * public/include/build-requests-fetcher.php:
2883 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
2884 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
2885 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
2886 Moved the logic to exit early when the root set had already been fetched here.
2888 * public/v2/analysis.js:
2889 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
2892 * tools/pull-os-versions.py:
2894 (setup_auth): Moved to util.py
2896 * tools/sync-with-buildbot.py:
2897 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
2898 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
2900 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
2901 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
2902 (config_for_request): Fixed a bug that the script blows up when the build request is missing
2903 the repository specified in the configuration. This tolerance is necessary when a new repository
2904 dependency is added but we want to run A/B tests for old builds without the dependency.
2905 (fetch_json): No longer takes auth.
2908 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
2910 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
2912 Build fix. A/B testing is broken when continuous builders report revisions out of order.
2915 (App.AnalysisTaskController.Ember.Controller.extend.):
2917 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
2919 A/B testing results should be shown even if they were submitted to different platforms
2920 https://bugs.webkit.org/show_bug.cgi?id=146219
2922 Reviewed by Andreas Kling.
2924 Fetch A/B testing results regardless of the platform to which results are submitted
2925 by providing the platform ID to which the results were submitted for each test group.
2927 * public/api/test-groups.php:
2928 (main): Include the platform id in the test groups.
2929 * public/v2/analysis.js:
2930 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
2932 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
2934 Remove unnecessary svn:executable flags
2935 https://bugs.webkit.org/show_bug.cgi?id=146107
2937 Reviewed by Alexey Proskuryakov.
2939 * public/js/helper-classes.js: Removed property svn:executable.
2940 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
2941 * public/v2/app.css: Removed property svn:executable.
2942 * public/v2/app.js: Removed property svn:executable.
2943 * public/v2/chart-pane.css: Removed property svn:executable.
2944 * public/v2/data.js: Removed property svn:executable.
2945 * public/v2/index.html: Removed property svn:executable.
2946 * public/v2/js/d3/LICENSE: Removed property svn:executable.
2947 * public/v2/js/d3/d3.js: Removed property svn:executable.
2948 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
2949 * public/v2/js/ember-data.js: Removed property svn:executable.
2950 * public/v2/js/ember.js: Removed property svn:executable.
2951 * public/v2/js/handlebars.js: Removed property svn:executable.
2952 * public/v2/js/jquery.min.js: Removed property svn:executable.
2953 * public/v2/js/statistics.js: Removed property svn:executable.
2954 * public/v2/manifest.js: Removed property svn:executable.
2955 * public/v2/popup.js: Removed property svn:executable.
2957 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2959 Reading the list of analysis tasks is extremely slow
2960 https://bugs.webkit.org/show_bug.cgi?id=146086
2962 Reviewed by Darin Adler.
2964 The bug was caused by Ember data requesting manifest.js hundreds of times.
2965 Fetch it ahead of time in each route instead.
2968 (App.AnalysisRoute.model):
2969 (App.AnalysisTaskRoute.model):
2971 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2973 Update ReadMe.md and Install.md per database changes
2974 https://bugs.webkit.org/show_bug.cgi?id=146076
2976 Reviewed by Darin Adler.
2983 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2985 Increase the popup dismissal time from 100ms to 500ms
2986 https://bugs.webkit.org/show_bug.cgi?id=146077
2988 Rubber-stamped by Andreas Kling.
2990 * public/v2/popup.js:
2991 (App.PopupView.scheduleHiding):
2993 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
2995 v2 UI should have buttons to breakdown a test
2996 https://bugs.webkit.org/show_bug.cgi?id=146010
2998 Reviewed by Chris Dumez.
3000 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
3001 as well as "Breakdown" to add all subtests' metrics.
3003 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
3004 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
3007 (App.ChartsController.addAlternativePanes): Added.
3008 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
3009 (App.TestProxyForPopup.actionName): Added.
3010 (App.TestProxyForPopup.actionArgument): Added.
3011 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
3012 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
3013 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
3014 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
3015 that are already present in the list of panes.
3016 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
3017 * public/v2/index.html:
3018 * public/v2/manifest.js:
3019 (App.Metric.childMetrics): Added.
3021 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
3023 Build fix after r185574.
3026 (set get App.Pane.Ember.Object.extend.):
3028 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
3032 * tools/pull-os-versions.py:
3035 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
3037 Perf dashboard should be able to list iOS versions as well as OS X versions
3038 https://bugs.webkit.org/show_bug.cgi?id=146003
3040 Reviewed by Stephanie Lewis.
3042 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
3043 information specified in config.json.
3045 * tools/pull-os-versions.py: Renamed from pull-osx.py.
3046 (main): Use available_builds_from_command when 'customCommands' is specified.
3047 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
3048 (fetch_available_builds): Now takes the repository name.
3050 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
3052 Removed a superfluous console.log per Chris's comment.
3056 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
3058 Analysis task should show all possible revisions for A/B testing
3059 https://bugs.webkit.org/show_bug.cgi?id=145996
3061 Reviewed by Chris Dumez.
3063 * public/api/commits.php:
3064 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
3065 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
3066 have a "commit time".
3069 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
3070 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
3071 the fetched list of commits if available.
3072 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
3073 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
3074 of points shown in the A/B testing configurations become too long.
3076 * public/v2/commits-viewer.js:
3077 (App.CommitsViewerComponent.commitsChanged):
3079 * public/v2/data.js:
3080 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
3082 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
3084 Add a script to post new OS X builds to perf dashboard
3085 https://bugs.webkit.org/show_bug.cgi?id=145955
3087 Reviewed by Darin Adler.
3089 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
3091 * public/api/report-commits.php:
3092 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
3093 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
3095 * tools/pull-osx.py: Added.
3096 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
3097 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
3098 (setup_auth): Sets up basic or digest auth to access the dashboard.
3099 (fetch_available_builds): Fetches and parses the XML document from an internal website.
3100 (textContent): A helper function to get the text content out of a XML node.
3101 (submit_commits): Submits commits to the perf dashboard.
3103 * tools/pull-svn.py:
3106 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
3108 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
3110 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
3111 https://bugs.webkit.org/show_bug.cgi?id=145940
3113 Reviewed by Darin Adler.
3115 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
3116 Also deleted the code to mark points outside the envelop as outliers.
3120 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
3122 Unreviewed build fix for merging platforms.
3124 * public/admin/platforms.php:
3126 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
3128 Unreviewed build fix. Some builder names are really long.
3130 * init-database.sql:
3132 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
3134 Show results and status before revisions for A/B testing results
3135 https://bugs.webkit.org/show_bug.cgi?id=145327
3137 Reviewed by Chris Dumez.
3139 Place the results and the status columns before the columns for revisions.
3140 Also show the absolute difference as well as the relative difference between the averages of A and B.
3143 (App.TestGroupPane._populate):
3144 (App.TestGroupPane._computeStatisticalSignificance):
3145 * public/v2/index.html:
3147 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3149 Build fix after r184591.
3151 * public/v2/manifest.js:
3153 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3155 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
3157 * public/include/build-requests-fetcher.php:
3159 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3161 UI to associate bugs with an analysis task is crappy
3162 https://bugs.webkit.org/show_bug.cgi?id=145198
3164 Reviewed by Andreas Kling.
3166 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
3167 a bug and a separate select view with a text field to associate a new bug instead of implicitly
3168 updating or deleting the existing record based on what the user had typed.
3170 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
3171 a given analysis task since it's perfectly reasonable for a given task to be associated with
3172 multiple WebKit bugs.
3174 * public/privileged-api/associate-bug.php:
3175 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
3176 one that matches the analysis task and the bug tracker when the bug number is falsey.
3178 * public/v2/analysis.js:
3179 (App.Bug.url): Added.
3180 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
3182 * public/v2/app.css:
3185 (App.AnalysisTaskController.actions.addBug): Added.
3186 (App.AnalysisTaskController.actions.deleteBug): Added.
3187 (App.AnalysisTaskController.associateBug): Deleted.
3189 * public/v2/index.html: Updated the templates.
3191 * public/v2/manifest.js:
3192 (App.BugTracker.urlFromBugNumber): Added.
3194 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3196 A/B testing rootSets should provide commit times as well as revisions
3197 https://bugs.webkit.org/show_bug.cgi?id=145207
3199 Reviewed by Andreas Kling.
3201 Some continuous build systems need the commit time as well as the revision number / hash so provide one
3202 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
3204 * public/include/build-requests-fetcher.php:
3205 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
3206 the revision number as well as the commit time.
3207 * tools/sync-with-buildbot.py:
3208 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
3209 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
3210 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
3212 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
3214 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
3216 * public/v2/manifest.js:
3217 (App.Manifest.Ember.Controller.extend.):
3218 (App.Manifest.Ember.Controller.extend):
3220 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
3222 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
3223 https://bugs.webkit.org/show_bug.cgi?id=145181
3225 Rubber-stamped by Chris Dumez.
3227 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
3228 for clarity. This change also reduces the code complexity.
3230 * public/index.html:
3232 (App.AnalysisTaskController._chartDataChanged):
3233 (App.TestGroupPane._createConfigurationSummary):
3234 * public/v2/data.js:
3235 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
3237 * public/v2/interactive-chart.js: Removed the support for showing units separately.
3238 (App.InteractiveChartComponent._constructGraphIfPossible):
3239 (App.InteractiveChartComponent._relayoutDataAndAxes)
3241 * public/v2/manifest.js:
3242 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
3243 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
3244 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
3245 automatically include unit.
3247 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
3249 REGRESSION: v2 UI reports a higher memory usage
3250 https://bugs.webkit.org/show_bug.cgi?id=145151
3252 Reviewed by Chris Dumez.
3254 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
3255 Fixed the bug by manually implementing the formatter as done in v1.
3257 * public/v2/manifest.js:
3258 (App.Manfiest._formatBytes): Added.
3259 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
3261 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
3263 Unreviewed build fix. Add "Duration" as a time metric.
3265 * public/js/helper-classes.js:
3266 * public/v2/data.js:
3267 (RunsData.unitFromMetricName):
3269 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
3271 Perf dashboard treats Speedometer and JetStream as smaller is better
3272 https://bugs.webkit.org/show_bug.cgi?id=144711
3274 Reviewed by Chris Dumez.
3276 Added the support for "Score" metric.
3278 * public/js/helper-classes.js:
3280 * public/v2/data.js:
3281 (RunsData.unitFromMetricName):
3282 (RunsData.isSmallerBetter):
3284 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
3286 Build fix after r183232.
3288 * public/include/json-header.php:
3290 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
3292 Perf dashboard should automatically detect regressions
3293 https://bugs.webkit.org/show_bug.cgi?id=141443
3295 Reviewed by Anders Carlsson.
3297 Added a node.js script detect-changes.js to detect potential regressions and progressions
3298 on the graphs tracked on v2 dashboards.
3300 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
3301 columns to analysis_tasks to keep the segmentation and test range selection strategies used
3302 to create an analysis task.
3304 * public/api/analysis-tasks.php:
3305 (format_task): Include task_segmentation and analysis_tasks in the results.
3307 * public/include/json-header.php:
3308 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
3309 of a CSRF prevention token.
3310 (should_authenticate_as_slave): Added.
3311 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
3312 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
3313 to a CSRF attack, we don't need to check a CSRF token.
3315 * public/privileged-api/create-analysis-task.php:
3316 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
3317 analysis task. Also add or find segmentation and test range selection strategies if specified.
3319 * public/privileged-api/create-test-group.php:
3320 (main): Use ensure_privileged_api_data_and_token_or_slave.
3322 * public/privileged-api/generate-csrf-token.php:
3325 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
3327 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
3328 (Array.prototype.find): Added a polyfill to be used in node.js.
3329 (RunsData.fetchRuns):
3330 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
3331 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
3332 in detect-changes.js.
3333 (RunsData.unitFromMetricName): Ditto.
3334 (RunsData.isSmallerBetter): Ditto.
3335 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
3336 times are identical.
3337 (TimeSeries): When commit times are identical, order points based on build time. This is needed
3338 for when we trigger two builds at two different OS versions with the same WebKit revision since
3339 OS versions don't change the commit times.
3340 (TimeSeries.prototype.findPointByIndex): Added.
3341 (TimeSeries.prototype.rawValues): Added.
3343 * public/v2/js/statistics.js:
3344 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
3345 description of this strategy instead of the default probability. Also fixed a bug that debugging
3346 code was referring to non-existent variables.
3347 (Statistics.executeStrategy): Moved from App.Pane (app.js).
3349 * public/v2/manifest.js:
3350 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
3351 used in detect-changes.js.
3353 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
3354 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
3355 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
3356 (main): Loads the settings JSON specified in the argument.
3357 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
3358 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
3359 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
3360 and computes various values for when statistically significant changes are detected later.
3361 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
3362 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
3363 in chronological order and create a new analysis task for the very last change we detected. We'll
3364 eventually create an analysis task for all detected changes since we're repeating the analysis in
3365 fetchManifestAndAnalyzeData after some time.
3366 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
3367 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
3368 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
3369 tasks for the same range (e.g. humans may create one before the script gets to do it).
3370 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
3371 testing if available, and notify another server with a HTML message as specified.
3372 (findStrategyByLabel):
3373 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
3374 test or values are getting smaller in a larger-is-better test and vice versa.
3375 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
3376 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
3380 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
3381 (instantiateNotificationTemplate):
3384 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
3386 Perf dashboard should have UI to set status on analysis tasks
3387 https://bugs.webkit.org/show_bug.cgi?id=143977
3389 Reviewed by Chris Dumez.
3391 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
3392 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
3393 The latter will be a useful metric once we start automatically creating analysis tasks.
3395 * init-database.sql: Added two columns to analysis_tasks table.
3396 * public/api/analysis-tasks.php: Include the added columns in the JSON.
3397 * public/include/db.php:
3398 (Database::to_database_boolean): Added.
3399 * public/include/json-header.php:
3400 (require_match_one_of_values): Added.
3401 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
3403 * public/v2/analysis.js:
3404 (App.AnalysisTask.result): Added.
3405 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
3406 and we want to differentiate null from false in order to differentiate the null-ness of the value.
3407 (App.AnalysisTask.saveStatus): Added.
3408 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
3409 * public/v2/app.css:
3411 (App.AnalysisTaskController.analysisResultOptions): Added.
3412 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
3413 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
3414 been created if 'no change' is selected.
3415 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
3416 (App.AnalysisTaskController.actions.saveStatus): Added.
3417 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
3418 'result' and 'needed' values of the analysis task.
3420 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
3422 Unreviewed build fix. Updated config.json after recent changes.
3426 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
3428 Make the analysis page more useful
3429 https://bugs.webkit.org/show_bug.cgi?id=143617
3431 Reviewed by Chris Dumez.
3433 * public/api/analysis-tasks.php:
3434 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
3435 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
3436 * public/v2/analysis.js:
3437 (App.AnalysisTask.formattedCreatedAt): Added.
3438 (App.AnalysisTask._addLeadingZero): Added.
3439 (App.AnalysisTask.buildRequestCount): Added.
3440 (App.AnalysisTask.finishedBuildRequestCount): Added.
3441 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
3442 (App.AnalysisTask.testGroups):
3443 (App.AnalysisTask.triggerable):
3444 (App.AnalysisTask.label):
3446 * public/v2/app.css: Tweaked style rules for the analysis page.
3449 (App.buildPopup): Sort the list of platforms by name.
3450 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
3451 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
3452 such as "Bugzilla" with the corresponding text field.
3454 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
3455 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
3456 for the accompanying graph.
3458 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
3460 Perf dashboard should automatically select ranges for A/B testing
3461 https://bugs.webkit.org/show_bug.cgi?id=143580
3463 Reviewed by Chris Dumez.
3465 Added a new statistics option for picking a A/B test range selection strategy.
3466 The selected ranges are shown in the graph using the same UI to show analysis tasks.
3469 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
3470 charts page used by the dashboard since we've added a new parameter at the end.
3471 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
3472 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
3473 (App.Pane._cloneStrategy): Copy isSegmentation.
3474 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
3475 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
3476 selection strategy is picked by the user.
3477 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
3478 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
3479 the return value from the moving average time series to a dictionary that contains the moving
3480 average time series, a dictionary of anomalies, and an array of test ranges.
3481 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
3482 (App.ChartsController._serializePaneList): Ditto for serialization.
3483 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
3484 test range selection strategy.
3486 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
3488 * public/v2/index.html: Added UI for selecting a test range selection strategy.
3490 * public/v2/interactive-chart.js:
3491 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
3493 * public/v2/js/statistics.js:
3494 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
3495 (Statistics.TestRangeSelectionStrategies): Added.
3497 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
3499 The results of A/B testing should state statistical significance
3500 https://bugs.webkit.org/show_bug.cgi?id=143552
3502 Reviewed by Chris Dumez.
3504 Added statistical comparisons between results for each configuration on analysis task page using
3505 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
3508 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
3509 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
3511 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
3512 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
3513 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
3514 Also renamed "items" to "requests" for clarity.
3516 * public/v2/index.html: Added the template for showing statistical comparisons.
3518 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
3519 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
3520 probability and vice versa.
3521 (Statistics.supportedConfidenceIntervalProbabilities):
3522 (Statistics.confidenceIntervalDelta):
3523 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
3524 the probability that two values are sampled from distinct distributions using Welch's t-test.
3525 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
3526 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
3527 (.oneSidedToTwoSidedProbability): Extracted.
3528 (.twoSidedToOneSidedProbability): Extracted.
3529 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
3530 now that computeWelchsT takes two-sided probability.
3532 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
3534 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
3538 (App.Pane.refetchRuns):
3540 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
3542 Perf dashboard should have a way of marking outliers
3543 https://bugs.webkit.org/show_bug.cgi?id=143466
3545 Reviewed by Chris Dumez.
3547 Address kling's in-person comment to notify users when the new run status is saved in the database.
3550 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
3551 * public/v2/chart-pane.css: Fixed a typo.
3553 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
3555 Perf dashboard should have a way of marking outliers
3556 https://bugs.webkit.org/show_bug.cgi?id=143466
3558 Reviewed by Chris Dumez.
3560 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
3561 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
3563 * init-database.sql: Added run_marked_outlier column to test_runs table.
3565 * public/admin/tests.php:
3567 * public/api/runs.php:
3568 (main): Only emit Cache-Control and Expires headers in v1 UI.
3569 (RunsGenerator::format_run): Emit markedOutlier.
3571 * public/include/admin-header.php:
3573 * public/include/db.php:
3574 (Database::is_true): Made it static.
3576 * public/include/manifest.php:
3577 (Manifest::platforms):
3579 * public/index.html: Call into /api/runs/ with ?cache=true.
3581 * public/privileged-api/update-run-status.php: Added.
3582 (main): Updates the newly added column in test_runs table.
3586 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
3587 (App.Pane._didFetchRuns): Renamed from _updateChartData.
3588 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
3589 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
3590 the interactive chart component only observes changes to chartData and not individual properties of it.
3591 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
3592 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
3593 clone chartData here.
3595 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
3596 invoking App.Pane._setNewChartData.
3597 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
3598 opening the pane for marking points as outliers would be annoying.
3599 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
3600 (App.PaneController.selectedMeasurement): Added.
3601 (App.PaneController.showOutlierTitle): Added.
3602 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
3603 mark the selected point as an outlier via the newly added privileged API.
3605 * public/v2/chart-pane.css: Updated styles.
3607 * public/v2/data.js:
3608 (PrivilegedAPI._post): Report the semantic errors.
3609 (Measurement.prototype.markedOutlier): Added.
3610 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
3611 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
3612 whether the time series should include measurements marked as outliers or not.
3613 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
3614 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
3615 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
3617 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
3618 mark individual points as outliers.
3620 * public/v2/interactive-chart.js:
3621 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
3622 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
3623 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
3624 with the arrow key navigation support, this is no longer an issue.
3626 * public/v2/manifest.js:
3627 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
3628 updates the time series in this chart data in order to include or exclude outliers.
3630 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
3632 Perf dashboard should be able to trigger A/B testing jobs for iOS
3633 https://bugs.webkit.org/show_bug.cgi?id=143398
3635 Reviewed by Chris Dumez.
3637 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
3639 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
3641 * public/api/triggerables.php:
3642 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
3643 * public/v2/analysis.js:
3644 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
3646 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
3647 some of the data points. This will happen when we modify the list of projects we build for iOS.
3648 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
3649 attempts to create an invalid test group; when there is already another test group of the same or when
3650 only either configuration specifies the revision for some repository.
3651 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
3652 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
3653 * tools/sync-with-buildbot.py:
3654 (find_request_updates):
3655 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when