1 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
3 Analysis task page is broken after r198479
4 https://bugs.webkit.org/show_bug.cgi?id=155735
6 Rubber-stamped by Chris Dumez.
8 * public/api/measurement-set.php:
9 (AnalysisResultsFetcher::fetch_commits): We need to emit the commit ID as done for regular data.
10 * public/include/build-requests-fetcher.php:
11 (BuildRequestsFetcher::fetch_roots_for_set_if_needed): Ditto. Don't use a fake ID after r198479.
12 * public/v3/models/commit-log.js:
13 (CommitLog): Assert that all commit log IDs are integers to catch regressions like this in future.
14 * public/v3/models/root-set.js:
15 (RootSet): Don't resolve Repository here as doing so would modify the shared "root" entry in the JSON
16 we fetched, and subsequent construction of RootSet would fail since this line would blow up trying to
17 find the repository with "[object]" as the ID.
18 * public/v3/models/test-group.js:
19 (TestGroup._createModelsFromFetchedTestGroups): Resolve Repository here.
21 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
23 v3 UI sometimes don't update the list of revisions on the commit log viewer
24 https://bugs.webkit.org/show_bug.cgi?id=155729
26 Rubber-stamped by Chris Dumez.
28 Fixed multiple bugs that were affecting the list of blame range and commit logs for the range weren't
29 updated in some cases on v3 UI. Also, the commit log viewer state is now a part of the URL state so
30 opening and closing the commit log viewer will persist across page loads.
32 Also fixed a regression from r198479 that Test object can't be created for a top level test.
34 * public/v3/components/chart-pane-base.js:
35 (ChartPaneBase.prototype.configure):
36 (ChartPaneBase.prototype._mainSelectionDidChange): Fixed the bug that the list of blame range nor the
37 commit log viewer don't get updated when the selected range changes.
38 (ChartPaneBase.prototype._indicatorDidChange):
39 (ChartPaneBase.prototype._didFetchData):
40 (ChartPaneBase.prototype._updateStatus): Extracted from _indicatorDidChange and _didFetchData.
41 (ChartPaneBase.prototype._requestOpeningCommitViewer): Renamed from _openCommitViewer.
43 * public/v3/components/chart-status-view.js:
44 (ChartStatusView.prototype.updateStatusIfNeeded): Fixed the bug that the blame range doesn't get set
45 on the initial page load when the selection range is set but the chart data hadn't been fetched yet.
47 * public/v3/components/commit-log-viewer.js:
48 (CommitLogViewer.prototype.view): Fixed the bug that we don't clear out the old list of commits while
49 loading the next set of commits to show as it looked as if the list was never updated.
50 (CommitLogViewer.prototype.render): Fixed the bug that the view always show the last repository name
51 even if there were nothing being fetched or commits to show.
53 * public/v3/components/pane-selector.js:
54 (PaneSelector.prototype.focus): Removed superfluous call to console.log.
56 * public/v3/models/data-model.js:
57 (DataModelObject.listForStaticMap): Generalized the code for all to fix the bug in Test.
58 (DataModelObject.all):
60 * public/v3/models/test.js:
61 (Test): Fixed the bug that this code was relying on the static map to be an array.
62 (Test.topLevelTests): Use newly added listForStaticMap to convert the dictionary to an array.
64 * public/v3/pages/chart-pane-status-view.js:
65 (ChartPaneStatusView): Always initialize _usedRevisionRange as a triple to simplify code elsewhere.
66 (ChartPaneStatusView.prototype.render): Invoke _revisionCallback when user clicks on a repository
67 expansion mark (>>). Also fixed click handler from the row since this made selecting revision range
68 on the view cumbersome. Now user has to explicitly click on the expansion mark (>>).
69 (ChartPaneStatusView.prototype._setRevisionRange): Now takes shouldNotify, from, and to as arguments
70 as this function must not invoke_revisionCallback inside _updateRevisionListForNewCurrentRepository.
71 (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Use newly added setCurrentRepository
72 instead of manually invoking setCurrentRepository and updateRevisionListWithNotification.
73 (ChartPaneStatusView.prototype.setCurrentRepository): Fixed the bug that we weren't updating the
75 (ChartPaneStatusView.prototype.updateRevisionList): Renamed from updateRevisionListWithNotification
76 since we no longer call _revisionCallback. In general, callbacks are only meant to communicate user
77 initiated actions, and not program induced updates like this API so this was a bad pattern anyway.
78 ChartPane now explicitly updates the commit log viewer instead of relying on this function calling
79 _requestOpeningCommitViewer implicitly.
80 (ChartPaneStatusView.prototype._updateRevisionListForNewCurrentRepository): Extracted from
81 updateRevisionListWithNotification so that setCurrentRepository can also call this function.
83 * public/v3/pages/chart-pane.js:
84 (ChartPane.prototype._requestOpeningCommitViewer): Overrides ChartPaneBase's method. Open the same
85 repository in other panes via ChartsPage.setOpenRepository.
86 (ChartPane.prototype.setOpenRepository): This method is called when the user selected a repository in
87 another pane. Open the same repository in this pane if it wasn't already open.
89 * public/v3/pages/charts-page.js:
90 (ChartsPage): Added this._currentRepositoryId.
91 (ChartsPage.prototype.serializeState): Serialize _currentRepositoryId.
92 (ChartsPage.prototype.updateFromSerializedState): Set the commit log viewer's
93 (ChartsPage.prototype.setOpenRepository): Added.
95 * tests/api-measurement-set.js: Fixed a test after r198479.
97 2016-03-21 Ryosuke Niwa <rniwa@webkit.org>
99 V3 Perf Dashboard should automatically select initial range when creating a new task
100 https://bugs.webkit.org/show_bug.cgi?id=155677
102 Reviewed by Joseph Pecoraro.
104 Select the entire range of points for which the analysis task is created by default so that creating
105 a test group to confirm the regression / progression is easy.
107 * public/v3/pages/analysis-task-page.js:
108 (AnalysisTaskPage): Added a boolean flag which indicates the user had modified main chart's selection.
109 * public/v3/pages/analysis-task-page.js:
110 (AnalysisTaskPage.prototype.render): Set the main chart's selection to the entire range of points in
111 the analysis task if the user had never modified selection.
112 (AnalysisTaskPage.prototype._chartSelectionDidChange): This callback is invoked only when the user had
113 modified the selection so set _selectionWasModifiedByUser true here unconditionally.
115 2016-03-19 Ryosuke Niwa <rniwa@webkit.org>
117 Associated commits don't immediately show up on an analysis task page
118 https://bugs.webkit.org/show_bug.cgi?id=155692
120 Reviewed by Darin Adler.
122 The bug was caused by resolveCommits in AnalysisTask._constructAnalysisTasksFromRawData not being
123 able to find the matching commit log if the commit log had been created by the charts which don't
124 set the remote identifiers on each CommitLog objects.
126 Fixed the bug by modifying /api/measurement-set to include the commit ID, and making CommitLog
127 use the real database ID as its ID instead of a fake ID we create from repository and revision.
129 Also added a bunch of Mocha unit tests for AnalysisTask.fetchAll.
131 * public/api/measurement-set.php:
132 (MeasurementSetFetcher::execute_query): Fetch commit_id.
133 (MeasurementSetFetcher::format_run): Use pass-by-reference to avoid making a copy of the row.
134 (MeasurementSetFetcher::parse_revisions_array): Include commit_id as the first item in the result.
135 * public/v3/instrumentation.js:
136 * public/v3/models/analysis-task.js:
137 (AnalysisTask): Fixed a bug that _buildRequestCount and _finishedBuildRequestCount could be kept
138 as strings and hasPendingRequests() could return a wrong result because it would perform string
139 inequality instead of numerical inequality.
140 (AnalysisTask.prototype.updateSingleton): Ditto.
141 (AnalysisTask.prototype.dissociateCommit):
142 (AnalysisTask._constructAnalysisTasksFromRawData):
143 (AnalysisTask._constructAnalysisTasksFromRawData.resolveCommits): Use findById now that CommitLog
144 objects all use the same id as the database id.
145 * public/v3/models/commit-log.js:
147 (CommitLog.prototype.remoteId): Deleted since we no longer create a fake id for commit logs for
149 (CommitLog.findByRemoteId): Deleted.
150 (CommitLog.ensureSingleton): Deleted.
151 (CommitLog.fetchBetweenRevisions):
153 * public/v3/models/data-model.js:
154 (DataModelObject.clearStaticMap): Added to aid unit testing.
155 (DataModelObject.ensureNamedStaticMap): Fixed a typo. Each map is a dictionary, not an array.
156 * public/v3/models/metric.js:
157 * public/v3/models/platform.js:
158 * public/v3/models/root-set.js:
159 (RootSet): Updated per the interface change in CommitLog.ensureSingleton.
160 (MeasurementRootSet): Updated per /api/measurement-set change. Use the first value as the id.
161 * public/v3/models/test.js:
162 * unit-tests/analysis-task-tests.js: Added.
163 (sampleAnalysisTask):
164 (measurementCluster):
165 * unit-tests/checkconfig.js: Added some assertion message to help aid diagnosing the failure.
166 * unit-tests/measurement-adaptor-tests.js: Updated the sample data per the API change in
167 /api/measurement-set and also added assertions for commit log ids.
168 * unit-tests/measurement-set-tests.js:
170 * unit-tests/resources: Added.
171 * unit-tests/resources/mock-remote-api.js: Added. Extracted from measurement-set-tests.js to be
172 used in analysis-task-tests.js.
173 (assert.notReached.assert.notReached):
174 (global.RemoteAPI.getJSON):
175 (global.RemoteAPI.getJSONWithStatus):
177 * unit-tests/resources/v3-models.js: Added. Extracted from measurement-set-tests.js to be used in
178 analysis-task-tests.js and added more imports as needed.
182 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
184 Build fix after r198464.
186 * public/v3/components/analysis-results-viewer.js:
187 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
189 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
191 Build fix after r198234.
193 * public/api/commits.php:
194 (main): Typo: fetch_latest_reported -> fetch_last_reported.
195 * public/include/commit-log-fetcher.php:
196 (CommitLogFetcher::format_single_commit): commits should be an array.
198 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
200 Perf Dashboard v3 confuses better and worse on A/B task page
201 https://bugs.webkit.org/show_bug.cgi?id=155675
202 <rdar://problem/25208723>
204 Reviewed by Joseph Pecoraro.
206 The analysis results viewer on v3 UI sometimes treats regressions as progressions and vice versa when
207 the first set (i.e. set A) of the revisions used in an A/B testing never appears in the original graph,
208 and its latest commit time matches that of the second set, which appears in the original graph.
210 Because the analysis results viewer compares results in the increasing row number, this results in
211 B to be compared to A instead of A to be compared to B. Fixed the bug by preventing the wrong ordering
212 to occur in _buildRowsForPointsAndTestGroups by always inserting a root set A before B when B appears
213 and A doesn't appear in the original graph.
215 * public/v3/components/analysis-results-viewer.js:
216 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Remember the succeeding root set B
217 when creating an entry for root set A.
218 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Fixed the bug. Also un-duplicated
219 the code to create a new row.
220 (AnalysisResultsViewer.RootSetInTestGroup): Now takes a succeeding root set. e.g. it's B for A and
221 undefined for B in A/B testing.
222 (AnalysisResultsViewer.RootSetInTestGroup.prototype.succeedingRootSet): Added.
223 * public/v3/components/time-series-chart.js:
224 (TimeSeriesChart.computeTimeGrid): Fixed the bug that we would end up showing 0 AM instead of dates
225 when both dates and months change.
227 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
229 Add unit tests for measurement-set.js and measurement-adapter.js
230 https://bugs.webkit.org/show_bug.cgi?id=155673
232 Reviewed by Daniel Bates.
234 Add tests which were supposed to be added in r198462.
236 * unit-tests/measurement-adaptor-tests.js: Added.
237 * unit-tests/measurement-set-tests.js: Added.
238 (assert.notReached): Added.
239 (global.RemoteAPI.getJSON): Added.
240 (global.RemoteAPI.getJSONWithStatus): Added. A mock.
242 2016-03-18 Ryosuke Niwa <rniwa@webkit.org>
244 Add unit tests for measurement-set.js and measurement-adapter.js
245 https://bugs.webkit.org/show_bug.cgi?id=155673
247 Reviewed by Darin Adler.
249 Added mocha unit tests for MeasurementSet and MeasurementAdapter classes along with the necessary
250 refactoring to run these tests in node.
252 getJSON and getJSONStatus are now under RemoteAPI so that unit tests can mock them.
254 Removed the dependency on v2 UI's TimeSeries and Measurement class by adding a new implementation
255 of TimeSeries in v3 and removing the dependency on Measurement in chart-pane-status-view.js with
256 new helper methods on Build and CommitLog.
258 Many js files now use 'use strict' (node doesn't support class syntax in non-strict mode) and
259 module.exports to export symbols in node's require function.
261 * public/v3/index.html:
263 * public/v3/models/analysis-results.js:
264 (AnalysisResults.fetch):
265 * public/v3/models/analysis-task.js:
266 (AnalysisTask.fetchAll):
267 * public/v3/models/builder.js:
269 (Build.prototype.builder): Added. Used by ChartPaneStatusView.
270 (Build.prototype.buildNumber): Ditto.
271 (Build.prototype.buildTime): Ditto.
272 * public/v3/models/commit-log.js:
273 (CommitLog.prototype.diff): Ditto.
274 (CommitLog.fetchBetweenRevisions):
275 * public/v3/models/data-model.js:
276 (DataModelObject.cachedFetch):
277 * public/v3/models/measurement-adaptor.js:
278 (MeasurementAdaptor.prototype.applyToAnalysisResults): Renamed from adoptToAnalysisResults.
279 (MeasurementAdaptor.prototype.applyTo): Renamed from adoptToSeries. Now shares a lot more
280 code with applyToAnalysisResults. The code to set 'series' and 'seriesIndex' has been moved
281 to TimeSeries.append. 'measurement' is no longer needed as this patch removes its only use
282 in ChartPaneStatusView.
283 * public/v3/models/measurement-cluster.js:
284 (MeasurementCluster.prototype.addToSeries): Use TimeSeries.append instead of directly mutating
286 * public/v3/models/measurement-set.js:
287 (Array.prototype.includes): Added a polyfill for node.
288 (MeasurementSet.prototype._fetchSecondaryClusters): Removed a bogus assertion. When fetchBetween
289 is called with a mixture of clusters that have been fetched and not fetched, this assertion fails.
290 (MeasurementSet.prototype._fetch):
291 (TimeSeries.prototype.findById): Moved to time-series.js.
292 (TimeSeries.prototype.dataBetweenPoints): Ditto.
293 (TimeSeries.prototype.firstPoint): Ditto.
294 (TimeSeries.prototype.fetchedTimeSeries): Moved the code to extend the last point to TimeSeries'
296 * public/v3/models/repository.js:
297 * public/v3/models/root-set.js:
298 (MeasurementRootSet): Ignore repositories that had not been defined (e.g. it could be added after
299 manifest.json had been downloaded but before a given root set is created for an A/B testing).
300 * public/v3/models/time-series.js:
302 (TimeSeries.prototype.append): Added.
303 (TimeSeries.prototype.extendToFuture): Added.
304 (TimeSeries.prototype.firstPoint): Moved from measurement-set.js.
305 (TimeSeries.prototype.lastPoint): Added.
306 (TimeSeries.prototype.previousPoint): Added.
307 (TimeSeries.prototype.nextPoint): Added.
308 (TimeSeries.prototype.findPointByIndex): Added.
309 (TimeSeries.prototype.findById): Moved from measurement-set.js.
310 (TimeSeries.prototype.findPointAfterTime): Added.
311 (TimeSeries.prototype.dataBetweenPoints): Moved from measurement-set.js.
312 * public/v3/pages/chart-pane-status-view.js:
313 (ChartPaneStatusView.prototype.render): Use newly added helper functions on Build.
314 (ChartPaneStatusView.prototype._formatTime): Added.
315 (ChartPaneStatusView.prototype.setCurrentRepository):
316 (ChartPaneStatusView.prototype.computeChartStatusLabels): Rewrote the code using RootSet object on
317 currentPoint and previousPoint instead of Measurement class from v2 UI. Also sort the results using
318 sortByNamePreferringOnesWithURL.
319 * public/v3/remote.js:
320 (RemoteAPI.getJSON): Moved under RemoteAPI.
321 (RemoteAPI.getJSONWithStatus): Ditto.
323 (PrivilegedAPI.requestCSRFToken):
325 2016-03-17 Ryosuke Niwa <rniwa@webkit.org>
327 Add unit tests for config.json and statistics.js
328 https://bugs.webkit.org/show_bug.cgi?id=155626
330 Reviewed by Darin Adler.
332 Added mocha unit tests for statistics.js and validating config.json. For segmentations, I've extracted
333 real data from our internal perf dashboard.
335 Also fixed some bugs covered by these new tests.
337 * public/shared/statistics.js:
338 (Statistics.movingAverage): Fixed a bug that forwardWindowSize was never used.
339 (Statistics.exponentialMovingAverage): Fixed the bug that the moving average starts at 0. It should
340 start at the first value instead.
341 (.splitIntoSegmentsUntilGoodEnough): Fixed the bug that we may try to segment a time series into
342 more parts than there are data points. Clearly, that doesn't make any sense.
343 (.findOptimalSegmentation): Renamed local variables so that they're more descriptive, and rewrote
344 the debugging code was the old code was emitting some useless data. Also fixed the bug that the length
345 of "segmentation" was off by one (we need segmentCount + 1 elements in the array sine we always
346 include the start of the first segment = 0 and the end of the last segment = values.length).
347 (.SampleVarianceUpperTriangularMatrix):
348 (Statistics): Modernized the export code.
350 * tools/js/config.js: Added.
352 (Config.prototype.configFilePath): Added.
353 (Config.prototype.value): Added.
354 (Config.prototype.path): Added.
355 * tools/js/database.js: Added.
357 (Database.prototype.connect): Added.
358 (Database.prototype.disconnect): Added.
360 * unit-tests/checkconfig.js: Added. Validates config.json. This is useful while setting up
361 a local instance of the perf dashboard.
362 * unit-tests/statistics-tests.js: Added.
363 (assert.almostEqual): Added. Asserts that two floating values are within a given significant digits.
368 2016-03-17 Ryosuke Niwa <rniwa@webkit.org>
370 Fix a typo which was supposed to be fixed in r198351.
372 * public/v3/pages/analysis-task-page.js:
373 (AnalysisTaskPage.prototype.render):
375 2016-03-17 Ryosuke Niwa <rniwa@webkit.org>
377 An analysis task should be closed if a progression cause is identified
378 https://bugs.webkit.org/show_bug.cgi?id=155549
380 Reviewed by Chris Dumez.
382 Since a progression is desirable, we should close an analysis task once its cause is identified.
386 * init-database.sql: Fixed a typo.
387 * public/api/analysis-tasks.php:
388 * public/v3/models/analysis-task.js:
389 (AnalysisTask.prototype.dissociateBug): Renamed from dissociateBug.
390 * public/v3/pages/analysis-task-page.js:
391 (AnalysisTaskPage.prototype.render):
392 (AnalysisTaskPage.prototype._dissociateBug): Renamed from _dissociateBug.
393 (AnalysisTaskPage.prototype._dissociateCommit): Fixed the typo in the alert.
395 2016-03-16 Ryosuke Niwa <rniwa@webkit.org>
397 Analysis task page should allow specifying commits that caused or fixed a regression or a progression
398 https://bugs.webkit.org/show_bug.cgi?id=155529
400 Reviewed by Chris Dumez.
402 Added the capability to associate revisions that caused or fixed a progression or a regression for which
403 an analysis task was created. Added task_commits that stores this relationship and added the backend
404 support to retrieve this table in /api/analysis-tasks and an privileged API to update this table at
405 /privileged-api/associate-commit.
407 Also extracted a new component, MutableListView, out of AnalysisTaskPage to render and manipulate a list
408 of mutable items, and used it to render the list of associated bugs and commits. The view takes a list of
409 kinds (e.g. repositories or bug trackers), and accepts a pair of a kind and arbitrary text as a new item
412 * init-database.sql: Added task_commits table.
414 * public/api/analysis-tasks.php:
416 (fetch_associated_data_for_tasks): Renamed from fetch_and_push_bugs_to_tasks now that it also fetches
417 the list of commits associated with each analysis task by calling CommitLogFetcher::fetch_for_tasks.
418 Also fixe the bug that we were not taking
419 (format_task): No longer sets 'category' since the computation of category now depends on the list of
420 commits associated with this analysis task which aren't available until fetch_associated_data_for_tasks.
421 (determine_category): Added. Categorize any analysis tasks with "fixes" commits as "closed" and "causes"
422 commits as "identified".
424 * public/include/commit-log-fetcher.php:
425 (CommitLogFetcher::__construct): Remove the unused instance variable.
426 (CommitLogFetcher::fetch_for_tasks): Added. Fetches all commits associated with a list of analysis tasks.
427 Assumes the caller (fetch_associated_data_for_tasks) had setup "fixes" and "causes" fields on each task.
429 * public/privileged-api/associate-commit.php: Added. Updates task_commits table to associate or disassociate
430 a commit with an analysis task. When the specified analysis task and the specified commit are already
431 associated, we simply update the table instead of adding a duplicating entry or error. For dissociation,
432 the front-end specifies the commit ID.
435 * public/v3/index.html:
436 * public/v3/components/mutable-list-view.js: Added. Used by the list associated bugs and commits.
437 (MutableListView): Added.
438 (MutableListView.prototype.setList): Added.
439 (MutableListView.prototype.setKindList): Added.
440 (MutableListView.prototype.setAddCallback): Added. This callback is invoked when the user tries to add
441 a new item to the list.
442 (MutableListView.prototype.render): Added.
443 (MutableListView.prototype._submitted): Added.
444 (MutableListView.cssTemplate):
445 (MutableListView.htmlTemplate):
446 (MutableListItem): Added. RemovalLink could be a hyperlink or a callback and gets involved when the user
447 tries to delete this item.
448 (MutableListItem.prototype.content):
450 * public/v3/models/analysis-task.js:
451 (AnalysisTask): Added the support of the list of commits that fixed and caused changes.
452 (AnalysisTask.prototype.updateSingleton): Ditto.
453 (AnalysisTask.prototype.causes): Added.
454 (AnalysisTask.prototype.fixes): Added.
455 (AnalysisTask.prototype.associateCommit): Added. Use the API added at /privileged-api/associate-commit
456 to associate a new commit with this analysis task. Each commit has either caused or fixed the change.
457 (AnalysisTask.prototype.dissociateCommit): Added. Use the same API to disassociate each commit.
458 (AnalysisTask._constructAnalysisTasksFromRawData): Find all commits associated with each analysis task.
459 Because commit log objects use a fake ID fdue to /api/measurement-set not providing commit IDs, we must
460 use CommitLog.findByRemoteId to find each commit instead of usual CommitLog.findById.
461 (AnalysisTask._constructAnalysisTasksFromRawData.resolveCommits): Added.
463 * public/v3/models/build-request.js:
464 (BuildRequest.prototype.hasFinished): Renamed from hasCompleted since it was confusing for this._status
465 being "completed" wasn't a necessary condition for this function to return true.
467 * public/v3/models/commit-log.js:
468 (CommitLog): Added the static map for actual commit ID instead of a fake ID created in ensureSingleton.
469 (CommitLog.prototype.remoteId): Added. Returns the real commit ID.
470 (CommitLog.findByRemoteId): Added. Finds an CommitLog object using the real ID.
472 * public/v3/models/test-group.js:
473 (TestGroup.prototype.hasFinished): Renamed from hasCompleted to match the rename in BuildRequest.
475 * public/v3/pages/analysis-task-page.js:
476 (AnalysisTaskPage): Added lists for the commits that fixed and caused the change using MutableListView.
477 Also adopted MutableListView for the list of associated bugs.
478 (AnalysisTaskPage.prototype.render): Added the code to populate the newly added lists.
479 (AnalysisTaskPage.prototype._makeCommitListItem): Added.
480 (AnalysisTaskPage.prototype._associateBug): Now this is a callback from MutableListView.
481 (AnalysisTaskPage.prototype._associateCommit): Added.
482 (AnalysisTaskPage.prototype._dissociateCommit): Added.
483 (AnalysisTaskPage.htmlTemplate):
484 (AnalysisTaskPage.cssTemplate):
486 * public/v3/remote.js:
487 (getJSON): Spit out the entire responseText when JSON failed to parse to make debugging easier.
489 2016-03-15 Ryosuke Niwa <rniwa@webkit.org>
491 Extract the code to format commit logs into its own PHP file
492 https://bugs.webkit.org/show_bug.cgi?id=155514
494 Rubber-stamped by Chris Dumez.
496 Extracted CommitLogFetcher out of /api/commits so that it could be used in analysis-tasks.php
497 in the future to support associating cause/fix for each analysis task.
499 * public/api/commits.php:
500 * public/include/commit-log-fetcher.php: Added.
502 (CommitLogFetcher::__construct): Added.
503 (CommitLogFetcher::repository_id_from_name): Added.
504 (CommitLogFetcher::fetch_between): Added.
505 (CommitLogFetcher::fetch_oldest): Added.
506 (CommitLogFetcher::fetch_latest): Added.
507 (CommitLogFetcher::fetch_last_reported): Added.
508 (CommitLogFetcher::fetch_revision): Added.
509 (CommitLogFetcher::commit_for_revision): Added.
510 (CommitLogFetcher::format_single_commit): Added.
511 (CommitLogFetcher::format_commit): Added.
513 2016-03-09 Ryosuke Niwa <rniwa@webkit.org>
515 Build fix after r196870.
517 * public/include/report-processor.php:
519 2016-03-09 Ryosuke Niwa <rniwa@webkit.org>
521 Add Size metric to perf dashboard
522 https://bugs.webkit.org/show_bug.cgi?id=155266
524 Reviewed by Chris Dumez.
526 Added the "Size" metric and use bytes as its unit.
528 * public/js/helper-classes.js:
531 (RunsData.unitFromMetricName):
533 2016-02-20 Ryosuke Niwa <rniwa@webkit.org>
535 Add the support for universal slave password
536 https://bugs.webkit.org/show_bug.cgi?id=154476
538 Reviewed by David Kilzer.
540 Added the support for universalSlavePassword.
543 * public/include/report-processor.php:
544 (ReportProcessor::process):
545 (ReportProcessor::authenticate_and_construct_build_data): Extracted from process().
547 2016-02-19 Ryosuke Niwa <rniwa@webkit.org>
549 Analysis tasks page complains about missing repository but with a wrong name
550 https://bugs.webkit.org/show_bug.cgi?id=154468
552 Reviewed by Chris Dumez.
554 Fixed the bug by using the right variable in the template literal.
556 * public/v3/components/customizable-test-group-form.js:
557 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use querySelector here since Chrome doesn't have
558 getElementsByClassName on ShadowRoot.
559 * public/v3/pages/analysis-task-page.js:
560 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Use name which is the name of
563 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
565 Revert an unintended change made in the previous commit.
569 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
571 Perf dashboard should let user cancel pending A/B testing and hide failed ones
572 https://bugs.webkit.org/show_bug.cgi?id=154433
574 Reviewed by Chris Dumez.
576 Added a button to hide a test group in the details view (the bottom table) in the analysis task page, and
577 "Show hidden tests" link to show the hidden test groups on demand. When a test group is hidden, all pending
578 requests in the group will also be canceled since a common scenario of using this feature is that the user
579 had triggered an useless A/B testing; e.g. all builds will fail, wrong, etc... We can revisit and add the
580 capability to just cancel the pending requests and leaving the group visible later if necessary.
582 Run `ALTER TYPE build_request_status_type ADD VALUE 'canceled';` to add the new type.
584 * init-database.sql: Added testgroup_hidden column to analysis_test_groups table and added 'canceled'
585 as a value to build_request_status_type table.
586 * public/api/test-groups.php:
587 (format_test_group): Added 'hidden' field in the JSON result.
588 * public/privileged-api/update-test-group.php:
589 (main): Added the support for updating testgroup_hidden column. When this column is set to true, also
590 cancel all pending build requests (by setting its request_status to 'canceled' which will be ignore by
592 * public/v3/components/test-group-results-table.js:
593 (TestGroupResultsTable.prototype.setTestGroup): Reset _renderedTestGroup here so that the next call to
594 render() will update the table; e.g. when build requests' status change from 'Pending' to 'Canceled'.
595 * public/v3/models/build-request.js:
596 (BuildRequest.prototype.hasCompleted): A build request is considered complete/finished if it's canceled.
597 (BuildRequest.prototype.hasPending): Added.
598 (BuildRequest.prototype.statusLabel): Handle 'canceled' status.
599 * public/v3/models/test-group.js:
601 (TestGroup.prototype.updateSingleton): Added to update 'hidden' field.
602 (TestGroup.prototype.isHidden): Added.
603 (TestGroup.prototype.hasPending): Added.
604 (TestGroup.prototype.hasPending): Added.
605 (TestGroup.prototype.updateHiddenFlag): Added. Uses the privileged API to update testgroup_hidden column.
606 The JSON API also updates the status of the 'pending' build requests in the group to 'canceled'.
607 * public/v3/pages/analysis-task-page.js:
608 (AnalysisTaskPage): Added _showHiddenTestGroups and _filteredTestGroups as instance variables.
609 (AnalysisTaskPage.prototype._didFetchTestGroups):
610 (AnalysisTaskPage.prototype._showAllTestGroups): Added.
611 (AnalysisTaskPage.prototype._didUpdateTestGroupHiddenState): Extracted from _didFetchTestGroups.
612 (AnalysisTaskPage.prototype._renderTestGroupList): Use the filtered list of test groups to show the list
613 of test groups. When all test groups are shown, we would first show the hidden ones after the regular ones.
614 (AnalysisTaskPage.prototype._createTestGroupListItem): Extracted from _renderTestGroupList.
615 (AnalysisTaskPage.prototype._renderTestGroupDetails): Update the text inside the button to hide the test
616 group. Also show a warning text that the pending requests will be canceled if there are any.
617 (AnalysisTaskPage.prototype._hideCurrentTestGroup): Added.
618 (AnalysisTaskPage.cssTemplate): Updated the style.
620 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
622 The rows in the analysis results table should be expandable
623 https://bugs.webkit.org/show_bug.cgi?id=154427
625 Reviewed by Chris Dumez.
627 Added "(Expand)" link between rows that have hidden points. Upon click it inserts the hidden rows.
629 We insert around five rows at a time when there are hundreds of hidden points but we also avoid leaving
630 behind expandable rows of less than two rows.
632 Also fixed a bug in CustomizableTestGroupForm that getElementsById would throw in the shipping Safari
633 because getElementsById doesn't exist on Element.prototype by using class name instead.
635 * public/v3/components/analysis-results-viewer.js:
636 (AnalysisResultsViewer):
637 (AnalysisResultsViewer.prototype.setCurrentTestGroup): Removed superfluous call to render().
638 (AnalysisResultsViewer.prototype.setPoints): Always show the start and the end points.
639 (AnalysisResultsViewer.prototype.buildRowGroups):
640 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Add an instance of ExpandableRow which
641 shows a "(Expand)" link to show hidden rows here.
642 (AnalysisResultsViewer.prototype._expandBetween): Added. Expands rows between two points.
643 (AnalysisResultsViewer.cssTemplate): Added rules for "(Expand)" links.
644 (AnalysisResultsViewer.ExpandableRow): Added.
645 (AnalysisResultsViewer.ExpandableRow.prototype.resultContent): Added. Overrides what's in the results column.
646 (AnalysisResultsViewer.ExpandableRow.prototype.heading): Added. Generates "(Expand)" link.
648 * public/v3/components/customizable-test-group-form.js:
649 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use getElementsByClassName instead of
651 (CustomizableTestGroupForm.prototype._classForLabelAndRepository): Renamed from _idForLabelAndRepository.
652 (CustomizableTestGroupForm._constructRevisionRadioButtons): Set class name instead of id.
654 * public/v3/components/results-table.js:
655 (ResultsTable.prototype.render): Don't generate radio buttons to select a row when root set is missing;
656 e.g. for rows that show "(Expand)" links.
658 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
660 Statistically significant A/B testing results should be color coded in details view
661 https://bugs.webkit.org/show_bug.cgi?id=154414
663 Reviewed by Chris Dumez.
665 Color code the statistically significant comparisions in TestGroupResultsTable as done in the analysis
668 * public/v3/components/customizable-test-group-form.js:
669 (CustomizableTestGroupForm.cssTemplate): Build fix after r196768.
670 * public/v3/components/test-group-results-table.js:
671 (TestGroupResultsTable.prototype.buildRowGroups): Add the status as a class name.
672 (TestGroupResultsTable.cssTemplate): Added styles to color-code statistically significant results.
674 2016-02-17 Ryosuke Niwa <rniwa@webkit.org>
676 v3 UI should allow custom revisions for A/B testing
677 https://bugs.webkit.org/show_bug.cgi?id=154379
679 Reviewed by Chris Dumez.
681 Added the capability to customize revisions selected in the overview chart and the results viewer.
683 Newly added CustomizableTestGroupForm is responsible for allowing users to modify the set of revisions in
684 a new A/B testing group. Unlike TestGroupForm which doesn't know anything about which revisions are selected
685 for each project/repository, CustomizableTestGroupForm is aware of the list of revisions used in each set.
687 The list of revisions used in each set is represented by RootSet if users had not customized them, and
688 CustomRootSet otherwise; the latter was added since regular RootSet object requires CommitLog and other
689 DataModelObjects which are hard to create without corresponding database entries.
691 * public/v3/components/customizable-test-group-form.js: Added.
692 (CustomizableTestGroupForm): Added.
693 (CustomizableTestGroupForm.prototype.setRootSetMap): Added.
694 (CustomizableTestGroupForm.prototype._submitted): Overrides the superclass' method.
695 (CustomizableTestGroupForm.prototype._customize): Ditto. Unlike TestGroupForm's callback, this class'
696 callback passes in a root set map as the third argument.
697 (CustomizableTestGroupForm.prototype._computeRootSetMap): Added. Returns this._rootSetMap, which is set by
698 AnalysisTaskPage if user had not customized the root sets. Otherwise return a new map with CustomRootSet's.
699 (CustomizableTestGroupForm.prototype.render): Added. Creates a table to allow customization of root sets.
700 (CustomizableTestGroupForm._constructRevisionRadioButtons): Added.
701 (CustomizableTestGroupForm._createRadioButton): Added.
702 (CustomizableTestGroupForm.cssTemplate): Added.
703 (CustomizableTestGroupForm.formContent): Added. This method is called by TestGroupForm.htmlTemplate.
704 * public/v3/components/test-group-form.js:
705 (TestGroupForm): Updated the various methods to not directly mutate DOM. Store the state in instance
706 variables and update DOM in render() as done elsewhere.
707 (TestGroupForm.prototype.setNeedsName): Deleted. We no longer need this flag since TestGroupForm which is
708 used for retries never needs a name and CustomizableTestGroupForm which is used to create a new test group
709 always requires a name.
710 (TestGroupForm.prototype.setDisabled):
711 (TestGroupForm.prototype.setLabel):
712 (TestGroupForm.prototype.setRepetitionCount):
713 (TestGroupForm.prototype.render): Added.
714 (TestGroupForm.prototype._submitted): Moved the code to prevent the default action has been moved to the
715 constructor since this method is overridden by CustomizableTestGroupForm.
716 (TestGroupForm.cssTemplate): Added.
717 (TestGroupForm.htmlTemplate):
718 (TestGroupForm.formContent): Extracted from htmlTemplate.
719 * public/v3/index.html:
720 * public/v3/models/repository.js:
721 (Repository.sortByNamePreferringOnesWithURL): Added.
722 * public/v3/models/root-set.js:
723 (RootSet.prototype.revisionForRepository): Added so that _createTestGroupAfterVerifyingRootSetList can retrieve
724 the revision information from CustomRootSet without going through CommitLog objects since CustomRootSet doesn't
725 have associated CommitLog objects.
726 (CustomRootSet): Added. Used by CustomizableTestGroupForm to create a custom root map since regular RootSet
727 requires CommitLog and other related objects which are hard to create without database entries.
728 (CustomRootSet.prototype.setRevisionForRepository): Added.
729 (CustomRootSet.prototype.repositories): Added.
730 (CustomRootSet.prototype.revisionForRepository): Added.
731 * public/v3/pages/analysis-task-page.js:
733 (AnalysisTaskPage.prototype.render): Removed the reference to v2 UI since v3 UI is now strictly more powerful
734 than v2 UI. Also update the root set maps in each form here.
735 (AnalysisTaskPage.prototype._retryCurrentTestGroup): No longer takes unused name argument as it got removed
737 (AnalysisTaskPage.prototype._chartSelectionDidChange): No longer updates the disabled-ness here since it's now
738 done in render() via setRootSetMap().
739 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Now takes rootSetMap as an argument.
740 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): No longer updates the disabled-ness here
741 since it's now done in render() via setRootSetMap().
742 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Now takes rootSetMap as an argument.
743 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Take a dictionary of root set labels
744 such as A and B, which maps to a RootSet or a newly-added CustomRootSet.
745 (AnalysisTaskPage.htmlTemplate): Use customizable-test-group-form for creating a new A/B testing group. Retry
746 form will continue to use TestGroupForm since customizing revisions is non-sensical in retries.
747 (AnalysisTaskPage.cssTemplate): Updated the style.
749 2016-02-16 Ryosuke Niwa <rniwa@webkit.org>
751 v3 UI has the capability to schedule an A/B testing in a specific range
752 https://bugs.webkit.org/show_bug.cgi?id=154329
754 Reviewed by Chris Dumez.
756 Extended AnalysisTaskChartPane and ResultsTable so that users can select a range of points in either
757 the overview chart pane and the results viewer table. Extracted TestGroupForm out of the analysis task
758 page and used right below those two components in the analysis task page.
760 * public/v3/components/results-table.js:
762 (ResultsTable.prototype.setRangeSelectorLabels): Added.
763 (ResultsTable.prototype.setRangeSelectorCallback): Added.
764 (ResultsTable.prototype.selectedRange): Added.
765 (ResultsTable.prototype._rangeSelectorClicked): Added.
766 (ResultsTable.prototype.render): Generate radio boxes to select a range.
768 * public/v3/components/test-group-form.js:
770 (TestGroupForm.prototype.setStartCallback): Added.
771 (TestGroupForm.prototype.setNeedsName): Added.
772 (TestGroupForm.prototype.setDisabled): Added.
773 (TestGroupForm.prototype.setLabel): Added.
774 (TestGroupForm.prototype.setRepetitionCount): Added.
775 (TestGroupForm.prototype._submitted): Added.
776 (TestGroupForm.htmlTemplate): Extracted from AnalysisTaskPage.htmlTemplate.
778 * public/v3/index.html:
780 * public/v3/pages/analysis-task-page.js:
781 (AnalysisTaskChartPane.prototype._mainSelectionDidChange): Added. Delegates the work to AnalysisTaskPage.
782 (AnalysisTaskChartPane.prototype.selectedPoints): Added.
784 (AnalysisTaskPage.prototype.title):
785 (AnalysisTaskPage.prototype.render):
786 (AnalysisTaskPage.prototype._renderTestGroupDetails): Use TestGroupForm's methods instead of mutating DOM.
787 (AnalysisTaskPage.prototype._retryCurrentTestGroup):
788 (AnalysisTaskPage.prototype._chartSelectionDidChange): Added.
789 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Added.
790 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): Added.
791 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Added.
792 (AnalysisTaskPage.prototype._createRetryNameForTestGroup):
793 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Extracted from _retryCurrentTestGroup
794 so that we can call it in _createNewTestGroupFromChart and _createNewTestGroupFromViewer.
795 (AnalysisTaskPage.htmlTemplate):
797 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
799 Extract the code specific to v2 UI out of shared statistics.js
800 https://bugs.webkit.org/show_bug.cgi?id=154277
802 Reviewed by Chris Dumez.
804 Extracted statistics-strategies.js out of statistics.js for v2 UI and detect-changes.js. The intent is to
805 deprecate this file once we implement refined statistics tools in v3 UI and adopt it in detect-changes.js.
807 * public/shared/statistics.js:
808 (Statistics.movingAverage): Extracted from the "Simple Moving Average" strategy.
809 (Statistics.cumultaiveMovingAverage): Extracted from the "Cumulative Moving Average" strategy.
810 (Statistics.exponentialMovingAverage): Extracted from the "Exponential Moving Average" strategy.
811 Use a temporary "movingAverage" to keep the last moving average instead of relying on the previous
812 entry in "averages" array to avoid special casing an array of length 1 and starting the loop at i = 1.
813 (Statistics.segmentTimeSeriesGreedyWithStudentsTTest): Extracted from "Segmentation: Recursive t-test"
814 strategy. Don't create the list of averages to match segmentTimeSeriesByMaximizingSchwarzCriterion here.
815 It's done in newly added averagesFromSegments.
816 (Statistics.segmentTimeSeriesByMaximizingSchwarzCriterion): Extracted from
817 "Segmentation: Schwarz criterion" strategy.
818 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Just store the start index to match
820 (App.Pane.updateStatisticsTools):
821 (App.Pane._computeMovingAverageAndOutliers):
823 * public/v2/index.html:
824 * public/v2/statistics-strategies.js: Added.
825 (StatisticsStrategies.MovingAverageStrategies): Added.
826 (averagesFromSegments): Extracted from "Segmentation: Schwarz criterion" strategy. Now used by both
827 "Segmentation: Recursive t-test" and "Segmentation: Schwarz criterion" strategies.
828 (StatisticsStrategies.EnvelopingStrategies): Moved from Statistics.EnvelopingStrategies.
829 (StatisticsStrategies.TestRangeSelectionStrategies): Moved from Statistics.TestRangeSelectionStrategies.
830 (createWesternElectricRule): Moved from statistics.js.
831 (countValuesOnSameSide): Ditto.
832 (StatisticsStrategies.executeStrategy): Moved from Statistics.executeStrategy.
833 * tools/detect-changes.js:
834 (computeRangesForTesting):
836 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
838 v1 UI and v2 UI should share statistics.js
839 https://bugs.webkit.org/show_bug.cgi?id=154262
841 Reviewed by Chris Dumez.
843 Share statistics.js between v1 and v2 UI.
846 * public/js/shared.js: Deleted.
847 * public/js/statistics.js: Removed.
848 * public/shared: Added.
849 * public/shared/statistics.js: Moved from Websites/perf.webkit.org/public/v2/js/statistics.js.
850 * public/v2/index.html:
851 * public/v2/js/statistics.js: Removed.
852 * public/v3/index.html:
853 * tools/detect-changes.js:
855 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
857 v3 UI sometimes shows same dates twice on the x-axis of time series charts
858 https://bugs.webkit.org/show_bug.cgi?id=154210
860 Reviewed by Chris Dumez.
862 The bug was caused by the label generation code in TimeSeriesChart.computeTimeGrid never emitting hours.
864 Use hours instead of dates as labels when the current time's date is same as the previous label's date.
865 Always include dates before entering this mode to avoid just having hours as labels on the entire x-axis.
867 * public/v3/components/time-series-chart.js:
868 (TimeSeriesChart.prototype._renderXAxis): Slightly increase the "average" width of x-axis label.
869 (TimeSeriesChart.computeTimeGrid): See above. Also assert that the number of labels we generate never
870 exceeds maxLabels as a sanity check.
871 (TimeSeriesChart._timeIterators): Added an iterator that increments by two hours for zoomed graphs.
873 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
875 v3 UI should show status and associated bugs on analysis task pages
876 https://bugs.webkit.org/show_bug.cgi?id=154212
878 Reviewed by Chris Dumez.
880 Added the capability to see and modify the status and the list of associated of bugs on analysis task pages.
882 Also added the list of related tasks, which are analysis tasks associated with the same bug or have
883 overlapping time ranges with the same test metric but on a potentially different platform.
885 In addition, categorize analysis tasks with the status of "no change" or "inconclusive" as "closed" as no
886 further action can be taken (users can bring them back to non-closed state without any restrictions).
888 * public/api/analysis-tasks.php:
889 (format_task): Categorize 'unchanged' and 'inconclusive' analysis tasks as closed.
891 * public/privileged-api/associate-bug.php:
892 (main): Added shouldDelete as a new mechanism to disassociate a bug since v3 UI shares a single Bug object
893 between multiple analysis tasks (as it should have been in the first place).
895 * public/v3/components/chart-pane-base.js:
897 (ChartPaneBase.prototype._fetchAnalysisTasks): Since each analysis task's change type (status/result) could
898 change, we need to create annotation objects during each render() call.
899 (ChartPaneBase.prototype.render):
900 (ChartPaneBase.prototype._renderAnnotations): Extracted from ChartPaneBase.prototype._fetchAnalysisTasks to
901 do that. I was afraid of the perf impact of this but it doesn't seem to be an issue in my testing.
902 (ChartPaneBase.cssTemplate): Removed superfluous margins (moved to ChartPane.cssTemplate) around the charts
903 since they are only useful in the charts page.
905 * public/v3/models/analysis-task.js:
907 (AnalysisTask.prototype.updateSingleton): Added a comment as to why object.result cannot be renamed to
908 object.changeType in the JSON API.
909 (AnalysisTask.prototype.updateName): Added.
910 (AnalysisTask.prototype.updateChangeType): Added.
911 (AnalysisTask.prototype._updateRemoteState): Added.
912 (AnalysisTask.prototype.associateBug): Added.
913 (AnalysisTask.prototype.disassociateBug): Added.
914 (AnalysisTask.fetchRelatedTasks): Added. See above for the criteria of related-ness.
916 * public/v3/pages/analysis-task-page.js:
918 (AnalysisTaskPage.prototype.updateFromSerializedState):
919 (AnalysisTaskPage.prototype._fetchRelatedInfoForTaskId): Extracted from updateFromSerializedState.
920 (AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks): Added.
921 (AnalysisTaskPage.prototype.render): Render the list of associated bugs, the list of bug trackers (so that
922 users can use it to associate with a new bug), and the list of related analysis tasks.
923 (AnalysisTaskPage.prototype._renderTestGroupList): Extracted from render since it was getting too long.
924 (AnalysisTaskPage.prototype._renderTestGroupDetails): Ditto.
925 (AnalysisTaskPage.prototype._updateChangeType): Added.
926 (AnalysisTaskPage.prototype._associateBug): Added.
927 (AnalysisTaskPage.prototype._disassociateBug): Added.
928 (AnalysisTaskPage.htmlTemplate): Added various elements to show and modify the status, associate bugs,
929 and a list of related analysis tasks.
930 (AnalysisTaskPage.cssTemplate): Added various styles for those form controls.
932 * public/v3/pages/chart-pane.js:
933 (ChartPane.cssTemplate): Moved the margins from ChartPaneBase.cssTemplate.
935 2016-02-12 Ryosuke Niwa <rniwa@webkit.org>
937 Perf dashboard should allow renaming analysis tasks and test groups
938 https://bugs.webkit.org/show_bug.cgi?id=154200
940 Reviewed by Chris Dumez.
942 Allow editing names of analysis tasks and A/B testing groups in the v3 UI.
944 Added the support for updating the name to the privileged API at /privileged-api/update-analysis-task
945 and added a new prevailed API to update A/B testing groups at /privileged-api/update-test-group.
947 * public/privileged-api/update-analysis-task.php: Added the support for renaming the analysis task.
950 * public/privileged-api/update-test-group.php: Added. Supports updating the test group's name.
953 * public/v3/components/editable-text.js: Added.
954 (EditableText): Added. A new editable text label control. It looks like a text node with "(Edit)" link
955 at the end which allow users to go into the "editing mode", which reveals an input element.
956 The user can exit the editing mode by either moving the focus away from the control or clicking on
957 "(Save)" at the end. It calls _updateCallback in the latter case.
958 (EditableText.prototype.editedText): Returns the current value of the input element user.
959 (EditableText.prototype.setText): Sets the label. This does not live-update the input element until
960 the user exists the current editing mode and re-enters it.
961 (EditableText.prototype.setStartedEditingCallback): Sets a callback which gets called when the user
962 requested to enter the editing mode. Since EditableText relies on AnalysisTaskPage to render, this
963 callback only exits to call EditableText.render() in AnalysisTask._didStartEditingTaskName.
964 (EditableText.prototype.setUpdateCallback): Sets a callback which gets called when the user exits
965 the editing mode by activating the "(Save)" link. This callback MUST return a promise upon resolution
966 of which the control gets out of the editing mode. While the promise is in flight, the input element
968 (EditableText.prototype.render): Updates various states of the elements. When _updatingPromise is not
969 falsy, we make the input element readonly and show '(...)' on the link. Don't show the action link
970 if the label is empty (e.g. analysis task or test group is still being fetched).
971 (EditableText.prototype._didClick): Called when the user clicked on the action link. Enter the editing
972 mode or save the edited label via _updateCallback.
973 (EditableText.prototype._didBlur): Exit the editing mode without saving if the input element is not
974 focused, there is no inflight promise returned by _updateCallback, and the action link "(Save)" does
976 (EditableText.prototype._didUpdate): Called when exiting the editing mode.
977 (EditableText.htmlTemplate):
978 (EditableText.cssTemplate):
980 * public/v3/index.html: Include newly added editable-text.js.
982 * public/v3/models/analysis-task.js:
983 (AnalysisTask.prototype.updateSingleton): Added.
984 (AnalysisTask.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
985 the analysis task from the sever.
986 (AnalysisTask._constructAnalysisTasksFromRawData): Use ensureSingleton instead of manually calling
987 findById since we need to update the name of the singleton object we found (via updateSingleton).
989 * public/v3/models/bug.js:
990 (Bug.ensureSingleton): Moved the code to compute the synthetic id from AnalysisTask's
991 _constructAnalysisTasksFromRawData.
992 (Bug.prototype.updateSingleton): Added. Just assert that nothing changes.
994 * public/v3/models/build-request.js:
995 (BuildRequest.prototype.updateSingleton): Added. Assert that the intrinsic values of a build request
996 doesn't change and update status text, status url, and build id as they could change.
998 * public/v3/models/commit-log.js:
999 (CommitLog): Made the constructor argument conform to the convention of id, object pair so that we can
1000 use DataModelObject.ensureSingleton.
1001 (CommitLog.ensureSingleton):
1002 (CommitLog.prototype.updateSingleton): Extracted from CommitLog.ensureSingleton.
1004 * public/v3/models/data-model.js:
1005 (DataModelObject.ensureSingleton): Call newly added updateSingleton.
1006 (DataModelObject.prototype.updateSingleton):
1007 (LabeledObject): Removed the name map since it's never used (findByName is never called anywhere).
1008 (LabeledObject.prototype.updateSingleton): Added. Updates _name.
1009 (LabeledObject.findByName): Deleted.
1011 * public/v3/models/test-group.js:
1012 (TestGroup.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
1013 the test group from the sever.
1014 (TestGroup._createModelsFromFetchedTestGroups): Removed bogus code. A root set doesn't have a test
1015 group associated with it since multiple test groups can share a single root set (this property doesn't
1018 * public/v3/pages/analysis-task-page.js:
1019 (AnalysisTaskPage): Removed useless _taskId and added this._testGroupLabelMap and this._taskNameLabel.
1020 (AnalysisTaskPage.prototype.updateFromSerializedState): Cleanup.
1021 (AnalysisTaskPage.prototype._didFetchTask): Assert that this function is called exactly once.
1022 (AnalysisTaskPage.prototype.render): Use this._task.id() to show the v2 link. Use EditableText to show
1023 the names of the analysis task and the associated test groups. Hide the overview chart and the list of
1024 test groups (along with the retry/confirm button) when the analysis task failed to fetch. We always
1025 update the names of the analysis task and the associated test groups since they could be updated by
1027 (AnalysisTaskPage.prototype._didStartEditingTaskName): Added.
1028 (AnalysisTaskPage.prototype._updateTaskName): Added.
1029 (AnalysisTaskPage.prototype._updateTestGroupName): Added.
1030 (AnalysisTaskPage.htmlTemplate): Updated the style.
1032 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1034 Land the change that was supposed to be the part of r196463.
1036 * public/v3/pages/analysis-task-page.js:
1037 (AnalysisTaskPage.prototype._didFetchTestGroups): Select the latest test group by default.
1039 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1041 Refine v3 UI's analysis task page
1042 https://bugs.webkit.org/show_bug.cgi?id=154152
1044 Reviewed by Chris Dumez.
1046 This patch makes the following refinements to the analysis task page:
1047 - Always show the relative different of in-progress A/B testing.
1048 - Make the annotations (colored bars) in the chart open other analysis tasks.
1049 - Order the A/B testing groups in the reverse chronological order.
1050 - Select the time range corresponding to the current test group.
1052 * public/v3/components/analysis-results-viewer.js:
1053 (AnalysisResultsViewer.cssTemplate): Fixed the bug that pending and running testing groups are no longer
1054 colored after r196440. Use a slightly more opaque color for currently running groups compared to pending ones.
1056 * public/v3/components/chart-pane-base.js:
1057 (ChartPaneBase.prototype.setMainSelection): Added.
1058 (ChartPaneBase.prototype._openAnalysisTask): Moved the code from ChartPane._openAnalysisTask so that it can be
1059 reused in both AnalysisTaskChartPane and ChartPane (in charts page).
1060 (ChartPaneBase.prototype.router): Added. Overridden by each subclass.
1062 * public/v3/components/test-group-results-table.js:
1063 (TestGroupResultsTable.prototype.buildRowGroups): Always show the summary (relative difference of A to B) as
1064 long as there are some results in each set.
1066 * public/v3/models/test-group.js:
1067 (TestGroup.prototype.compareTestResults): Always set .label and .fullLabel with the relative change as long as
1068 there are some values. Keep using "pending" and "running" in .status since that would determine the color of
1069 stacking blocks representing those A/B testing groups.
1071 * public/v3/pages/analysis-task-page.js:
1072 (AnalysisTaskChartPane):
1073 (AnalysisTaskChartPane.prototype.setPage): Added.
1074 (AnalysisTaskChartPane.prototype.router): Added.
1076 (AnalysisTaskPage.prototype.render): Show the list of A/B testing groups in the reverse chronological order.
1077 Also set the main chart's selection to the time range of the current test group.
1079 * public/v3/pages/chart-pane.js:
1080 (ChartPane.prototype.router): Added.
1081 (ChartPane.prototype._openAnalysisTask): Moved to ChartPaneBase.prototype._openAnalysisTask.
1083 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1085 Add a script to process backlogs created while perf dashboard was in the maintenance mode
1086 https://bugs.webkit.org/show_bug.cgi?id=154140
1088 Reviewed by Chris Dumez.
1090 Added a script to process the backlog JSONs created while the perf dashboard was put in the maintenance mode.
1091 It re-submits each JSON file to the perf dashboard using the same server config file used by syncing scripts.
1093 * public/include/report-processor.php:
1094 (TestRunsGenerator::test_value_list_to_values_by_iterations): Fixed a bug in the error message code. It was
1095 referencing an undeclared variable.
1096 * tools/process-maintenance-backlog.py: Added.
1098 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1100 AnalysisResultsViewer never uses this._smallerIsBetter
1101 https://bugs.webkit.org/show_bug.cgi?id=154134
1103 Reviewed by Chris Dumez.
1105 Removed the unused instance variable _smallerIsBetter from AnalysisResultsViewer and TestGroupStackingBlock.
1107 * public/v3/components/analysis-results-viewer.js:
1108 (AnalysisResultsViewer): Removed the unused _smallerIsBetter.
1109 (AnalysisResultsViewer.prototype.setSmallerIsBetter): Deleted.
1110 (AnalysisResultsViewer.prototype.buildRowGroups):
1111 (AnalysisResultsViewer.TestGroupStackingBlock): Removed the unused _smallerIsBetter.
1112 * public/v3/pages/analysis-task-page.js:
1113 (AnalysisTaskPage.prototype._didFetchTask):
1115 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
1117 Build fix after r196440.
1119 * public/v3/models/test-group.js:
1120 (TestGroup.prototype.addBuildRequest): Clear the map instead of setting the property to null.
1122 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
1124 Perf dashboard should have UI to retry A/B testing
1125 https://bugs.webkit.org/show_bug.cgi?id=154090
1127 Reviewed by Chris Dumez.
1129 Added a button to re-try an existing A/B testing group with a custom repetition count. The same button functions
1130 as a way of confirming the progression/regression when there have been no A/B testing scheduled in the task.
1132 Also fixed the bug that A/B testing groups that have been waiting for other test groups will be shown as "running".
1134 * public/v3/components/results-table.js:
1135 (ResultsTable.cssTemplate): Don't pad the list of extra repositories when it's empty.
1137 * public/v3/components/test-group-results-table.js:
1138 (TestGroupResultsTable.prototype.buildRowGroups): Use TestGroup.labelForRootSet instead of manually
1139 computing the letter for each configuration set.
1141 * public/v3/models/build-request.js:
1142 (BuildRequest.prototype.hasStarted): Added.
1144 * public/v3/models/data-model.js:
1145 (DataModelObject.ensureSingleton): Added.
1146 (DataModelObject.cachedFetch): Added noCache option. This is used when re-fetching the test groups after
1149 * public/v3/models/measurement-cluster.js:
1150 (MeasurementCluster.prototype.startTime): Added.
1152 * public/v3/models/measurement-set.js:
1153 (MeasurementSet.prototype.hasFetchedRange): Added. Returns true only if there are no "holes" (cluster
1154 yet to be fetched) between the specified time range. This was added to fix a bug in AnalysisTaskPage's
1155 _didFetchMeasurement.
1157 * public/v3/models/test-group.js:
1158 (TestGroup): Added this._rootSetToLabel.
1159 (TestGroup.prototype.addBuildRequest): Reset this._rootSetToLabel along with this._requestedRootSets.
1160 (TestGroup.prototype.repetitionCount): Added. Returns the number of iterations executed per set. We assume that
1161 every root set in the test group shares a single repetition count.
1162 (TestGroup.prototype.requestedRootSets): Now populates this._rootSetToLabel for labelForRootSet.
1163 (TestGroup.prototype.labelForRootSet): Added.
1164 (TestGroup.prototype.hasStarted): Added.
1165 (TestGroup.prototype.compareTestResults): Use 'running' and 'pending' to differentiate test groups that are waiting
1166 for other groups to finish running from the ones that are actually running ('incomplete' before this patch).
1167 (TestGroup.fetchByTask):
1168 (TestGroup.createAndRefetchTestGroups): Added. Creates a new test group using the privileged-api/create-test-group
1169 and fetches the list of test groups for the specified analysis task.
1170 (TestGroup._createModelsFromFetchedTestGroups): Extracted from TestGroup.fetchByTask.
1172 * public/v3/pages/analysis-task-page.js:
1173 (AnalysisTaskPage): Initialize _renderedCurrentTestGroup to undefined so that we'd always can differentiate
1174 the initial call to AnalysisTaskPage.render and subsequent calls in which it's identical to _currentTestGroup.
1175 (AnalysisTaskPage.prototype._didFetchMeasurement): Fixed a bug that we don't exit early even when some
1176 clusters in between startPoint and endPoint are still being fetched via newly added hasFetchedRange.
1177 (AnalysisTaskPage.prototype.render): Update the default repetition count based on the current test group.
1178 Also update the label of the button to "Confirm the change" if there is no A/B testing in this task.
1179 (AnalysisTaskPage.prototype._retryCurrentTestGroup): Added. Re-triggers an existing A/B testing group or creates
1180 the A/B testing for the entire range of the analysis task.
1181 (AnalysisTaskPage.prototype._hasDuplicateTestGroupName): Added.
1182 (AnalysisTaskPage.prototype._createRetryNameForTestGroup): Added.
1183 (AnalysisTaskPage.htmlTemplate): Added form controls to re-trigger A/B testing.
1184 (AnalysisTaskPage.cssTemplate): Updated the style.
1186 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
1188 Removed the duplicated definition of ChartPaneBase.
1190 * public/v3/components/chart-pane-base.js:
1192 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
1194 Analysis task page on v3 UI should show charts
1195 https://bugs.webkit.org/show_bug.cgi?id=154057
1197 Reviewed by Chris Dumez.
1199 Extracted ChartPaneBase out of ChartPane and added an instance of its new subclass, AnalysisTaskChartPane,
1200 to the analysis task page. The main difference is that ChartPaneBase doesn't depend on the presence of
1201 this._chartsPage unlike ChartPane. It also doesn't have the header with toolbar (to show breakdown, etc...).
1203 * public/v3/components/base.js:
1204 (ComponentBase.prototype._constructShadowTree): Call htmlTemplate() and cssTemplate() with the right "this".
1206 * public/v3/components/chart-pane-base.js: Added.
1207 (ChartPaneBase): Extracted from ChartPane.
1208 (ChartPaneBase.prototype.configure): Extracted from the constructor. Separating this function allows the
1209 component to be instantiated inside a HTML template.
1210 (ChartPaneBase.prototype._fetchAnalysisTasks): Moved from ChartPane._fetchAnalysisTasks.
1211 (ChartPaneBase.prototype.platformId): Ditto.
1212 (ChartPaneBase.prototype.metricId): Ditto.
1213 (ChartPaneBase.prototype.setOverviewDomain): Ditto.
1214 (ChartPaneBase.prototype.setMainDomain): Ditto.
1215 (ChartPaneBase.prototype._overviewSelectionDidChange): Extracted from the constructor. This is overridden in
1216 ChartPane and unused in AnalysisTaskChartPane.
1217 (ChartPaneBase.prototype._mainSelectionDidChange): Extracted from ChartPane._mainSelectionDidChange.
1218 (ChartPaneBase.prototype._mainSelectionDidZoom): Extracted from ChartPane._mainSelectionDidZoom.
1219 (ChartPaneBase.prototype._indicatorDidChange): Extracted from ChartPane._indicatorDidChange.
1220 (ChartPaneBase.prototype._didFetchData): Moved from ChartPane._fetchAnalysisTasks.
1221 (ChartPaneBase.prototype._openAnalysisTask): Ditto.
1222 (ChartPaneBase.prototype._openCommitViewer): Ditto. Also fixed a bug that we don't show the spinner while
1223 waiting for the data to be fetched by calling this.render() here.
1224 (ChartPaneBase.prototype._keyup): Moved from ChartPane._keyup. Also fixed the bug that the revisions list
1225 doesn't update by calling this.render() here.
1226 (ChartPaneBase.prototype.render): Extracted from ChartPane.render.
1227 (ChartPaneBase.htmlTemplate): Extracted from ChartPane.htmlTemplate.
1228 (ChartPaneBase.paneHeaderTemplate): Added. This is overridden in ChartPane and unused in AnalysisTaskChartPane.
1229 (ChartPaneBase.cssTemplate): Extracted from ChartPane.htmlTemplate.
1231 * public/v3/components/chart-styles.js: Renamed from public/v3/pages/page-with-charts.js.
1232 (PageWithCharts): Renamed from PageWithCharts since it no longer extends PageWithHeading.
1233 (ChartStyles.createChartSourceList):
1235 * public/v3/components/commit-log-viewer.js:
1236 (CommitLogViewer.prototype.view): Set this._repository right away instead of waiting for the fetched data
1237 so that spinner will be shown while the data is being fetched.
1239 * public/v3/index.html:
1241 * public/v3/pages/analysis-task-page.js:
1242 (AnalysisTaskChartPane): Added extends ChartPaneBase.
1243 (AnalysisTaskPage): Added. this._chartPane.
1244 (AnalysisTaskPage.prototype._didFetchTask): Initialize this._chartPane with a domain.
1245 (AnalysisTaskPage.prototype.render): Render this._chartPane.
1246 (AnalysisTaskPage.htmlTemplate):
1248 * public/v3/pages/chart-pane-status-view.js:
1249 (ChartPaneStatusView): Removed the unused router from the argument list.
1250 (ChartPaneStatusView.prototype.pointsRangeForAnalysis): Renamed from analyzeData() since it was ambiguous.
1251 (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Fixed the bug that we don't update the list
1252 of the revisions here.
1253 (ChartPaneStatusView.prototype.computeChartStatusLabels):
1255 * public/v3/pages/chart-pane.js:
1256 (ChartPane): Now extends ChartPaneBase.
1257 (ChartPane.prototype._overviewSelectionDidChange): Extracted from the constructor.
1258 (ChartPane.prototype._mainSelectionDidChange):
1259 (ChartPane.prototype._mainSelectionDidZoom):
1260 (ChartPane.prototype._indicatorDidChange):
1261 (ChartPane.prototype.render):
1262 (ChartPane.prototype._renderActionToolbar):
1263 (ChartPane.paneHeaderTemplate): Extracted from htmlTemplate.
1264 (ChartPane.cssTemplate):
1265 (ChartPane.overviewOptions.selection.onchange): Deleted.
1266 (ChartPane.prototype._fetchAnalysisTasks): Deleted.
1267 (ChartPane.prototype.platformId): Deleted.
1268 (ChartPane.prototype.metricId): Deleted.
1269 (ChartPane.prototype.setOverviewDomain): Deleted.
1270 (ChartPane.prototype.setMainDomain): Deleted.
1271 (ChartPane.prototype._openCommitViewer): Deleted.
1272 (ChartPane.prototype._didFetchData): Deleted.
1273 (ChartPane.prototype._keyup): Deleted.
1275 * public/v3/pages/charts-page.js:
1277 (ChartsPage.createDomainForAnalysisTask): Extracted by createDomainForAnalysisTask; used to set the domain
1278 of the charts in the analysis task page.
1279 (ChartsPage.createStateForAnalysisTask):
1281 * public/v3/pages/dashboard-page.js:
1283 (DashboardPage.prototype._createChartForCell):
1285 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
1287 Add the support for maintenance mode
1288 https://bugs.webkit.org/show_bug.cgi?id=154072
1290 Reviewed by Chris Dumez.
1292 Added the crude support for maintenance mode whereby which the reports are stored in the filesystem
1293 instead of the database.
1295 * config.json: Added maintenanceMode and maintenanceDirectory as well as forgotten siteTitle and
1296 remoteServer.httpdMutexDir.
1297 * public/api/report.php:
1298 (main): Don't connect to the database or modify database when maintenanceMode is set.
1299 * public/include/json-header.php:
1300 (ensure_privileged_api_data): Exit with InMaintenanceMode when maintenanceMode is set. This prevents
1301 privileged API such as creating analysis tasks and new A/B testing groups from modifying the database.
1303 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
1305 Analysis task page on v3 show progression as regressions
1306 https://bugs.webkit.org/show_bug.cgi?id=154045
1308 Reviewed by Chris Dumez.
1310 The bug was caused by TestGroup.compareTestResults referring to undefined _smallerIsBetter.
1311 Retrieve it from the associated metric object via the owner analysis task.
1313 * public/v3/models/test-group.js:
1315 2016-02-05 Ryosuke Niwa <rniwa@webkit.org>
1317 Testing with remote server cache is unusably slow
1318 https://bugs.webkit.org/show_bug.cgi?id=153928
1320 Reviewed by Chris Dumez.
1322 Don't use the single process mode of httpd as it's way too slow even for testing.
1323 Also we'll hit a null pointer crash (http://svn.apache.org/viewvc?view=revision&revision=1711479)
1325 Since httpd exits immediately when launched in multi-process mode, remote-cache-server.py (renamed from
1326 run-with-remote-server.py) now has "start" and "stop" commands to start/stop the Apache. Also added
1327 "reset" command to reset the cache for convenience.
1329 * Install.md: Updated the instruction.
1330 * config.json: Fixed a typo: httpdErro*r*Log.
1331 * tools/remote-cache-server.py: Copied from Websites/perf.webkit.org/tools/run-with-remote-server.py.
1332 Now takes one of the following commands: "start", "stop", and "reset".
1334 (start_httpd): Extracted from main.
1335 (stop_httpd): Added.
1336 * tools/remote-server-relay.conf: Removed redundant (duplicate) LoadModule's.
1337 * tools/run-with-remote-server.py: Removed.
1339 2016-02-04 Ryosuke Niwa <rniwa@webkit.org>
1341 Perf dashboard should have a script to setup database
1342 https://bugs.webkit.org/show_bug.cgi?id=153906
1344 Reviewed by Chris Dumez.
1346 Added tools/setup-database.py to setup the database. It retrieves the database name, username, password
1347 and initializes a database at the specified location.
1349 * Install.md: Updated instruction to setup postgres to use setup-database.py.
1350 * tools/setup-database.py: Added.
1352 (load_database_config):
1353 (determine_psql_dir):
1354 (start_or_stop_database):
1355 (execute_psql_command):
1357 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
1359 buildbot syncing scripts sometimes schedule more than one requests per builder
1360 https://bugs.webkit.org/show_bug.cgi?id=153047
1362 Reviewed by Chris Dumez.
1364 The bug was caused by the check for singularity of scheduledRequests being conducted per configuration
1365 instead of per builder. So if there were multiple test configurations (e.g. Speedometer and Octane) that
1366 both used the same builder, then we may end up scheduling both at once.
1368 Fixed the bug by sharing a single set to keep track of the scheduled requests for all configurations per
1371 * tools/sync-with-buildbot.py:
1372 (load_config): Share a set amongst test configurations for each builder.
1373 (find_request_updates): Instead of creating a new set for each configuration, reuse the existing sets to
1374 share a single set agmonst test configurations for each builder.
1376 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
1378 Analysis results viewer sometimes doesn't show the correct relative difference
1379 https://bugs.webkit.org/show_bug.cgi?id=152930
1381 Reviewed by Chris Dumez.
1383 The bug was caused by single A/B testing result associated with multiple rows when there are multiple data
1384 points with the same root set which matches that of an A/B testing.
1386 Fixed the bug by detecting such a case, and only associating each A/B testing result with the row created
1387 for the first matching point.
1389 * public/v3/components/analysis-results-viewer.js:
1390 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
1392 2016-01-08 Ryosuke Niwa <rniwa@webkit.org>
1394 Make v3 UI analysis task page is hard to understand
1395 https://bugs.webkit.org/show_bug.cgi?id=152917
1397 Reviewed by Antti Koivisto.
1399 Add a dark gray border around the selected block in the analysis results viewer instead of using darker
1400 shades since that looks as if they were bigger regression/progression.
1402 Explicitly show "Failed" as the label instead of omitting with "-" when all build requests in an A/B
1403 testing group fails.
1405 * public/v3/components/analysis-results-viewer.js:
1406 (AnalysisResultsViewer.cssTemplate): Tweaked the style to underline text in the hovered blocks and the
1407 selected blocks and show a dark gray border around the selected blocks.
1408 (AnalysisResultsViewer.TestGroupStackingBlock):
1409 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Use this._title for title.
1410 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
1411 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForRootSet): Deleted.
1413 * public/v3/components/results-table.js:
1414 (ResultsTable.prototype.render):
1415 (ResultsTable.prototype._createRevisionListCells): Extracted from ResultsTable.prototype.render.
1416 (ResultsTable.cssTemplate): Tweaked the style.
1418 (ResultsTableRow.prototype.constructor): Added _labelForWholeRow to store the label for the entire row.
1419 This is used to show the comparison result of two root sets (e.g. A vs B).
1420 (ResultsTableRow.prototype.setLabelForWholeRow): Added.
1421 (ResultsTableRow.prototype.labelForWholeRow): Added.
1422 (ResultsTableRow.prototype.resultContent): Extracted from buildHeading. Creates a hyperlinked bar graph
1423 used for each A/B testing result.
1424 (ResultsTableRow.prototype.buildHeading): Deleted since we need to set colspan on the second table cell
1425 when we're creating a row with _labelForWholeRow.
1427 * public/v3/components/test-group-results-table.js:
1428 (TestGroupResultsTable.prototype.buildRowGroups): Added rows to show relative differences and statistical
1429 significance between root sets (e.g. A vs B).
1431 * public/v3/models/build-request.js:
1432 (BuildRequest.prototype.hasCompleted): Added.
1434 * public/v3/models/test-group.js:
1435 (TestGroup.prototype.compareTestResults): Extracted from AnalysisResultsViewer.TestGroupStackingBlock's
1436 _computeTestGroupStatus and generalized to be reused in TestGroupResultsTable.
1437 (TestGroup.prototype._valuesForRootSet): Moved from AnalysisResultsViewer.TestGroupStackingBlock.
1439 * public/v3/pages/analysis-task-page.js:
1440 (AnalysisTaskPage.cssTemplate): Tweaked the style.
1442 2016-01-07 Ryosuke Niwa <rniwa@webkit.org>
1444 Perf dashboard should automatically add aggregators
1445 https://bugs.webkit.org/show_bug.cgi?id=152818
1447 Reviewed by Chris Dumez.
1449 When an aggregator entry is missing in aggregators table, automatically insert it in /api/report.
1451 In a very early version of the perf dashboard, we had the ability to define a custom aggregator
1452 in an admin page. In practice, nobody used or needed this feature so we got rid of it even before
1453 the dashboard was landed into WebKit repository. This patch cleans up that mess.
1456 (main): Added the filtering capability.
1457 (TestEnvironment): Expose the config JSON in the test environment.
1459 * public/include/report-processor.php:
1460 (ReportProcessor): Renamed name_to_aggregator now that it only contains ID.
1461 (ReportProcessor::__construct): No longer fetches the aggregator table. An equivalent work is done
1462 in newly added ensure_aggregators.
1463 (ReportProcessor::process): Calls ensure_aggregators which populates name_to_aggregator_id.
1464 (ReportProcessor::ensure_aggregators): Added. Add the builtin aggregators: Arithmetic, Geometric,
1465 Harmonic, and Total.
1466 (TestRunsGenerator): Renamed name_to_aggregator now that it only contains ID.
1467 (TestRunsGenerator::__construct):
1468 (TestRunsGenerator::add_aggregated_metric): Don't include aggregator_definition here since it's
1469 never used now that all the aggregations are done natively in PHP.
1470 (TestRunsGenerator::$aggregators): Added. We don't include SquareSum since it's only used for
1471 computing run_square_sum_cache in test_runs table and it's useless elsewhere.
1472 (TestRunsGenerator::aggregate_values): Add a comment about that.
1474 * tests/api-report.js: Updated a test case to reflect the change.
1476 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1478 Perf dashboard JSON API should fail gracefully when postgres is down
1479 https://bugs.webkit.org/show_bug.cgi?id=152812
1481 Reviewed by Chris Dumez.
1483 Even though all JSON APIs returned DatabaseConnectionFailure as the status when Database::connect
1484 returned a falsy value, PHP was spitting out warnings and producing HTTP responses that cannot be
1485 parsed as a JSON when pg_connect failed.
1487 Fixed the bug by suppressing warning messages in pg_connect.
1489 * public/include/db.php:
1490 (Database::connect): Use '@' prefix to suppress warning messages.
1492 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1494 Perf dashboard should auto-generate manifest file when one is missing
1495 https://bugs.webkit.org/show_bug.cgi?id=152813
1497 Reviewed by Chris Dumez.
1499 When /data/manifest.json is missing, fall back to newly added /api/manifest instead of
1500 silently failing to show the UI. This will make the initial setup easier.
1502 * public/api/manifest.php: Added.
1504 * public/include/manifest.php:
1505 (Manifest::manifest): Added.
1506 * public/v3/main.js:
1508 (didFetchManifest): Extracted from fetchManifest.
1510 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1512 Commit another forgotten change, this time, for r194653.
1514 * public/v3/models/measurement-set.js:
1516 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1518 The sampling of time series on v3 UI is too aggressive
1519 https://bugs.webkit.org/show_bug.cgi?id=152804
1521 Reviewed by Chris Dumez.
1523 Fixed a bug that we were always halving the number of data points in _sampleTimeSeries
1524 and increased the number of data points allowed to make the sampling less aggressive.
1526 * public/v3/components/time-series-chart.js:
1527 (TimeSeriesChart.prototype._ensureSampledTimeSeries): Increase the number of maximum points
1528 to 2x the number of pixels divided by the radius of each point.
1529 (TimeSeriesChart.prototype._sampleTimeSeries.findMedian): Changed the semantics of endIndex
1530 to mean the index after the last point and renamed it to indexAfterEnd.
1531 (TimeSeriesChart.prototype._sampleTimeSeries): Fixed a bug that this code always coerced two
1532 data points into one sampled data point despite of the fact i and j are sufficiently apart
1533 since data[j].time - data[i].time > timePerSample by definition.
1535 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1537 Commit the forgotten change for r194651.
1539 * public/v3/pages/domain-control-toolbar.js:
1540 (DomainControlToolbar.prototype.setStartTime):
1542 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1544 The right hand side of main chart appears to be cut off as you zoom out on v3 UI
1545 https://bugs.webkit.org/show_bug.cgi?id=152778
1547 Reviewed by Antti Koivisto.
1549 Add a padding on x-axis after the end time to make the main chart more easily interactive.
1551 * public/v3/components/time-series-chart.js:
1552 (TimeSeriesChart.prototype._computeHorizontalRenderingMetrics):
1554 * public/v3/pages/page-with-charts.js:
1555 (PageWithCharts.mainChartOptions): Add a padding of 5px at the end of x-axis.
1557 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1559 v3 UI should use four sig-figs to label y-axis of the main charts
1560 https://bugs.webkit.org/show_bug.cgi?id=152779
1562 Reviewed by Antti Koivisto.
1564 Increase the number of significant figures used in the main charts to four as done in v2 UI.
1566 * public/v3/pages/chart-pane.js:
1567 (ChartPane.constructor): Create a formatter with four significant figures.
1568 * public/v3/pages/page-with-charts.js:
1569 (PageWithCharts.mainChartOptions): Increase the width of y-axis labels.
1571 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1573 v3 UI's time range slider is harder to use than that of v2 UI
1574 https://bugs.webkit.org/show_bug.cgi?id=152780
1576 Reviewed by Antti Koivisto.
1578 Improved the time range slider by using a cubic mapping to time range and providing a text field
1579 to directly edit the number of days to show.
1581 Now an user can enter the text mode to directly edit the number of days to show by clicking on
1582 the number of days (text field is always there with opacity=0).
1584 * public/v3/pages/charts-toolbar.js:
1585 (ChartsToolbar): Store the minimum and maximum number of days allowed. Also rename _inputElement
1586 to _slider and added a new type=number text field as _editor.
1587 (ChartsToolbar.prototype.render):
1588 (ChartsToolbar.prototype.setStartTime): Exit the text mode when the number of days is changed by
1589 an URL state transition (i.e. back/forward navigation).
1590 (ChartsToolbar.prototype._setInputElementValue): Added. Updates the values of _slider and _editor.
1591 (ChartsToolbar.prototype._enterTextMode): Added. Hide the elements used by the slider mode and
1592 show the text field.
1593 (ChartsToolbar.prototype._exitTextMode): Added. Does the opposite.
1594 (ChartsToolbar.prototype._sliderValueMayHaveChanged): Renamed from _inputValueMayHaveChanged.
1595 (ChartsToolbar.prototype._editorValueMayHaveChanged): Added. Similar to _sliderValueMayHaveChanged
1596 but also corrects the value of _editor if needed.
1597 (ChartsToolbar.prototype._callNumberOfDaysCallback): Extracted from _inputValueMayHaveChanged.
1598 Also fixed a bug that we didn't update the URL state when the change event was fired without
1599 modifying the effective number of days.
1600 (ChartsToolbar.cssTemplate): Tweaked the style to support the new mode. Also set a fixed width on
1601 the span showing the number of days in the slider mode.
1603 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1605 Zooming button is broken on v3 UI
1606 https://bugs.webkit.org/show_bug.cgi?id=152777
1608 Reviewed by Chris Dumez.
1610 Bring up the zoom button in z-index so that users can click it.
1612 * public/v3/components/interactive-time-series-chart.js:
1613 (InteractiveTimeSeriesChart.cssTemplate):
1615 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1617 v3 UI doesn't preserve the time range when charts page is opened from a dashboard
1618 https://bugs.webkit.org/show_bug.cgi?id=152776
1620 Reviewed by Chris Dumez.
1622 Fixed the bug by moving the construction of charts URL from DashboardPage.prototype.open to
1623 DashboardPage.prototype.render and re-rendering the entire page upon an URL state transition.
1625 * public/v3/pages/charts-page.js:
1626 (ChartsPage.createStateForDashboardItem): Takes the start time for the charts page.
1628 * public/v3/pages/dashboard-page.js:
1629 (DashboardPage.prototype.updateFromSerializedState): Merged _numberOfDaysDidChange and
1630 _updateChartsDomainFromToolbar into this function since they're not used elsewhere. Also re-render
1631 the entire page when transition between different number of days to show.
1632 (DashboardPage.prototype._numberOfDaysDidChange): Deleted.
1633 (DashboardPage.prototype._updateChartsDomainFromToolbar): Deleted.
1634 (DashboardPage.prototype.render): Construct URL for each charts here.
1635 (DashboardPage.prototype._createChartForCell): Don't construct URL here since this function is
1636 called once when the dashboard page is opened, and not when the time range is changed.
1638 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1640 Build fix for an old version of PHP after r194618.
1642 * public/api/measurement-set.php:
1644 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1646 A/B testing results should be visualized intuitively on v3 UI
1647 https://bugs.webkit.org/show_bug.cgi?id=152496
1649 Rubber-stamped by Chris Dumez.
1651 Add the "stacking block" view of A/B testing results to the analysis task page on v3 UI.
1653 The patch enhances JSON APIs at /api/analysis-task /api/measurement-set/ to reduce the number of
1654 HTTP requests, and adds two UI components: TestGroupResultsTable and AnalysisResultsViewer both
1655 of which inherits from an abstract superclass: ResultsTable.
1657 ResultsTable provides a tabular presentation of measured values in regular measurement sets and
1658 A/B testing results using groups of bar graphs created by BarGraphGroup. TestGroupResultsTable
1659 inherits from this class to display A/B testing configurations and the averaged results for each
1660 configuration, and AnalysisResultsViewer inherits from it to provide an intuitive visualization
1661 of the outcomes of all A/B testing results associated with a given analysis task.
1663 * public/api/analysis-tasks.php:
1664 (main): Add the capability to find the analysis task based on its build request.
1665 This allows /v3/#/analysis/task/?buildRequest=<id> to be hyperlinked on buildbot page.
1667 * public/api/measurement-set.php:
1668 (main): Removed the unused startTime and endTime, and added "analysisTask" to query parameters.
1669 (AnalysisResultsFetcher): Added. Used to fetch measured data associated with every build request
1670 on an analysis task.
1671 (AnalysisResultsFetcher::__construct):
1672 (AnalysisResultsFetcher::fetch): Unlike MeasurementSetFetcher, we fetch the list of commits and
1673 list of measurements separately since there will be a lot less builds and commits than measured
1674 data (since we're fetching measured values for all tests and their metrics).
1675 (AnalysisResultsFetcher::fetch_commits): Fetches commits.
1676 (AnalysisResultsFetcher::format_measurement): Like MeasurementSetFetcher::format_measurement but
1677 with config_type and config_metric since we're returning measured data for all metrics and test
1679 (AnalysisResultsFetcher::format_map): Similar to MeasurementSetFetcher::format_map.
1681 * public/v3/components/analysis-results-viewer.js: Added.
1682 (AnalysisResultsViewer): Added.
1683 (AnalysisResultsViewer.prototype.didUpdateResults): This callback is called by AnalysisTaskPage
1684 when A/B testing results become available.
1685 (AnalysisResultsViewer.prototype.render): Overrides ResultsTable's render to highlight the block
1686 representing the currently selected test group.
1688 (AnalysisResultsViewer.prototype.buildRowGroups): Creates a list of rows with "stacking blocks"
1689 that visualizes A/B testing results. The algorithm works as follows: 1. Create all table rows.
1690 2. Find which row is associated with each set in each test group. 3. Layout "blocks".
1692 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Collects root sets from all data
1693 in the measurement set as well as A/B testing **requests** (results may contain more repositories
1694 than requested but they aren't interesting for the purpose of visualizing results for the entire
1697 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Create table rows. First,
1698 create table rows for measurement set points that have a matching test group (i.e. either set A
1699 or set B of an A/B testing uses the same root set as a point). Second, insert a new row for each
1700 root set in each test group which didn't find a matching measurement set point. There is a little
1701 subtlety that some A/B testing may specify revisions for a subset of repositories and/or some A/B
1702 testing results may appear as if it goes back in time with respect to other A/B testing results.
1703 For example, consider creating two A/B test groups for WebKit changes and OS changes separately.
1704 There could be no coherent linearization of those two A/B testing in which both WebKit and OS
1705 versions move forward.
1707 (AnalysisResultsViewer.RootSetInTestGroup): Added. Represents a pair (test group, root set) since
1708 a root set could be shared by multiple test groups.
1709 (AnalysisResultsViewer.TestGroupStackingBlock): Added. A stacked block representing a test group.
1710 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex): Associates a row number with
1711 either set A or set B.
1712 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Creates a table cell
1714 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Returns true if this test group
1715 has failed and this block should look "thin" without any label.
1716 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus): Computes the
1717 status for this test group.
1719 (AnalysisResultsViewer.TestGroupStackingGrid): Added. AnalysisResultsViewer uses this class to
1720 layout blocks representing test groups.
1721 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.insertBlockToColumn): Inserts a new block
1722 to layout. We keep all test groups doing the same A/B test next to each other.
1723 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.layout): Layouts each block / test group
1724 in the order they are created.
1725 (AnalysisResultsViewer.TestGroupStackingGrid.prototype._layoutBlock): Places the block in the
1726 left-most column that can accommodate it while avoiding columns of a different thin-ness. A column
1727 is thin if its A/B testing has failed, and not thin otherwise.
1728 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.createCellsForRow): Creates table cells for
1729 a given row. For each column, generate a table cell if we're in the first row and the first block
1730 starts in a later row, a block starts in the current row, or the last block ended in the previous
1731 row and the next block or the last row appears later.
1733 * public/v3/components/bar-graph-group.js: Added. A component for showing a group of bar graphs.
1734 (BarGraphGroup): Added. Creates a group of bar graphs with the same value range. It's used by
1735 AnalysisResultsViewer and ResultsTable to show bar graphs to compare values.
1736 (SingleBarGraph): A component created and collectively controlled by BarGraphGroup.
1738 * public/v3/components/results-table.js: Added.
1739 (ResultsTable): An abstract superclass for TestGroupResultsTable and AnalysisResultsViewer.
1741 (ResultsTable.prototype.render): Renders the table. 1. Call "buildRowGroups()" implemented by
1742 a subclass to obtain the list of rows. 2. Compute the list of repositories to show. 3. For each
1743 cell in the table, compute the number of rows to show the same value (for rowspan). 4. Render the
1744 table with an extra list of repositories if exists.
1746 (ResultsTable.prototype._computeRepositoryList): Compute the list of repositories to list
1747 revisions in the table. Omit repositories not present in any row or for which all rows have the
1748 same revision. In the latter case, include it in the extra repositories listed below the table.
1749 This minimizes the amount of redundant information presented to the user.
1751 (ResultsTableRow): Added. Represents a single row in the table. ResultsTable constructs necessary
1752 table cells to tabulate the associated root sets, and shows the associated result using a grouped
1753 bar graph. Additional columns are used by AnalysisResultsViewer to show stacked blocks for A/B
1756 * public/v3/components/test-group-results-table.js: Added.
1757 (TestGroupResultsTable):
1758 (TestGroupResultsTable.prototype.didUpdateResults):
1759 (TestGroupResultsTable.prototype.setTestGroup):
1760 (TestGroupResultsTable.prototype.heading):
1761 (TestGroupResultsTable.prototype.render):
1762 (TestGroupResultsTable.prototype.buildRowGroups):
1764 * public/v3/index.html:
1765 * public/v3/models/analysis-results.js: Added.
1766 (AnalysisResults): Added. Like MeasurementSet, this class represents a set of measured values
1767 associated with a given analysis task.
1768 (AnalysisResults.prototype.find): Returns a measured valued for a given build and metric.
1769 (AnalysisResults.prototype.add): Adds a new measured value. Used by AnalysisResults.fetch.
1770 (AnalysisResults.fetch): Fetches data and creates AnalysisResults for a given analysis task.
1772 * public/v3/models/analysis-task.js:
1773 (AnalysisTask.prototype.startMeasurementId): Added.
1774 (AnalysisTask.prototype.endMeasurementId): Added.
1775 (AnalysisTask.fetchByBuildRequestId): Added.
1776 (AnalysisTask._fetchSubset): Uses DataModelObject.cachedFetch.
1778 * public/v3/models/build-request.js: Added.
1779 (BuildRequest): Added. Represents a single A/B testing request associated with a test group.
1781 * public/v3/models/builder.js:
1782 (Build): Added. Represents a build associated with a given A/B testing result.
1784 * public/v3/models/commit-log.js:
1785 (CommitLog): Made this class inherit from DataModelObject.
1786 (CommitLog.ensureSingleton): Added. Finds the singleton object created for a given revision
1787 in the specified repository. This helps RootSet and other classes compare commits fast.
1788 (CommitLog.prototype.repository): Added.
1789 (CommitLog.fetchBetweenRevisions): Uses CommitLog.ensureSingleton.
1791 * public/v3/models/data-model.js:
1793 (DataModelObject.namedStaticMap): Added.
1794 (DataModelObject.ensureNamedStaticMap): Renamed from namedStaticMap instead of implicitly
1795 assuming that the non-static version always creates the map.
1796 (DataModelObject.prototype.namedStaticMap): Added.
1797 (DataModelObject.cachedFetch): Extracted from AnalysisTask._fetchSubset so that TestGroup's
1798 fetchByTask could also use it.
1801 * public/v3/models/measurement-adaptor.js: Added.
1802 (MeasurementAdaptor): Extracted from MeasurementCluster. This class is responsible for
1803 re-formatting the data received via /api/measurement-set JSON API inside the v3 UI.
1804 (MeasurementAdaptor.prototype.extractId): Added.
1805 (MeasurementAdaptor.prototype.adoptToAnalysisResults): Added. Used by AnalysisResults.
1806 (MeasurementAdaptor.aggregateAnalysisResults): Added. Used by TestGroupResultsTable to
1807 aggregate results for each test configuration; e.g. computing the average for set A.
1808 (MeasurementAdaptor.prototype.adoptToSeries): Extracted from MeasurementCluster.addToSeries.
1809 Added rootSet() to each point. This allows AnalysisResultsViewer to compare them against root
1810 sets associated with A/B testing results.
1811 (MeasurementAdaptor.computeConfidenceInterval): Moved from MeasurementCluster.
1813 * public/v3/models/measurement-cluster.js:
1814 (MeasurementCluster):
1815 (MeasurementCluster.prototype.addToSeries):
1817 * public/v3/models/repository.js:
1818 (Repository.prototype.hasUrlForRevision): Added.
1820 * public/v3/models/root-set.js: Added.
1821 (RootSet): Added. Represents a set of commits in measured results.
1822 (MeasurementRootSet): Added. Ditto for results associated with A/B testing.
1824 * public/v3/models/test-group.js: Added.
1825 (TestGroup): Added. Represents a A/B testing on analysis task.
1826 (TestGroup.prototype.createdAt): Added.
1827 (TestGroup.prototype.buildRequests): Returns the list of build requests associated with this
1829 (TestGroup.prototype.addBuildRequest): Added. Used by BuildRequest's constructor to associate
1830 itself with this group.
1831 (TestGroup.prototype.didSetResult): Added. Called by BuildRequest.setResult when measured
1832 values are fetched and associated with a build request in this group.
1834 * public/v3/models/test.js:
1837 * public/v3/pages/analysis-task-page.js:
1839 (AnalysisTaskPage.prototype.updateFromSerializedState): Fetch the analysis task, test groups
1840 associated with it, and all A/B testing results based on the task id or the build request id
1841 specified in the URL.
1842 (AnalysisTaskPage.prototype._didFetchTask): Added. Start fetching the measured data. This is
1843 the data on charts page for which this analysis task was created, not results of A/B testing.
1844 (AnalysisTaskPage.prototype._didFetchMeasurement): Added. Display the fetched data in a table
1845 inside AnalysisResultsViewer.
1846 (AnalysisTaskPage.prototype._didFetchTestGroups): Added. Display the list of A/B test groups
1847 as well as the results of the first A/B testing.
1848 (AnalysisTaskPage.prototype._didFetchAnalysisResults): Added.
1849 (AnalysisTaskPage.prototype._assignTestResultsIfPossible): Added. Once both the analysis task,
1850 A/B test groups as well as their results are fetched, update build requests in each test group
1852 (AnalysisTaskPage.prototype.render): Show the list of test groups and highlight the currently
1854 (AnalysisTaskPage.prototype._showTestGroup): Added. A callback used by AnalysisResultsViewer
1855 and TestGroupResultsTable to notify this class when the user selects a new test group.
1856 (AnalysisTaskPage.htmlTemplate): Updated the template.
1857 (AnalysisTaskPage.cssTemplate): Ditto.
1859 * public/v3/pages/charts-page.js:
1860 (ChartsPage.createStateForAnalysisTask): Added. Creates a URL state object for opening a chart
1861 associated with an analysis task.
1863 2015-12-22 Ryosuke Niwa <rniwa@webkit.org>
1865 Analysis task page is slow to load
1866 https://bugs.webkit.org/show_bug.cgi?id=152517
1868 Reviewed by Andreas Kling.
1870 The slowness comes from r194130 which made the JSON API at /api/analysis-tasks to report the start
1871 and the end of each analysis task. This query was adding ~2s to the total JSON generation time.
1873 Cache these values on analysis_task table since they never change once an analysis task is created.
1875 * init-database.sql: Added columns task_start_run_time and task_end_run_time to analysis_task table.
1876 Also added the missing drop statements at the top.
1878 * public/api/analysis-tasks.php:
1879 (fetch_and_push_bugs_to_tasks): Don't fetch the latest commit time of the start and the end.
1880 (format_task): Report task_start_run_time and task_end_run_time as startRunTime and endRunTime.
1882 * public/privileged-api/create-analysis-task.php:
1883 (main): Set start_run_time and end_run_time when creating an analysis task.
1884 (time_for_run): Added.
1886 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1888 v3 UI shouldn't open/close pane selector by mouseenter/leave
1889 https://bugs.webkit.org/show_bug.cgi?id=152399
1891 Reviewed by Andreas Kling.
1893 Removed the code to open and close the pane selector by mouseenter and mouseleave
1894 since multiple people have complained about the behavior.
1896 * public/v3/pages/charts-toolbar.js:
1897 (ChartsToolbar): Removed the event listeners.
1898 (ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
1899 to better support the use case of adding multiple panes.
1900 (ChartsToolbar.cssTemplate): Tweaked CSS.
1902 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1904 Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
1905 https://bugs.webkit.org/show_bug.cgi?id=152389
1907 Reviewed by Darin Adler.
1909 Compute the x coordinate of the popover from the center of each annotation bar.
1911 Also adjust the x coordinate to keep the popover within the charts.
1913 * public/v3/components/interactive-time-series-chart.js:
1914 (InteractiveTimeSeriesChart.prototype._renderChartContent):
1916 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1918 Dashboard charts should have uniform widths on v3 UI
1919 https://bugs.webkit.org/show_bug.cgi?id=152395
1921 Reviewed by Chris Dumez.
1923 Fix the bug by applying table-layout: fixed on the dashboard table.
1925 * public/v3/pages/dashboard-page.js:
1926 (DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
1927 (DashboardPage.cssTemplate): Adjusted CSS accordingly.
1929 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1931 Closing a pane on v3 UI always closes the last pane
1932 https://bugs.webkit.org/show_bug.cgi?id=152388
1934 Reviewed by Chris Dumez.
1936 The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
1937 Fixed it by passing in "this" pane object to the first argument.
1939 * public/v3/pages/chart-pane.js:
1942 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1944 Perf Dashboard v3 UI doesn't show recent data points on v2 UI
1945 https://bugs.webkit.org/show_bug.cgi?id=152368
1947 Reviewed by Chris Dumez.
1949 The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
1950 which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
1951 to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
1953 !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
1955 Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
1957 * public/api/measurement-set.php:
1958 (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
1959 * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
1960 of the last modified date depends on when tests run, we can't assert it to be a certain value.
1962 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1964 v3 UI should show and link the build number on charts page
1965 https://bugs.webkit.org/show_bug.cgi?id=152359
1967 Reviewed by Chris Dumez.
1969 Show the hyperlinked build number in the v3 UI.
1971 * public/v3/models/builder.js:
1972 (Builder): Renamed _buildURL to _buildUrlTemplate.
1973 (Builder.prototype.urlForBuild): Added.
1974 * public/v3/pages/chart-pane-status-view.js:
1975 (ChartPaneStatusView):
1976 (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
1977 (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
1978 if the current point is set by an indicator (not by a selection).
1980 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1982 v3 dashboard doesn't stretch charts to fill the screen
1983 https://bugs.webkit.org/show_bug.cgi?id=152354
1985 Reviewed by Chris Dumez.
1987 The bug was caused by a workaround to avoid canvas stretching table cell too much.
1989 Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
1990 so that it does not contribute to the intrinsic/natural width of the cell.
1992 * public/v3/components/time-series-chart.js:
1993 (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
1994 (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
1995 the canvas does not resize with it.
1996 * public/v3/pages/dashboard-page.js:
1997 (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
1999 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
2001 The chart status on v3 UI sometimes show wrong revision ranges
2002 https://bugs.webkit.org/show_bug.cgi?id=152331
2004 Reviewed by Chris Dumez.
2006 The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
2007 when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
2008 finds the sampled data point immediately preceding the current point (at which the indicator is shown).
2010 * public/v3/components/chart-status-view.js:
2011 (ChartStatusView.prototype.updateStatusIfNeeded):
2013 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2015 Perf dashboard's cycler page should use v3 UI
2016 https://bugs.webkit.org/show_bug.cgi?id=152324
2018 Reviewed by Chris Dumez.
2020 Use the v3 UI in cycler.html after r194130.
2022 * public/cycler.html:
2023 * public/v3/index.html: Removed the reference to a non-existent platform-selector.js.
2025 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2027 Add v3 UI to perf dashboard
2028 https://bugs.webkit.org/show_bug.cgi?id=152311
2030 Reviewed by Chris Dumez.
2032 Add the third iteration of the perf dashboard UI. UI for viewing and modifying analysis tasks is coming soon.
2033 The v3 UI is focused on speed, and removes all third-party script dependencies including jQuery, d3, and Ember.
2034 Both the DOM-based UI and graphing are implemented manually.
2037 The entire app is structured using new component library implemented in components/base.js. Each component is
2038 an instance of a subclass of ComponentBase which owns a single DOM element. Each subclass may supply static
2039 methods named htmlTemplate and cssTemplate as the template for a component instance. ComponentBase automatically
2040 clones the templates inside the associated element (or its shadow root on the supported browsers). Each subclass
2041 must supply a method called "render()" which constructs and updates the DOM as needed.
2043 There is a special component called Page, which represents an entire page. Each Page is opened by PageRouter's
2044 "route()" function. Each subclass of Page supplies "open()" for initialization and "updateFromSerializedState()"
2045 for a hash URL transition.
2048 The key feature of the v3 UI is the split of time series into chunks called clusters (see r194120). On an internal
2049 instance of the dashboard, the v2 UI downloads 27MB of data whereas the same page loads only 3MB of data in the v3.
2050 The key logic for fetching time series in chunks is implemented by MeasurementSet in /v3/models/measurement-set.js.
2051 We first fetch the cached primary cluster (the cluster that contains the newest data) at:
2052 /data/measurement-set-<platform-id>-<metric-id>.json
2054 If that's outdated according to lastModified in manifest.json, then we immediately re-fetch the primary cluster at:
2055 /api/measurement-set/?platform=<platform-id>&metric=<metric-id>
2057 Once the up-to-date primary cluster is fetched, we fetch all "secondary" clusters. For each cluster being fetched,
2058 including the primary, we invoke registered callbacks.
2061 In addition, the v3 UI reduces the initial page load time by loading a single bundled JS file generated by
2062 tools/bundle-v3-scripts.py. index.html has a fallback to load all 44 JS files individually during development.
2064 * public/api/analysis-tasks.php:
2065 (fetch_and_push_bugs_to_tasks): Added the code to fetch start and end run times. This is necessary in V3 UI
2066 because no longer fetch the entire time series. See r194120 for the new measurement set JSON API.
2067 (format_task): Compute the category of an analysis task based on "result" value. This will be re-vamped once
2068 I add the UI for the analysis task page in v3.
2070 * public/include/json-header.php:
2071 (require_format): CamelCase the name.
2072 (require_match_one_of_values): Ditto.
2073 (validate_arguments): Renamed from require_existence_of and used in measurement-set.php landed in r194120.
2076 * public/v3/components: Added.
2078 * public/v3/components/base.js: Added.
2079 (ComponentBase): The base component class.
2080 (ComponentBase.prototype.element): Returns the DOM element associated with the DOM element.
2081 (ComponentBase.prototype.content): Returns the shadow root if one exists and the associated element otherwise.
2082 (ComponentBase.prototype.render): To be implemented by a subclass.
2083 (ComponentBase.prototype.renderReplace): A helper function to "render" DOM contents.
2084 (ComponentBase.prototype._constructShadowTree): Called inside the constructor to instantiate the templates.
2085 (ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Instantiates components referred by
2086 its element name inside the instantiated content.
2087 (ComponentBase.isElementInViewport): A helper function. Returns true if the element is in the viewport and it has
2088 non-zero width and height.
2089 (ComponentBase.defineElement): Defines a custom element that can be automatically instantiated from htmlTemplate.
2090 (ComponentBase.createElement): A helper function to create DOM tree to be used in "render()" method.
2091 (ComponentBase._addContentToElement): A helper for "createElement".
2092 (ComponentBase.createLink): A helper function to create a hyperlink or another clickable element (via callback).
2093 (ComponentBase.createActionHandler): A helper function to create an event listener that prevents the default action
2094 and stops the event propagation.
2096 * public/v3/components/button-base.js: Added.
2098 * public/v3/components/chart-status-view.js: Added.
2099 (ChartStatusView): A component that reports the current status of time-series-chart. It's subclasses by
2100 ChartPaneStatusView to provide additional information in the charts page's panes.
2102 * public/v3/components/close-button.js: Added.
2104 * public/v3/components/commit-log-viewer.js: Added.
2105 (CommitLogViewer): A component that lists commit revisions along with commit messages for a range of data points.
2107 * public/v3/components/interactive-time-series-chart.js: Added.
2108 (InteractiveTimeSeriesChart): A subclass of InteractiveTimeSeriesChart with interactivity (selection & indicator).
2109 Selection and indicator are mutually exclusive.
2111 * public/v3/components/pane-selector.js: Added.
2112 (PaneSelector): A component for selecting (platform, metric) pair to add in the charts page.
2114 * public/v3/components/spinner-icon.js: Added.
2116 * public/v3/components/time-series-chart.js: Added.
2117 (TimeSeriesChart): A canvas-based chart component without interactivity. It takes a source list and options as
2118 the constructor arguments. A source list is a list of measurement sets (measurement-set.js) with drawing options.
2119 This component fetches data via MeasurementSet.fetchBetween inside TimeSeriesChart.prototype.setDomain and
2120 progressively updates the charts as more data arrives. The canvas is updated on animation frame via rAF and all
2121 layout and rendering metrics are lazily computed in _layout. In addition, this component samples data before
2122 rendering the chart when there are more data points per pixel in _ensureSampledTimeSeries.
2124 * public/v3/index.html: Added. Loads bundled-scripts.js if it exists, or individual script files otherwise.
2126 * public/v3/instrumentation.js: Added. This class is used to gather runtime statistics of v3 UI. (It measures
2127 the performance of the perf dashboard UI).
2129 * public/v3/main.js: Added. Bootstraps the app.
2133 * public/v3/models: Added.
2134 * public/v3/models/analysis-task.js: Added.
2135 * public/v3/models/bug-tracker.js: Added.
2136 * public/v3/models/bug.js: Added.
2137 * public/v3/models/builder.js: Added.
2138 * public/v3/models/commit-log.js: Added.
2139 * public/v3/models/data-model.js: Added.
2140 (DataModelObject): The base class for various data objects that correspond to database tables. It supplies static
2141 hash map to find entries by id as well as other keys.
2142 (LabeledObject): A subclass of DataModelObject with the capability to find an object via its name.
2144 * public/v3/models/measurement-cluster.js: Added.
2145 (MeasurementCluster): Represents a single cluster or a chunk of data in a measurement set.
2147 * public/v3/models/measurement-set.js: Added.
2148 (MeasurementSet): Represents a measurement set.
2149 (MeasurementSet.findSet): Returns the singleton set given (metric, platform). We use singleton to avoid issuing
2150 multiple HTTP requests for the same JSON when there are multiple TimeSeriesChart that show the same graph (e.g. on
2151 charts page with overview and main charts).
2152 (MeasurementSet.prototype.findClusters): Finds the list of clusters to fetch in a given time range.
2153 (MeasurementSet.prototype.fetchBetween): Fetch clusters for a given time range and calls callback whenever new data
2154 arrives. The number of callbacks depends on the how many clusters need to be newly fetched.
2155 (MeasurementSet.prototype._fetchSecondaryClusters): Fetches non-primary (non-latest) clusters.
2156 (MeasurementSet.prototype._fetch): Issues a HTTP request to fetch a cluster.
2157 (MeasurementSet.prototype._didFetchJSON): Called when a cluster is fetched.
2158 (MeasurementSet.prototype._failedToFetchJSON): Called when the fetching of a cluster has failed.
2159 (MeasurementSet.prototype._invokeCallbacks): Invokes callbacks upon an approval of a new cluster.
2160 (MeasurementSet.prototype._addFetchedCluster): Adds the newly fetched cluster in the order.
2161 (MeasurementSet.prototype.fetchedTimeSeries): Returns a time series that contains data from all clusters that have
2163 (TimeSeries.prototype.findById): Additions to TimeSeries defined in /v2/data.js.
2164 (TimeSeries.prototype.dataBetweenPoints): Ditto.
2165 (TimeSeries.prototype.firstPoint): Ditto.
2167 * public/v3/models/metric.js: Added.
2168 * public/v3/models/platform.js: Added.
2169 * public/v3/models/repository.js: Added.
2170 * public/v3/models/test.js: Added.
2172 * public/v3/pages: Added.
2173 * public/v3/pages/analysis-category-page.js: Added. The "Analysis" page that lists the analysis tasks.
2174 * public/v3/pages/analysis-category-toolbar.js: Added. The toolbar to filter analysis tasks based on its category
2175 (unconfirmed, bisecting, identified, closed) and a keyword.
2177 * public/v3/pages/analysis-task-page.js: Added. Not implemented yet. It just has the hyperlink to the v2 UI.
2179 * public/v3/pages/chart-pane-status-view.js: Added.
2180 (ChartPaneStatusView): A subclass of ChartStatusView used in the charts page. In addition to the current value,
2181 comparison to baseline/target, it shows the list of repository revisions (e.g. WebKit revision, OS version).
2183 * public/v3/pages/chart-pane.js: Added.
2184 (ChartPane): A component a pane in the charts page. Each pane has the overview chart and the main chart. The zooming
2185 is synced across all panes in the charts page.
2187 * public/v3/pages/charts-page.js: Added. Charts page.
2188 * public/v3/pages/charts-toolbar.js: Added. The toolbar to set the number of days to show. This affects the overview
2189 chart's domain in each pane.
2191 * public/v3/pages/create-analysis-task-page.js: Added.
2192 (CreateAnalysisTaskPage): A page that gets shown momentarily while creating a new analysis task.
2194 * public/v3/pages/dashboard-page.js: Added. A dashboard page.
2195 * public/v3/pages/dashboard-toolbar.js: Added. Its toolbar with buttons to select the number of days to show.
2196 * public/v3/pages/domain-control-toolbar.js: Added. An abstract superclass of charts and dashboard toolbars.
2198 * public/v3/pages/heading.js: Added. A component for displaying the header and toolbar, if exists, on each page.
2199 * public/v3/pages/page-router.js: Added. This class is responsible for updating the URL hashes as well as opening
2200 and updating each page when the hash changes (via back/forward navigation).
2201 * public/v3/pages/page-with-charts.js: Added. An abstract subclass of page used by dashboards and charts page.
2202 Supplies helper functions for creating TimeSeriesChart options.
2203 * public/v3/pages/page-with-heading.js: Added. An abstract subclass of page that uses the heading component.
2204 * public/v3/pages/page.js: Added. The Page component.
2205 * public/v3/pages/toolbar.js: Added. An abstract toolbar component.
2207 * public/v3/remote.js: Added.
2208 (getJSON): Fetches JSON from the remote server.
2209 (getJSONWithStatus): Ditto. Rejects the response if the status is not "OK".
2210 (PrivilegedAPI.sendRequest): Posts a HTTP request to a privileged API in /privileged-api/.
2211 (PrivilegedAPI.requestCSRFToken): Creates a new CSRF token to request a privileged API post.
2213 * tools/bundle-v3-scripts.py: Added.
2214 (main): Bundles js files together and minifies them by jsmin.py for the v3 UI. Without this script, we're forced to
2215 download 44 JS files or making each JS file contain multiple classes.
2217 * tools/jsmin.py: Copied from WebInspector / JavaScriptCore code.
2219 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2221 Fix v2 UI after r194093.
2223 * public/v2/data.js:
2225 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
2227 Add /api/measurement-set for v3 UI
2228 https://bugs.webkit.org/show_bug.cgi?id=152312
2230 Rubber-stamped by Chris Dumez.
2232 The new API JSON allows the front end to fetch measured data in chunks called a "cluster" as specified
2233 in config.json for each measurement set specified by the pair of a platform and a metric.
2235 When the front end needs measured data in a given time range (t_0, t_1) for a measurement set, it first
2236 fetches the primary cluster by /api/measurement-set/?platform=<platform-id>&metric=<metric-id>.
2237 The primary cluster is the last cluster in the set (returning the first cluster here is not useful
2238 since we don't typically show very old data), and provides the information needed to fetch other clusters.
2240 Fetching the primary cluster also creates JSON files at:
2241 /data/measurement-set-<platform-id>-<metric-id>-<cluster-end-time>.json
2242 to allow latency free access for secondary clusters. The front end code can also fetch the cache of
2243 the primary cluster at: /data/measurement-set-<platform-id>-<metric-id>.json.
2245 Because the front end code has to behave as if all data is fetched, each cluster contains one data point
2246 immediately before the first data point and one immediately after the last data point. This avoids having
2247 to fetch multiple empty clusters for manually specified baseline data. To support this behavior, we generate
2248 all clusters for a given measurement set at once when the primary cluster is requested.
2250 Furthermore, all measurement sets are divided at the same time into clusters so that the boundary of clusters
2251 won't shift as more data are reported to the server.
2253 * config.json: Added clusterStart and clusterSize as options.
2254 * public/api/measurement-set.php: Added.
2256 (MeasurementSetFetcher::__construct):
2257 (MeasurementSetFetcher::fetch_config_list): Finds configurations that belongs to this (platform, metric) pair.
2258 (MeasurementSetFetcher::at_end): Returns true if we've reached the end of all clusters for this set.
2259 (MeasurementSetFetcher::fetch_next_cluster): Generates the JSON data for the next cluster. We generate clusters
2260 in increasing chronological order (the oldest first and the newest last).
2261 (MeasurementSetFetcher::execute_query): Executes the main query.
2262 (MeasurementSetFetcher::format_map): Returns the mapping of a measurement field to an array index. This removes
2263 the need to have key names for each measurement and reduces the JSON size by ~10%.
2264 (MeasurementSetFetcher::format_run): Creates an array that contains data for a single measurement. The order
2265 matches that of keys in format_map.
2266 (MeasurementSetFetcher::parse_revisions_array): Added. Copied from runs.php.
2267 * tests/api-measurement-set.js: Added. Added tests for /api/measurement-set.
2269 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2271 Using fake timestamp in OS version make some results invisible
2272 https://bugs.webkit.org/show_bug.cgi?id=152289
2274 Reviewed by Stephanie Lewis.
2276 Fix various bugs after r194088.
2278 * public/api/commits.php:
2279 (format_commit): Include the commit order.
2280 * public/v2/data.js:
2281 (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
2282 * tools/pull-os-versions.py:
2283 (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
2284 (available_builds_from_command): Exit early when an exception is thrown.
2286 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2288 Fix a typo in the previous commit.
2290 * public/include/report-processor.php:
2292 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2294 Build fix after r192965. Suppress a warning about log being referred to as a closure variable.
2296 * public/include/report-processor.php:
2298 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2300 Using fake timestamp in OS version make some results invisible
2301 https://bugs.webkit.org/show_bug.cgi?id=152289
2303 Reviewed by Stephanie Lewis.
2305 Added commit_order column to explicitly order OS versions. This fixes the bug whereby which
2306 baseline results reported with only OS versions are shown with x coordinate set to 10 years ago.
2308 To migrate the existing database, run:
2309 ALTER TABLE commits ADD COLUMN commit_order integer;
2310 CREATE INDEX commit_order_index ON commits(commit_order);
2312 Then for each repository $1,
2313 UPDATE commits SET (commit_time, commit_order) = (NULL, CAST(EXTRACT(epoch from commit_time) as integer))
2314 WHERE commit_repository = $1;
2317 * init-database.sql: Added the column.
2318 * public/api/commits.php:
2319 (fetch_commits_between): Use commit_order to order commits when commit_time is missing.
2320 * public/api/report-commits.php:
2321 (main): Set commit_order.
2322 * tools/pull-os-versions.py:
2323 (OSBuildFetcher.fetch_and_report_new_builds):
2324 (OSBuildFetcher._assign_order): Renamed from _assign_fake_timestamps. Set the order instead of a fake timestmap.
2326 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
2328 Perf dashboard can't merge when the destination platform is missing baseline/target
2329 https://bugs.webkit.org/show_bug.cgi?id=152286
2331 Reviewed by Stephanie Lewis.
2333 The bug was caused by the query to migrate test configurations to new platform checking
2334 configuration type and metric separately; that is, it assumes the configuration exists
2335 only if either the same type or the same metric exists in the destination.
2337 Fixed the bug by checking both conditions simultaneously for each configuration.
2339 * public/admin/platforms.php:
2340 * tests/admin-platforms.js: Added a test.
2342 2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
2344 Perf dashboard's buildbot sync config JSON duplicates too much information
2345 https://bugs.webkit.org/show_bug.cgi?id=152196
2347 Reviewed by Stephanie Lewis.
2349 Added shared, per-builder, and per-test (called type) configurations.
2351 * tools/sync-with-buildbot.py:
2353 (load_config.merge):
2355 2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
2357 Perf dashboard should avoid overflow during geometric mean computation
2358 https://bugs.webkit.org/show_bug.cgi?id=151773
2360 Reviewed by Chris Dumez.
2362 * public/include/report-processor.php:
2364 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
2366 Perf dashboard should extend baseline and target to the future
2367 https://bugs.webkit.org/show_bug.cgi?id=151511
2369 Reviewed by Darin Adler.
2371 * public/v2/data.js:
2372 (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
2373 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
2374 (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
2375 (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
2376 * public/v2/manifest.js:
2377 (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
2379 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
2381 Perf dashboard should always show comparison to baseline and target even if one is missing
2382 https://bugs.webkit.org/show_bug.cgi?id=151510
2384 Reviewed by Darin Adler.
2386 Show the comparison status against the baseline when baseline is present but target is missing.
2388 To make the code more readable, this patch splits the logic into three cases:
2389 1. Both baseline and target are present
2390 2. Only baseline is present
2391 3. Only target is present
2393 Also extracted a helper function to construct the label.
2396 (.labelForDiff): Added.
2397 (App.Pane.computeStatus):
2399 2015-11-23 Commit Queue <commit-queue@webkit.org>
2401 Unreviewed, rolling out r192716 and r192717.
2402 https://bugs.webkit.org/show_bug.cgi?id=151582
2404 The patch was incorrect. We always need at least one data
2405 point in each configuration (Requested by rniwa on #webkit).
2407 Reverted changesets:
2409 "Perf dashboard's should not include results more than 366
2411 https://bugs.webkit.org/show_bug.cgi?id=151529
2412 http://trac.webkit.org/changeset/192716
2414 "Build fix for old version of PHP."
2415 http://trac.webkit.org/changeset/192717
2417 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2419 Build fix for old version of PHP.
2421 * public/api/runs.php:
2423 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2425 Perf dashboard's should not include results more than 366 days old in JSON
2426 https://bugs.webkit.org/show_bug.cgi?id=151529
2428 Reviewed by Timothy Hatcher.
2430 Don't return results more than 366 days old in /api/runs/ JSON API.
2431 This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.
2433 * public/api/runs.php:
2434 (main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
2435 Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
2436 of doing so will be included in elapsedTime.
2437 (RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
2438 (RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
2439 (RunsGenerator::parse_revisions_array): Compute the max of commit times.
2441 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2443 Remove chartPointRadius from interactive chart component
2444 https://bugs.webkit.org/show_bug.cgi?id=151480
2446 Reviewed by Darin Adler.
2448 Replaced the parameter by CSS rules.
2450 * public/v2/chart-pane.css:
2452 (.chart .dot.foreground):
2453 (.chart .highlight):
2455 * public/v2/index.html:
2456 * public/v2/interactive-chart.js:
2457 (App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
2458 (App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):
2460 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2462 Perf dashboard's runs API uses more than 128MB of memory
2463 https://bugs.webkit.org/show_bug.cgi?id=151478
2465 Reviewed by Andreas Kling.
2467 Don't fetch all query results at once to avoid using twice as much memory as needed.
2468 Use iterative API to format each result at a time.
2470 This change is also a 5% runtime performance gain.
2472 * public/api/runs.php:
2473 (RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
2474 no longer needed as we pass in each configuration type explicitly to fetch_runs.
2475 (RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
2476 Also moved the logic to compute the last modified time here.
2477 (RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
2478 (RunsGeneratorForTestGroup):
2479 (RunsGeneratorForTestGroup::__construct):
2480 (RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.
2482 * public/include/db.php:
2483 (generate_data_file): Lock the file to avoid corruption.
2485 2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
2487 Perf dashboard always fetches charts JSON twice
2488 https://bugs.webkit.org/show_bug.cgi?id=151483
2490 Reviewed by Andreas Kling.
2492 Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
2493 obsolete (shouldRefetch is set true) or corrupt (the second closure).
2498 2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
2500 Internal perf dashboard takes forever to load
2501 https://bugs.webkit.org/show_bug.cgi?id=151430
2503 Rubber-stamped by Antti Koivisto.
2505 Fix a few performance problems with the perf dashboard v2 UI.
2508 (App.DashboardRow._createPane): Set "inDashboard" to true.
2509 (App.Pane._fetch): Immediately show the cached chart instead of waiting for the refetched data which invokes
2510 a PHP JSON API. Also don't fetch the analysis tasks when the chart is shown in the dashboard since we don't
2511 show annotate charts in the dashboard.
2513 2015-10-15 Ryosuke Niwa <rniwa@webkit.org>
2515 Unreviewed fix of a test after r190687.
2517 * tests/admin-regenerate-manifest.js:
2519 2015-10-12 Ryosuke Niwa <rniwa@webkit.org>
2521 Perf dashboard tools shouldn't require server credentials in multiple configuration files
2522 https://bugs.webkit.org/show_bug.cgi?id=149994
2524 Reviewed by Chris Dumez.
2526 Made detect-changes.js and pull-svn.py pull username and passwords from the server config JSON to reduce
2527 the number of JSON files that need to include credentials.
2529 Also made each script reload the server config after sleep to allow dynamic credential updates.
2531 In addition, change the server config JSON's format to include scheme, host, and port numbers separately
2532 instead of a url since detect-changes.js needs each value separately.
2534 This reduces the number of JSONs with credentials to two for our internal dashboard.
2536 * tools/detect-changes.js:
2537 (main): Added a property argument parsing. Now takes --server-config-json, --change-detection-config-json,
2538 and --seconds-to-sleep like other scripts.
2539 (parseArgument): Added.
2540 (fetchManifestAndAnalyzeData): Reload the server config JSON.
2541 (loadServerConfig): Added. Set settings.perfserver and settings.slave from the server config JSON. Also
2542 add settings.perfserver.host to match the old format.
2543 (configurationsForTesting): Fixed a bug that we throw an exception when a dashboard contains an empty cell.
2545 * tools/pull-os-versions.py:
2546 (main): Use load_server_config after each sleep.
2548 * tools/pull-svn.py:
2549 (main): Use load_server_config after each sleep.
2550 (fetch_commits_and_submit): Use the perf dashboard's auth as subversion credential when useServerAuth is set.
2552 * tools/sync-with-buildbot.py:
2553 (main): Use load_server_config after each sleep.
2556 (load_server_config): Extracted from python scripts. Computes server's url from scheme, host, and port number
2557 to match the old format python scripts except.
2559 2015-10-11 Ryosuke Niwa <rniwa@webkit.org>
2561 Build fix after r190817. Now that pull-os-versions store fake timestamps, we need to bypass timestamp
2562 checks for OS versions when bots try to report new results. Otherwise, we fail to process the reports
2563 with a MismatchingCommitTime error.
2565 * public/include/report-processor.php:
2566 (ReportProcessor::resolve_build_id):
2568 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2570 Perf dashboard erroneously shows an old OS build in A/B testing range
2571 https://bugs.webkit.org/show_bug.cgi?id=149942
2573 Reviewed by Darin Adler.
2575 Ordering OS builds lexicologically turned out be a bad idea since 15A25 falls between 15A242 and 15A251.
2576 Use a fake/synthetic timestamp to force the commonly understood total order instead.
2578 Refactored pull-os-versions.py to share the server config JSON with other scripts. Also made the script
2579 support pulling multiple sources; e.g. both OS X and iOS.
2581 Also removed superfluous feature to submit results in chunks. The perf dashboard can handle thousands of
2582 revisions being submitted at once just fine.
2584 * public/api/commits.php:
2585 (main): A partial revert of r185574 since we no longer need to order builds lexicologically.
2587 * tools/pull-os-versions.py:
2588 (main): Takes --os-config-json, --server-config-json, and --seconds-to-sleep as arguments instead of
2589 a single --config argument to share the server config JSON with other scripts.
2590 (OSBuildFetcher): Extracted out of main. This class is instantiated for each OS kind (e.g. OS X).
2591 (OSBuildFetcher.__init__): Added.
2592 (OSBuildFetcher._fetch_available_builds): Extracted out of main. Fetches available builds from a website
2594 (OSBuildFetcher.fetch_and_report_new_builds): Extracted out of main. Submits the fetched builds after
2595 filtering out the ones we've already reported.
2596 (OSBuildFetcher._assign_fake_timestamps): Creates a fake timestamp to establish a total order amongst each
2597 OS X / iOS style build number such as 12A3456b.
2599 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2601 pull-svn.py fails to sync revisions when SVN credentials is not setup
2602 https://bugs.webkit.org/show_bug.cgi?id=149941
2604 Reviewed by Chris Dumez.
2606 Added the support for specifying subversion credentials.
2608 Also added the support for pulling from multiple subversion servers. Subversion servers are specified
2609 in a JSON configuration file specified by --svn-config formatted as follows:
2614 "url": "http://svn.webkit.org/repository/webkit",
2615 "username": "webkitten",
2616 "password": "webkitten's password",
2617 "trustCertificate": true,
2618 "accountNameFinderScript":
2619 ["python", "/Volumes/Data/WebKit/Tools/Scripts/webkit-patch", "find-users"]
2624 In addition, refactored it to use the shared server config JSON for the dashboard access.
2626 * tools/pull-svn.py:
2627 (main): Now takes --svn-config-json, --server-config-json, --seconds-to-sleep and --max-fetch-count
2628 as required options instead of seven unnamed arguments.
2629 (fetch_commits_and_submit): Extracted from main. Fetches at most max_fetch_count new revisions from
2630 the subversion server, and submits them in accordance with server_config.
2631 (fetch_commit_and_resolve_author): Now takes a single repository dictionary instead of two separate
2632 arguments for name and URL to pass down the repository's authentication info to fetch_commit.
2633 (fetch_commit): Ditto. Add appropriate arguments when username and passwords are specified.
2634 (resolve_author_name_from_account): Use a list argument instead of a single string argument now that
2635 the argument comes from a JSON instead of sys.argv.
2637 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2639 Unreviewed race condition fix. Exit early when xScale or yScale is not defined.
2641 * public/v2/interactive-chart.js:
2642 (App.InteractiveChartComponent._updateRangeBarRects):
2644 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2646 Add a page that cycles through v2 dashboards
2647 https://bugs.webkit.org/show_bug.cgi?id=149907
2649 Reviewed by Chris Dumez.
2651 Add cycler.html that goes through each dashboard on v2 UI.
2653 This allows the dashboards to be cycled through on a TV screen.
2655 * public/cycler.html: Added.
2656 (loadURLAt): Appends a new iframe to load the next URL (i is the index of the dashboard to be shown)
2657 at the end of body. We don't immediately show the new iframe since it might take a while to load.
2658 (showNewFrameIfLoaded): Remove the current iframe and show the next iframe if the next dashboard has
2659 finished loading. We can't rely on DOMContentLoaded or load events because we use asynchronous XHR to
2660 load each chart's data. Instead, wait until some chart becomes available or fails to load and none of
2661 charts are still in progress to be shown.
2663 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2665 Allow custom revisions to be specified in A/B testing
2666 https://bugs.webkit.org/show_bug.cgi?id=149905
2668 Reviewed by Chris Dumez.
2670 Allow custom revision number on each "repository" when creating a test group.
2672 * public/v2/app.css:
2673 (form .analysis-group [name=customValue]): Added.
2676 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
2677 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
2678 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
2679 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
2680 revision option is selected.
2682 * public/v2/index.html: Added a text field for specifying a custom revision number.
2684 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2686 Make the site name configurable in perf dashboard
2687 https://bugs.webkit.org/show_bug.cgi?id=149894
2689 Reviewed by Chris Dumez.
2691 Added "siteTitle" as a new configuration key to specify the site name.
2693 * public/include/db.php:
2694 (config): Now takes the default value as an argument.
2695 * public/include/manifest.php:
2696 (ManifestGenerator::generate): Include siteTitle in the manifest.
2697 * public/index.html: Update the title and the heading when the manifest is loaded.
2698 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
2699 * public/v2/manifest.js:
2700 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
2702 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2704 Perf dashboard doesn't show analysis tasks anchored at outliers
2705 https://bugs.webkit.org/show_bug.cgi?id=149870
2707 Reviewed by Chris Dumez.
2709 The bug was caused by the computation of start and end times of analysis tasks being dependent on
2710 time series provided to the interactive chart component even though they are already filtered.
2712 Since the interactive chart component shouldn't be messing with the underlying data models, moved
2713 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
2714 the unfiltered time series newly exposed on ChartData.
2716 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
2718 * public/admin/fetch-from-remote.php:
2719 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
2720 and Ember can start hanging browsers (took me three hours to debug this).
2723 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
2724 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
2725 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
2726 Filter the results manually instead.
2727 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
2728 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
2729 need to call a private method on it.
2730 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
2731 This will cause chartData to be modified so just exit early and wait for getting called again.
2733 * public/v2/interactive-chart.js:
2734 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
2737 * public/v2/manifest.js:
2738 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
2739 to compute the end points of analysis tasks when their end points are outliers.
2741 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2743 Unreviewed. Fix a typo in r190645.
2745 * public/include/db.php:
2747 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2749 V2 UI shouldn't sort dashboards lexicologically
2750 https://bugs.webkit.org/show_bug.cgi?id=149856
2752 Reviewed by Chris Dumez.
2754 Don't sort the dashboards by name in App.Manifest.
2757 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
2758 * public/v2/manifest.js:
2759 (App.Manifest.._fetchedManifest):
2761 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2763 V2 UI fails to show the data for the very first point in charts
2764 https://bugs.webkit.org/show_bug.cgi?id=149857
2766 Reviewed by Chris Dumez.
2768 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
2769 Explicitly check the type of this property instead.
2771 * public/v2/data.js:
2772 (TimeSeries.prototype.seriesBetweenPoints):
2774 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2776 Perf dashboard should have the capability to test local UI with production data
2777 https://bugs.webkit.org/show_bug.cgi?id=149834
2779 Reviewed by Chris Dumez.
2781 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
2783 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
2785 * config.json: Added remote server configurations.
2786 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
2787 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
2790 * public/include/db.php:
2791 (config_path): Extracted from generate_data_file.
2792 (generate_data_file):
2793 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
2794 run-with-remote-server.py.
2795 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
2797 (abspath_from_root):
2799 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
2803 * public/js/helper-classes.js:
2805 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
2807 build-requests should use conform to JSON API format
2808 https://bugs.webkit.org/show_bug.cgi?id=146375
2810 Reviewed by Stephanie Lewis.
2812 Instead of returning single dictionary that maps root set id to a dictionary of repository names
2813 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
2814 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
2815 matches what we do in /api/test-groups.
2817 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
2818 This is useful for debugging purposes.
2820 * public/api/build-requests.php:
2821 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
2822 (update_builds): Extracted from main.
2824 * public/include/build-requests-fetcher.php:
2825 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
2826 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
2827 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
2828 Moved the logic to exit early when the root set had already been fetched here.
2830 * public/v2/analysis.js:
2831 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
2834 * tools/pull-os-versions.py:
2836 (setup_auth): Moved to util.py
2838 * tools/sync-with-buildbot.py:
2839 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
2840 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
2842 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
2843 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
2844 (config_for_request): Fixed a bug that the script blows up when the build request is missing
2845 the repository specified in the configuration. This tolerance is necessary when a new repository
2846 dependency is added but we want to run A/B tests for old builds without the dependency.
2847 (fetch_json): No longer takes auth.
2850 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
2852 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
2854 Build fix. A/B testing is broken when continuous builders report revisions out of order.
2857 (App.AnalysisTaskController.Ember.Controller.extend.):
2859 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
2861 A/B testing results should be shown even if they were submitted to different platforms
2862 https://bugs.webkit.org/show_bug.cgi?id=146219
2864 Reviewed by Andreas Kling.
2866 Fetch A/B testing results regardless of the platform to which results are submitted
2867 by providing the platform ID to which the results were submitted for each test group.
2869 * public/api/test-groups.php:
2870 (main): Include the platform id in the test groups.
2871 * public/v2/analysis.js:
2872 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
2874 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
2876 Remove unnecessary svn:executable flags
2877 https://bugs.webkit.org/show_bug.cgi?id=146107
2879 Reviewed by Alexey Proskuryakov.
2881 * public/js/helper-classes.js: Removed property svn:executable.
2882 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
2883 * public/v2/app.css: Removed property svn:executable.
2884 * public/v2/app.js: Removed property svn:executable.
2885 * public/v2/chart-pane.css: Removed property svn:executable.
2886 * public/v2/data.js: Removed property svn:executable.
2887 * public/v2/index.html: Removed property svn:executable.
2888 * public/v2/js/d3/LICENSE: Removed property svn:executable.
2889 * public/v2/js/d3/d3.js: Removed property svn:executable.
2890 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
2891 * public/v2/js/ember-data.js: Removed property svn:executable.
2892 * public/v2/js/ember.js: Removed property svn:executable.
2893 * public/v2/js/handlebars.js: Removed property svn:executable.
2894 * public/v2/js/jquery.min.js: Removed property svn:executable.
2895 * public/v2/js/statistics.js: Removed property svn:executable.
2896 * public/v2/manifest.js: Removed property svn:executable.
2897 * public/v2/popup.js: Removed property svn:executable.
2899 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2901 Reading the list of analysis tasks is extremely slow
2902 https://bugs.webkit.org/show_bug.cgi?id=146086
2904 Reviewed by Darin Adler.
2906 The bug was caused by Ember data requesting manifest.js hundreds of times.
2907 Fetch it ahead of time in each route instead.
2910 (App.AnalysisRoute.model):
2911 (App.AnalysisTaskRoute.model):
2913 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2915 Update ReadMe.md and Install.md per database changes
2916 https://bugs.webkit.org/show_bug.cgi?id=146076
2918 Reviewed by Darin Adler.
2925 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2927 Increase the popup dismissal time from 100ms to 500ms
2928 https://bugs.webkit.org/show_bug.cgi?id=146077
2930 Rubber-stamped by Andreas Kling.
2932 * public/v2/popup.js:
2933 (App.PopupView.scheduleHiding):
2935 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
2937 v2 UI should have buttons to breakdown a test
2938 https://bugs.webkit.org/show_bug.cgi?id=146010
2940 Reviewed by Chris Dumez.
2942 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
2943 as well as "Breakdown" to add all subtests' metrics.
2945 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
2946 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
2949 (App.ChartsController.addAlternativePanes): Added.
2950 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
2951 (App.TestProxyForPopup.actionName): Added.
2952 (App.TestProxyForPopup.actionArgument): Added.
2953 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
2954 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
2955 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
2956 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
2957 that are already present in the list of panes.
2958 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
2959 * public/v2/index.html:
2960 * public/v2/manifest.js:
2961 (App.Metric.childMetrics): Added.
2963 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2965 Build fix after r185574.
2968 (set get App.Pane.Ember.Object.extend.):
2970 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2974 * tools/pull-os-versions.py:
2977 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2979 Perf dashboard should be able to list iOS versions as well as OS X versions
2980 https://bugs.webkit.org/show_bug.cgi?id=146003
2982 Reviewed by Stephanie Lewis.
2984 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
2985 information specified in config.json.
2987 * tools/pull-os-versions.py: Renamed from pull-osx.py.
2988 (main): Use available_builds_from_command when 'customCommands' is specified.
2989 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
2990 (fetch_available_builds): Now takes the repository name.
2992 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2994 Removed a superfluous console.log per Chris's comment.
2998 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
3000 Analysis task should show all possible revisions for A/B testing
3001 https://bugs.webkit.org/show_bug.cgi?id=145996
3003 Reviewed by Chris Dumez.
3005 * public/api/commits.php:
3006 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
3007 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
3008 have a "commit time".
3011 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
3012 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
3013 the fetched list of commits if available.
3014 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
3015 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
3016 of points shown in the A/B testing configurations become too long.
3018 * public/v2/commits-viewer.js:
3019 (App.CommitsViewerComponent.commitsChanged):
3021 * public/v2/data.js:
3022 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
3024 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
3026 Add a script to post new OS X builds to perf dashboard
3027 https://bugs.webkit.org/show_bug.cgi?id=145955
3029 Reviewed by Darin Adler.
3031 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
3033 * public/api/report-commits.php:
3034 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
3035 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
3037 * tools/pull-osx.py: Added.
3038 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
3039 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
3040 (setup_auth): Sets up basic or digest auth to access the dashboard.
3041 (fetch_available_builds): Fetches and parses the XML document from an internal website.
3042 (textContent): A helper function to get the text content out of a XML node.
3043 (submit_commits): Submits commits to the perf dashboard.
3045 * tools/pull-svn.py:
3048 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
3050 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
3052 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
3053 https://bugs.webkit.org/show_bug.cgi?id=145940
3055 Reviewed by Darin Adler.
3057 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
3058 Also deleted the code to mark points outside the envelop as outliers.
3062 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
3064 Unreviewed build fix for merging platforms.
3066 * public/admin/platforms.php:
3068 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
3070 Unreviewed build fix. Some builder names are really long.
3072 * init-database.sql:
3074 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
3076 Show results and status before revisions for A/B testing results
3077 https://bugs.webkit.org/show_bug.cgi?id=145327
3079 Reviewed by Chris Dumez.
3081 Place the results and the status columns before the columns for revisions.
3082 Also show the absolute difference as well as the relative difference between the averages of A and B.
3085 (App.TestGroupPane._populate):
3086 (App.TestGroupPane._computeStatisticalSignificance):
3087 * public/v2/index.html:
3089 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3091 Build fix after r184591.
3093 * public/v2/manifest.js:
3095 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3097 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
3099 * public/include/build-requests-fetcher.php:
3101 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3103 UI to associate bugs with an analysis task is crappy
3104 https://bugs.webkit.org/show_bug.cgi?id=145198
3106 Reviewed by Andreas Kling.
3108 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
3109 a bug and a separate select view with a text field to associate a new bug instead of implicitly
3110 updating or deleting the existing record based on what the user had typed.
3112 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
3113 a given analysis task since it's perfectly reasonable for a given task to be associated with
3114 multiple WebKit bugs.
3116 * public/privileged-api/associate-bug.php:
3117 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
3118 one that matches the analysis task and the bug tracker when the bug number is falsey.
3120 * public/v2/analysis.js:
3121 (App.Bug.url): Added.
3122 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
3124 * public/v2/app.css:
3127 (App.AnalysisTaskController.actions.addBug): Added.
3128 (App.AnalysisTaskController.actions.deleteBug): Added.
3129 (App.AnalysisTaskController.associateBug): Deleted.
3131 * public/v2/index.html: Updated the templates.
3133 * public/v2/manifest.js:
3134 (App.BugTracker.urlFromBugNumber): Added.
3136 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
3138 A/B testing rootSets should provide commit times as well as revisions
3139 https://bugs.webkit.org/show_bug.cgi?id=145207
3141 Reviewed by Andreas Kling.
3143 Some continuous build systems need the commit time as well as the revision number / hash so provide one
3144 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
3146 * public/include/build-requests-fetcher.php:
3147 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
3148 the revision number as well as the commit time.
3149 * tools/sync-with-buildbot.py:
3150 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
3151 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
3152 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
3154 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
3156 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
3158 * public/v2/manifest.js:
3159 (App.Manifest.Ember.Controller.extend.):
3160 (App.Manifest.Ember.Controller.extend):
3162 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
3164 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
3165 https://bugs.webkit.org/show_bug.cgi?id=145181
3167 Rubber-stamped by Chris Dumez.
3169 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
3170 for clarity. This change also reduces the code complexity.
3172 * public/index.html:
3174 (App.AnalysisTaskController._chartDataChanged):
3175 (App.TestGroupPane._createConfigurationSummary):
3176 * public/v2/data.js:
3177 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
3179 * public/v2/interactive-chart.js: Removed the support for showing units separately.
3180 (App.InteractiveChartComponent._constructGraphIfPossible):
3181 (App.InteractiveChartComponent._relayoutDataAndAxes)
3183 * public/v2/manifest.js:
3184 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
3185 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
3186 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
3187 automatically include unit.
3189 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
3191 REGRESSION: v2 UI reports a higher memory usage
3192 https://bugs.webkit.org/show_bug.cgi?id=145151
3194 Reviewed by Chris Dumez.
3196 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
3197 Fixed the bug by manually implementing the formatter as done in v1.
3199 * public/v2/manifest.js:
3200 (App.Manfiest._formatBytes): Added.
3201 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
3203 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
3205 Unreviewed build fix. Add "Duration" as a time metric.
3207 * public/js/helper-classes.js:
3208 * public/v2/data.js:
3209 (RunsData.unitFromMetricName):
3211 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
3213 Perf dashboard treats Speedometer and JetStream as smaller is better
3214 https://bugs.webkit.org/show_bug.cgi?id=144711
3216 Reviewed by Chris Dumez.
3218 Added the support for "Score" metric.
3220 * public/js/helper-classes.js:
3222 * public/v2/data.js:
3223 (RunsData.unitFromMetricName):
3224 (RunsData.isSmallerBetter):
3226 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
3228 Build fix after r183232.