1 2016-03-16 Ryosuke Niwa <rniwa@webkit.org>
3 Analysis task page should allow specifying commits that caused or fixed a regression or a progression
4 https://bugs.webkit.org/show_bug.cgi?id=155529
6 Reviewed by Chris Dumez.
8 Added the capability to associate revisions that caused or fixed a progression or a regression for which
9 an analysis task was created. Added task_commits that stores this relationship and added the backend
10 support to retrieve this table in /api/analysis-tasks and an privileged API to update this table at
11 /privileged-api/associate-commit.
13 Also extracted a new component, MutableListView, out of AnalysisTaskPage to render and manipulate a list
14 of mutable items, and used it to render the list of associated bugs and commits. The view takes a list of
15 kinds (e.g. repositories or bug trackers), and accepts a pair of a kind and arbitrary text as a new item
18 * init-database.sql: Added task_commits table.
20 * public/api/analysis-tasks.php:
22 (fetch_associated_data_for_tasks): Renamed from fetch_and_push_bugs_to_tasks now that it also fetches
23 the list of commits associated with each analysis task by calling CommitLogFetcher::fetch_for_tasks.
24 Also fixe the bug that we were not taking
25 (format_task): No longer sets 'category' since the computation of category now depends on the list of
26 commits associated with this analysis task which aren't available until fetch_associated_data_for_tasks.
27 (determine_category): Added. Categorize any analysis tasks with "fixes" commits as "closed" and "causes"
28 commits as "identified".
30 * public/include/commit-log-fetcher.php:
31 (CommitLogFetcher::__construct): Remove the unused instance variable.
32 (CommitLogFetcher::fetch_for_tasks): Added. Fetches all commits associated with a list of analysis tasks.
33 Assumes the caller (fetch_associated_data_for_tasks) had setup "fixes" and "causes" fields on each task.
35 * public/privileged-api/associate-commit.php: Added. Updates task_commits table to associate or disassociate
36 a commit with an analysis task. When the specified analysis task and the specified commit are already
37 associated, we simply update the table instead of adding a duplicating entry or error. For dissociation,
38 the front-end specifies the commit ID.
41 * public/v3/index.html:
42 * public/v3/components/mutable-list-view.js: Added. Used by the list associated bugs and commits.
43 (MutableListView): Added.
44 (MutableListView.prototype.setList): Added.
45 (MutableListView.prototype.setKindList): Added.
46 (MutableListView.prototype.setAddCallback): Added. This callback is invoked when the user tries to add
47 a new item to the list.
48 (MutableListView.prototype.render): Added.
49 (MutableListView.prototype._submitted): Added.
50 (MutableListView.cssTemplate):
51 (MutableListView.htmlTemplate):
52 (MutableListItem): Added. RemovalLink could be a hyperlink or a callback and gets involved when the user
53 tries to delete this item.
54 (MutableListItem.prototype.content):
56 * public/v3/models/analysis-task.js:
57 (AnalysisTask): Added the support of the list of commits that fixed and caused changes.
58 (AnalysisTask.prototype.updateSingleton): Ditto.
59 (AnalysisTask.prototype.causes): Added.
60 (AnalysisTask.prototype.fixes): Added.
61 (AnalysisTask.prototype.associateCommit): Added. Use the API added at /privileged-api/associate-commit
62 to associate a new commit with this analysis task. Each commit has either caused or fixed the change.
63 (AnalysisTask.prototype.dissociateCommit): Added. Use the same API to disassociate each commit.
64 (AnalysisTask._constructAnalysisTasksFromRawData): Find all commits associated with each analysis task.
65 Because commit log objects use a fake ID fdue to /api/measurement-set not providing commit IDs, we must
66 use CommitLog.findByRemoteId to find each commit instead of usual CommitLog.findById.
67 (AnalysisTask._constructAnalysisTasksFromRawData.resolveCommits): Added.
69 * public/v3/models/build-request.js:
70 (BuildRequest.prototype.hasFinished): Renamed from hasCompleted since it was confusing for this._status
71 being "completed" wasn't a necessary condition for this function to return true.
73 * public/v3/models/commit-log.js:
74 (CommitLog): Added the static map for actual commit ID instead of a fake ID created in ensureSingleton.
75 (CommitLog.prototype.remoteId): Added. Returns the real commit ID.
76 (CommitLog.findByRemoteId): Added. Finds an CommitLog object using the real ID.
78 * public/v3/models/test-group.js:
79 (TestGroup.prototype.hasFinished): Renamed from hasCompleted to match the rename in BuildRequest.
81 * public/v3/pages/analysis-task-page.js:
82 (AnalysisTaskPage): Added lists for the commits that fixed and caused the change using MutableListView.
83 Also adopted MutableListView for the list of associated bugs.
84 (AnalysisTaskPage.prototype.render): Added the code to populate the newly added lists.
85 (AnalysisTaskPage.prototype._makeCommitListItem): Added.
86 (AnalysisTaskPage.prototype._associateBug): Now this is a callback from MutableListView.
87 (AnalysisTaskPage.prototype._associateCommit): Added.
88 (AnalysisTaskPage.prototype._dissociateCommit): Added.
89 (AnalysisTaskPage.htmlTemplate):
90 (AnalysisTaskPage.cssTemplate):
92 * public/v3/remote.js:
93 (getJSON): Spit out the entire responseText when JSON failed to parse to make debugging easier.
95 2016-03-15 Ryosuke Niwa <rniwa@webkit.org>
97 Extract the code to format commit logs into its own PHP file
98 https://bugs.webkit.org/show_bug.cgi?id=155514
100 Rubber-stamped by Chris Dumez.
102 Extracted CommitLogFetcher out of /api/commits so that it could be used in analysis-tasks.php
103 in the future to support associating cause/fix for each analysis task.
105 * public/api/commits.php:
106 * public/include/commit-log-fetcher.php: Added.
108 (CommitLogFetcher::__construct): Added.
109 (CommitLogFetcher::repository_id_from_name): Added.
110 (CommitLogFetcher::fetch_between): Added.
111 (CommitLogFetcher::fetch_oldest): Added.
112 (CommitLogFetcher::fetch_latest): Added.
113 (CommitLogFetcher::fetch_last_reported): Added.
114 (CommitLogFetcher::fetch_revision): Added.
115 (CommitLogFetcher::commit_for_revision): Added.
116 (CommitLogFetcher::format_single_commit): Added.
117 (CommitLogFetcher::format_commit): Added.
119 2016-03-09 Ryosuke Niwa <rniwa@webkit.org>
121 Build fix after r196870.
123 * public/include/report-processor.php:
125 2016-03-09 Ryosuke Niwa <rniwa@webkit.org>
127 Add Size metric to perf dashboard
128 https://bugs.webkit.org/show_bug.cgi?id=155266
130 Reviewed by Chris Dumez.
132 Added the "Size" metric and use bytes as its unit.
134 * public/js/helper-classes.js:
137 (RunsData.unitFromMetricName):
139 2016-02-20 Ryosuke Niwa <rniwa@webkit.org>
141 Add the support for universal slave password
142 https://bugs.webkit.org/show_bug.cgi?id=154476
144 Reviewed by David Kilzer.
146 Added the support for universalSlavePassword.
149 * public/include/report-processor.php:
150 (ReportProcessor::process):
151 (ReportProcessor::authenticate_and_construct_build_data): Extracted from process().
153 2016-02-19 Ryosuke Niwa <rniwa@webkit.org>
155 Analysis tasks page complains about missing repository but with a wrong name
156 https://bugs.webkit.org/show_bug.cgi?id=154468
158 Reviewed by Chris Dumez.
160 Fixed the bug by using the right variable in the template literal.
162 * public/v3/components/customizable-test-group-form.js:
163 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use querySelector here since Chrome doesn't have
164 getElementsByClassName on ShadowRoot.
165 * public/v3/pages/analysis-task-page.js:
166 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Use name which is the name of
169 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
171 Revert an unintended change made in the previous commit.
175 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
177 Perf dashboard should let user cancel pending A/B testing and hide failed ones
178 https://bugs.webkit.org/show_bug.cgi?id=154433
180 Reviewed by Chris Dumez.
182 Added a button to hide a test group in the details view (the bottom table) in the analysis task page, and
183 "Show hidden tests" link to show the hidden test groups on demand. When a test group is hidden, all pending
184 requests in the group will also be canceled since a common scenario of using this feature is that the user
185 had triggered an useless A/B testing; e.g. all builds will fail, wrong, etc... We can revisit and add the
186 capability to just cancel the pending requests and leaving the group visible later if necessary.
188 Run `ALTER TYPE build_request_status_type ADD VALUE 'canceled';` to add the new type.
190 * init-database.sql: Added testgroup_hidden column to analysis_test_groups table and added 'canceled'
191 as a value to build_request_status_type table.
192 * public/api/test-groups.php:
193 (format_test_group): Added 'hidden' field in the JSON result.
194 * public/privileged-api/update-test-group.php:
195 (main): Added the support for updating testgroup_hidden column. When this column is set to true, also
196 cancel all pending build requests (by setting its request_status to 'canceled' which will be ignore by
198 * public/v3/components/test-group-results-table.js:
199 (TestGroupResultsTable.prototype.setTestGroup): Reset _renderedTestGroup here so that the next call to
200 render() will update the table; e.g. when build requests' status change from 'Pending' to 'Canceled'.
201 * public/v3/models/build-request.js:
202 (BuildRequest.prototype.hasCompleted): A build request is considered complete/finished if it's canceled.
203 (BuildRequest.prototype.hasPending): Added.
204 (BuildRequest.prototype.statusLabel): Handle 'canceled' status.
205 * public/v3/models/test-group.js:
207 (TestGroup.prototype.updateSingleton): Added to update 'hidden' field.
208 (TestGroup.prototype.isHidden): Added.
209 (TestGroup.prototype.hasPending): Added.
210 (TestGroup.prototype.hasPending): Added.
211 (TestGroup.prototype.updateHiddenFlag): Added. Uses the privileged API to update testgroup_hidden column.
212 The JSON API also updates the status of the 'pending' build requests in the group to 'canceled'.
213 * public/v3/pages/analysis-task-page.js:
214 (AnalysisTaskPage): Added _showHiddenTestGroups and _filteredTestGroups as instance variables.
215 (AnalysisTaskPage.prototype._didFetchTestGroups):
216 (AnalysisTaskPage.prototype._showAllTestGroups): Added.
217 (AnalysisTaskPage.prototype._didUpdateTestGroupHiddenState): Extracted from _didFetchTestGroups.
218 (AnalysisTaskPage.prototype._renderTestGroupList): Use the filtered list of test groups to show the list
219 of test groups. When all test groups are shown, we would first show the hidden ones after the regular ones.
220 (AnalysisTaskPage.prototype._createTestGroupListItem): Extracted from _renderTestGroupList.
221 (AnalysisTaskPage.prototype._renderTestGroupDetails): Update the text inside the button to hide the test
222 group. Also show a warning text that the pending requests will be canceled if there are any.
223 (AnalysisTaskPage.prototype._hideCurrentTestGroup): Added.
224 (AnalysisTaskPage.cssTemplate): Updated the style.
226 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
228 The rows in the analysis results table should be expandable
229 https://bugs.webkit.org/show_bug.cgi?id=154427
231 Reviewed by Chris Dumez.
233 Added "(Expand)" link between rows that have hidden points. Upon click it inserts the hidden rows.
235 We insert around five rows at a time when there are hundreds of hidden points but we also avoid leaving
236 behind expandable rows of less than two rows.
238 Also fixed a bug in CustomizableTestGroupForm that getElementsById would throw in the shipping Safari
239 because getElementsById doesn't exist on Element.prototype by using class name instead.
241 * public/v3/components/analysis-results-viewer.js:
242 (AnalysisResultsViewer):
243 (AnalysisResultsViewer.prototype.setCurrentTestGroup): Removed superfluous call to render().
244 (AnalysisResultsViewer.prototype.setPoints): Always show the start and the end points.
245 (AnalysisResultsViewer.prototype.buildRowGroups):
246 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Add an instance of ExpandableRow which
247 shows a "(Expand)" link to show hidden rows here.
248 (AnalysisResultsViewer.prototype._expandBetween): Added. Expands rows between two points.
249 (AnalysisResultsViewer.cssTemplate): Added rules for "(Expand)" links.
250 (AnalysisResultsViewer.ExpandableRow): Added.
251 (AnalysisResultsViewer.ExpandableRow.prototype.resultContent): Added. Overrides what's in the results column.
252 (AnalysisResultsViewer.ExpandableRow.prototype.heading): Added. Generates "(Expand)" link.
254 * public/v3/components/customizable-test-group-form.js:
255 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use getElementsByClassName instead of
257 (CustomizableTestGroupForm.prototype._classForLabelAndRepository): Renamed from _idForLabelAndRepository.
258 (CustomizableTestGroupForm._constructRevisionRadioButtons): Set class name instead of id.
260 * public/v3/components/results-table.js:
261 (ResultsTable.prototype.render): Don't generate radio buttons to select a row when root set is missing;
262 e.g. for rows that show "(Expand)" links.
264 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
266 Statistically significant A/B testing results should be color coded in details view
267 https://bugs.webkit.org/show_bug.cgi?id=154414
269 Reviewed by Chris Dumez.
271 Color code the statistically significant comparisions in TestGroupResultsTable as done in the analysis
274 * public/v3/components/customizable-test-group-form.js:
275 (CustomizableTestGroupForm.cssTemplate): Build fix after r196768.
276 * public/v3/components/test-group-results-table.js:
277 (TestGroupResultsTable.prototype.buildRowGroups): Add the status as a class name.
278 (TestGroupResultsTable.cssTemplate): Added styles to color-code statistically significant results.
280 2016-02-17 Ryosuke Niwa <rniwa@webkit.org>
282 v3 UI should allow custom revisions for A/B testing
283 https://bugs.webkit.org/show_bug.cgi?id=154379
285 Reviewed by Chris Dumez.
287 Added the capability to customize revisions selected in the overview chart and the results viewer.
289 Newly added CustomizableTestGroupForm is responsible for allowing users to modify the set of revisions in
290 a new A/B testing group. Unlike TestGroupForm which doesn't know anything about which revisions are selected
291 for each project/repository, CustomizableTestGroupForm is aware of the list of revisions used in each set.
293 The list of revisions used in each set is represented by RootSet if users had not customized them, and
294 CustomRootSet otherwise; the latter was added since regular RootSet object requires CommitLog and other
295 DataModelObjects which are hard to create without corresponding database entries.
297 * public/v3/components/customizable-test-group-form.js: Added.
298 (CustomizableTestGroupForm): Added.
299 (CustomizableTestGroupForm.prototype.setRootSetMap): Added.
300 (CustomizableTestGroupForm.prototype._submitted): Overrides the superclass' method.
301 (CustomizableTestGroupForm.prototype._customize): Ditto. Unlike TestGroupForm's callback, this class'
302 callback passes in a root set map as the third argument.
303 (CustomizableTestGroupForm.prototype._computeRootSetMap): Added. Returns this._rootSetMap, which is set by
304 AnalysisTaskPage if user had not customized the root sets. Otherwise return a new map with CustomRootSet's.
305 (CustomizableTestGroupForm.prototype.render): Added. Creates a table to allow customization of root sets.
306 (CustomizableTestGroupForm._constructRevisionRadioButtons): Added.
307 (CustomizableTestGroupForm._createRadioButton): Added.
308 (CustomizableTestGroupForm.cssTemplate): Added.
309 (CustomizableTestGroupForm.formContent): Added. This method is called by TestGroupForm.htmlTemplate.
310 * public/v3/components/test-group-form.js:
311 (TestGroupForm): Updated the various methods to not directly mutate DOM. Store the state in instance
312 variables and update DOM in render() as done elsewhere.
313 (TestGroupForm.prototype.setNeedsName): Deleted. We no longer need this flag since TestGroupForm which is
314 used for retries never needs a name and CustomizableTestGroupForm which is used to create a new test group
315 always requires a name.
316 (TestGroupForm.prototype.setDisabled):
317 (TestGroupForm.prototype.setLabel):
318 (TestGroupForm.prototype.setRepetitionCount):
319 (TestGroupForm.prototype.render): Added.
320 (TestGroupForm.prototype._submitted): Moved the code to prevent the default action has been moved to the
321 constructor since this method is overridden by CustomizableTestGroupForm.
322 (TestGroupForm.cssTemplate): Added.
323 (TestGroupForm.htmlTemplate):
324 (TestGroupForm.formContent): Extracted from htmlTemplate.
325 * public/v3/index.html:
326 * public/v3/models/repository.js:
327 (Repository.sortByNamePreferringOnesWithURL): Added.
328 * public/v3/models/root-set.js:
329 (RootSet.prototype.revisionForRepository): Added so that _createTestGroupAfterVerifyingRootSetList can retrieve
330 the revision information from CustomRootSet without going through CommitLog objects since CustomRootSet doesn't
331 have associated CommitLog objects.
332 (CustomRootSet): Added. Used by CustomizableTestGroupForm to create a custom root map since regular RootSet
333 requires CommitLog and other related objects which are hard to create without database entries.
334 (CustomRootSet.prototype.setRevisionForRepository): Added.
335 (CustomRootSet.prototype.repositories): Added.
336 (CustomRootSet.prototype.revisionForRepository): Added.
337 * public/v3/pages/analysis-task-page.js:
339 (AnalysisTaskPage.prototype.render): Removed the reference to v2 UI since v3 UI is now strictly more powerful
340 than v2 UI. Also update the root set maps in each form here.
341 (AnalysisTaskPage.prototype._retryCurrentTestGroup): No longer takes unused name argument as it got removed
343 (AnalysisTaskPage.prototype._chartSelectionDidChange): No longer updates the disabled-ness here since it's now
344 done in render() via setRootSetMap().
345 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Now takes rootSetMap as an argument.
346 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): No longer updates the disabled-ness here
347 since it's now done in render() via setRootSetMap().
348 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Now takes rootSetMap as an argument.
349 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Take a dictionary of root set labels
350 such as A and B, which maps to a RootSet or a newly-added CustomRootSet.
351 (AnalysisTaskPage.htmlTemplate): Use customizable-test-group-form for creating a new A/B testing group. Retry
352 form will continue to use TestGroupForm since customizing revisions is non-sensical in retries.
353 (AnalysisTaskPage.cssTemplate): Updated the style.
355 2016-02-16 Ryosuke Niwa <rniwa@webkit.org>
357 v3 UI has the capability to schedule an A/B testing in a specific range
358 https://bugs.webkit.org/show_bug.cgi?id=154329
360 Reviewed by Chris Dumez.
362 Extended AnalysisTaskChartPane and ResultsTable so that users can select a range of points in either
363 the overview chart pane and the results viewer table. Extracted TestGroupForm out of the analysis task
364 page and used right below those two components in the analysis task page.
366 * public/v3/components/results-table.js:
368 (ResultsTable.prototype.setRangeSelectorLabels): Added.
369 (ResultsTable.prototype.setRangeSelectorCallback): Added.
370 (ResultsTable.prototype.selectedRange): Added.
371 (ResultsTable.prototype._rangeSelectorClicked): Added.
372 (ResultsTable.prototype.render): Generate radio boxes to select a range.
374 * public/v3/components/test-group-form.js:
376 (TestGroupForm.prototype.setStartCallback): Added.
377 (TestGroupForm.prototype.setNeedsName): Added.
378 (TestGroupForm.prototype.setDisabled): Added.
379 (TestGroupForm.prototype.setLabel): Added.
380 (TestGroupForm.prototype.setRepetitionCount): Added.
381 (TestGroupForm.prototype._submitted): Added.
382 (TestGroupForm.htmlTemplate): Extracted from AnalysisTaskPage.htmlTemplate.
384 * public/v3/index.html:
386 * public/v3/pages/analysis-task-page.js:
387 (AnalysisTaskChartPane.prototype._mainSelectionDidChange): Added. Delegates the work to AnalysisTaskPage.
388 (AnalysisTaskChartPane.prototype.selectedPoints): Added.
390 (AnalysisTaskPage.prototype.title):
391 (AnalysisTaskPage.prototype.render):
392 (AnalysisTaskPage.prototype._renderTestGroupDetails): Use TestGroupForm's methods instead of mutating DOM.
393 (AnalysisTaskPage.prototype._retryCurrentTestGroup):
394 (AnalysisTaskPage.prototype._chartSelectionDidChange): Added.
395 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Added.
396 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): Added.
397 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Added.
398 (AnalysisTaskPage.prototype._createRetryNameForTestGroup):
399 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Extracted from _retryCurrentTestGroup
400 so that we can call it in _createNewTestGroupFromChart and _createNewTestGroupFromViewer.
401 (AnalysisTaskPage.htmlTemplate):
403 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
405 Extract the code specific to v2 UI out of shared statistics.js
406 https://bugs.webkit.org/show_bug.cgi?id=154277
408 Reviewed by Chris Dumez.
410 Extracted statistics-strategies.js out of statistics.js for v2 UI and detect-changes.js. The intent is to
411 deprecate this file once we implement refined statistics tools in v3 UI and adopt it in detect-changes.js.
413 * public/shared/statistics.js:
414 (Statistics.movingAverage): Extracted from the "Simple Moving Average" strategy.
415 (Statistics.cumultaiveMovingAverage): Extracted from the "Cumulative Moving Average" strategy.
416 (Statistics.exponentialMovingAverage): Extracted from the "Exponential Moving Average" strategy.
417 Use a temporary "movingAverage" to keep the last moving average instead of relying on the previous
418 entry in "averages" array to avoid special casing an array of length 1 and starting the loop at i = 1.
419 (Statistics.segmentTimeSeriesGreedyWithStudentsTTest): Extracted from "Segmentation: Recursive t-test"
420 strategy. Don't create the list of averages to match segmentTimeSeriesByMaximizingSchwarzCriterion here.
421 It's done in newly added averagesFromSegments.
422 (Statistics.segmentTimeSeriesByMaximizingSchwarzCriterion): Extracted from
423 "Segmentation: Schwarz criterion" strategy.
424 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Just store the start index to match
426 (App.Pane.updateStatisticsTools):
427 (App.Pane._computeMovingAverageAndOutliers):
429 * public/v2/index.html:
430 * public/v2/statistics-strategies.js: Added.
431 (StatisticsStrategies.MovingAverageStrategies): Added.
432 (averagesFromSegments): Extracted from "Segmentation: Schwarz criterion" strategy. Now used by both
433 "Segmentation: Recursive t-test" and "Segmentation: Schwarz criterion" strategies.
434 (StatisticsStrategies.EnvelopingStrategies): Moved from Statistics.EnvelopingStrategies.
435 (StatisticsStrategies.TestRangeSelectionStrategies): Moved from Statistics.TestRangeSelectionStrategies.
436 (createWesternElectricRule): Moved from statistics.js.
437 (countValuesOnSameSide): Ditto.
438 (StatisticsStrategies.executeStrategy): Moved from Statistics.executeStrategy.
439 * tools/detect-changes.js:
440 (computeRangesForTesting):
442 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
444 v1 UI and v2 UI should share statistics.js
445 https://bugs.webkit.org/show_bug.cgi?id=154262
447 Reviewed by Chris Dumez.
449 Share statistics.js between v1 and v2 UI.
452 * public/js/shared.js: Deleted.
453 * public/js/statistics.js: Removed.
454 * public/shared: Added.
455 * public/shared/statistics.js: Moved from Websites/perf.webkit.org/public/v2/js/statistics.js.
456 * public/v2/index.html:
457 * public/v2/js/statistics.js: Removed.
458 * public/v3/index.html:
459 * tools/detect-changes.js:
461 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
463 v3 UI sometimes shows same dates twice on the x-axis of time series charts
464 https://bugs.webkit.org/show_bug.cgi?id=154210
466 Reviewed by Chris Dumez.
468 The bug was caused by the label generation code in TimeSeriesChart.computeTimeGrid never emitting hours.
470 Use hours instead of dates as labels when the current time's date is same as the previous label's date.
471 Always include dates before entering this mode to avoid just having hours as labels on the entire x-axis.
473 * public/v3/components/time-series-chart.js:
474 (TimeSeriesChart.prototype._renderXAxis): Slightly increase the "average" width of x-axis label.
475 (TimeSeriesChart.computeTimeGrid): See above. Also assert that the number of labels we generate never
476 exceeds maxLabels as a sanity check.
477 (TimeSeriesChart._timeIterators): Added an iterator that increments by two hours for zoomed graphs.
479 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
481 v3 UI should show status and associated bugs on analysis task pages
482 https://bugs.webkit.org/show_bug.cgi?id=154212
484 Reviewed by Chris Dumez.
486 Added the capability to see and modify the status and the list of associated of bugs on analysis task pages.
488 Also added the list of related tasks, which are analysis tasks associated with the same bug or have
489 overlapping time ranges with the same test metric but on a potentially different platform.
491 In addition, categorize analysis tasks with the status of "no change" or "inconclusive" as "closed" as no
492 further action can be taken (users can bring them back to non-closed state without any restrictions).
494 * public/api/analysis-tasks.php:
495 (format_task): Categorize 'unchanged' and 'inconclusive' analysis tasks as closed.
497 * public/privileged-api/associate-bug.php:
498 (main): Added shouldDelete as a new mechanism to disassociate a bug since v3 UI shares a single Bug object
499 between multiple analysis tasks (as it should have been in the first place).
501 * public/v3/components/chart-pane-base.js:
503 (ChartPaneBase.prototype._fetchAnalysisTasks): Since each analysis task's change type (status/result) could
504 change, we need to create annotation objects during each render() call.
505 (ChartPaneBase.prototype.render):
506 (ChartPaneBase.prototype._renderAnnotations): Extracted from ChartPaneBase.prototype._fetchAnalysisTasks to
507 do that. I was afraid of the perf impact of this but it doesn't seem to be an issue in my testing.
508 (ChartPaneBase.cssTemplate): Removed superfluous margins (moved to ChartPane.cssTemplate) around the charts
509 since they are only useful in the charts page.
511 * public/v3/models/analysis-task.js:
513 (AnalysisTask.prototype.updateSingleton): Added a comment as to why object.result cannot be renamed to
514 object.changeType in the JSON API.
515 (AnalysisTask.prototype.updateName): Added.
516 (AnalysisTask.prototype.updateChangeType): Added.
517 (AnalysisTask.prototype._updateRemoteState): Added.
518 (AnalysisTask.prototype.associateBug): Added.
519 (AnalysisTask.prototype.disassociateBug): Added.
520 (AnalysisTask.fetchRelatedTasks): Added. See above for the criteria of related-ness.
522 * public/v3/pages/analysis-task-page.js:
524 (AnalysisTaskPage.prototype.updateFromSerializedState):
525 (AnalysisTaskPage.prototype._fetchRelatedInfoForTaskId): Extracted from updateFromSerializedState.
526 (AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks): Added.
527 (AnalysisTaskPage.prototype.render): Render the list of associated bugs, the list of bug trackers (so that
528 users can use it to associate with a new bug), and the list of related analysis tasks.
529 (AnalysisTaskPage.prototype._renderTestGroupList): Extracted from render since it was getting too long.
530 (AnalysisTaskPage.prototype._renderTestGroupDetails): Ditto.
531 (AnalysisTaskPage.prototype._updateChangeType): Added.
532 (AnalysisTaskPage.prototype._associateBug): Added.
533 (AnalysisTaskPage.prototype._disassociateBug): Added.
534 (AnalysisTaskPage.htmlTemplate): Added various elements to show and modify the status, associate bugs,
535 and a list of related analysis tasks.
536 (AnalysisTaskPage.cssTemplate): Added various styles for those form controls.
538 * public/v3/pages/chart-pane.js:
539 (ChartPane.cssTemplate): Moved the margins from ChartPaneBase.cssTemplate.
541 2016-02-12 Ryosuke Niwa <rniwa@webkit.org>
543 Perf dashboard should allow renaming analysis tasks and test groups
544 https://bugs.webkit.org/show_bug.cgi?id=154200
546 Reviewed by Chris Dumez.
548 Allow editing names of analysis tasks and A/B testing groups in the v3 UI.
550 Added the support for updating the name to the privileged API at /privileged-api/update-analysis-task
551 and added a new prevailed API to update A/B testing groups at /privileged-api/update-test-group.
553 * public/privileged-api/update-analysis-task.php: Added the support for renaming the analysis task.
556 * public/privileged-api/update-test-group.php: Added. Supports updating the test group's name.
559 * public/v3/components/editable-text.js: Added.
560 (EditableText): Added. A new editable text label control. It looks like a text node with "(Edit)" link
561 at the end which allow users to go into the "editing mode", which reveals an input element.
562 The user can exit the editing mode by either moving the focus away from the control or clicking on
563 "(Save)" at the end. It calls _updateCallback in the latter case.
564 (EditableText.prototype.editedText): Returns the current value of the input element user.
565 (EditableText.prototype.setText): Sets the label. This does not live-update the input element until
566 the user exists the current editing mode and re-enters it.
567 (EditableText.prototype.setStartedEditingCallback): Sets a callback which gets called when the user
568 requested to enter the editing mode. Since EditableText relies on AnalysisTaskPage to render, this
569 callback only exits to call EditableText.render() in AnalysisTask._didStartEditingTaskName.
570 (EditableText.prototype.setUpdateCallback): Sets a callback which gets called when the user exits
571 the editing mode by activating the "(Save)" link. This callback MUST return a promise upon resolution
572 of which the control gets out of the editing mode. While the promise is in flight, the input element
574 (EditableText.prototype.render): Updates various states of the elements. When _updatingPromise is not
575 falsy, we make the input element readonly and show '(...)' on the link. Don't show the action link
576 if the label is empty (e.g. analysis task or test group is still being fetched).
577 (EditableText.prototype._didClick): Called when the user clicked on the action link. Enter the editing
578 mode or save the edited label via _updateCallback.
579 (EditableText.prototype._didBlur): Exit the editing mode without saving if the input element is not
580 focused, there is no inflight promise returned by _updateCallback, and the action link "(Save)" does
582 (EditableText.prototype._didUpdate): Called when exiting the editing mode.
583 (EditableText.htmlTemplate):
584 (EditableText.cssTemplate):
586 * public/v3/index.html: Include newly added editable-text.js.
588 * public/v3/models/analysis-task.js:
589 (AnalysisTask.prototype.updateSingleton): Added.
590 (AnalysisTask.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
591 the analysis task from the sever.
592 (AnalysisTask._constructAnalysisTasksFromRawData): Use ensureSingleton instead of manually calling
593 findById since we need to update the name of the singleton object we found (via updateSingleton).
595 * public/v3/models/bug.js:
596 (Bug.ensureSingleton): Moved the code to compute the synthetic id from AnalysisTask's
597 _constructAnalysisTasksFromRawData.
598 (Bug.prototype.updateSingleton): Added. Just assert that nothing changes.
600 * public/v3/models/build-request.js:
601 (BuildRequest.prototype.updateSingleton): Added. Assert that the intrinsic values of a build request
602 doesn't change and update status text, status url, and build id as they could change.
604 * public/v3/models/commit-log.js:
605 (CommitLog): Made the constructor argument conform to the convention of id, object pair so that we can
606 use DataModelObject.ensureSingleton.
607 (CommitLog.ensureSingleton):
608 (CommitLog.prototype.updateSingleton): Extracted from CommitLog.ensureSingleton.
610 * public/v3/models/data-model.js:
611 (DataModelObject.ensureSingleton): Call newly added updateSingleton.
612 (DataModelObject.prototype.updateSingleton):
613 (LabeledObject): Removed the name map since it's never used (findByName is never called anywhere).
614 (LabeledObject.prototype.updateSingleton): Added. Updates _name.
615 (LabeledObject.findByName): Deleted.
617 * public/v3/models/test-group.js:
618 (TestGroup.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
619 the test group from the sever.
620 (TestGroup._createModelsFromFetchedTestGroups): Removed bogus code. A root set doesn't have a test
621 group associated with it since multiple test groups can share a single root set (this property doesn't
624 * public/v3/pages/analysis-task-page.js:
625 (AnalysisTaskPage): Removed useless _taskId and added this._testGroupLabelMap and this._taskNameLabel.
626 (AnalysisTaskPage.prototype.updateFromSerializedState): Cleanup.
627 (AnalysisTaskPage.prototype._didFetchTask): Assert that this function is called exactly once.
628 (AnalysisTaskPage.prototype.render): Use this._task.id() to show the v2 link. Use EditableText to show
629 the names of the analysis task and the associated test groups. Hide the overview chart and the list of
630 test groups (along with the retry/confirm button) when the analysis task failed to fetch. We always
631 update the names of the analysis task and the associated test groups since they could be updated by
633 (AnalysisTaskPage.prototype._didStartEditingTaskName): Added.
634 (AnalysisTaskPage.prototype._updateTaskName): Added.
635 (AnalysisTaskPage.prototype._updateTestGroupName): Added.
636 (AnalysisTaskPage.htmlTemplate): Updated the style.
638 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
640 Land the change that was supposed to be the part of r196463.
642 * public/v3/pages/analysis-task-page.js:
643 (AnalysisTaskPage.prototype._didFetchTestGroups): Select the latest test group by default.
645 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
647 Refine v3 UI's analysis task page
648 https://bugs.webkit.org/show_bug.cgi?id=154152
650 Reviewed by Chris Dumez.
652 This patch makes the following refinements to the analysis task page:
653 - Always show the relative different of in-progress A/B testing.
654 - Make the annotations (colored bars) in the chart open other analysis tasks.
655 - Order the A/B testing groups in the reverse chronological order.
656 - Select the time range corresponding to the current test group.
658 * public/v3/components/analysis-results-viewer.js:
659 (AnalysisResultsViewer.cssTemplate): Fixed the bug that pending and running testing groups are no longer
660 colored after r196440. Use a slightly more opaque color for currently running groups compared to pending ones.
662 * public/v3/components/chart-pane-base.js:
663 (ChartPaneBase.prototype.setMainSelection): Added.
664 (ChartPaneBase.prototype._openAnalysisTask): Moved the code from ChartPane._openAnalysisTask so that it can be
665 reused in both AnalysisTaskChartPane and ChartPane (in charts page).
666 (ChartPaneBase.prototype.router): Added. Overridden by each subclass.
668 * public/v3/components/test-group-results-table.js:
669 (TestGroupResultsTable.prototype.buildRowGroups): Always show the summary (relative difference of A to B) as
670 long as there are some results in each set.
672 * public/v3/models/test-group.js:
673 (TestGroup.prototype.compareTestResults): Always set .label and .fullLabel with the relative change as long as
674 there are some values. Keep using "pending" and "running" in .status since that would determine the color of
675 stacking blocks representing those A/B testing groups.
677 * public/v3/pages/analysis-task-page.js:
678 (AnalysisTaskChartPane):
679 (AnalysisTaskChartPane.prototype.setPage): Added.
680 (AnalysisTaskChartPane.prototype.router): Added.
682 (AnalysisTaskPage.prototype.render): Show the list of A/B testing groups in the reverse chronological order.
683 Also set the main chart's selection to the time range of the current test group.
685 * public/v3/pages/chart-pane.js:
686 (ChartPane.prototype.router): Added.
687 (ChartPane.prototype._openAnalysisTask): Moved to ChartPaneBase.prototype._openAnalysisTask.
689 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
691 Add a script to process backlogs created while perf dashboard was in the maintenance mode
692 https://bugs.webkit.org/show_bug.cgi?id=154140
694 Reviewed by Chris Dumez.
696 Added a script to process the backlog JSONs created while the perf dashboard was put in the maintenance mode.
697 It re-submits each JSON file to the perf dashboard using the same server config file used by syncing scripts.
699 * public/include/report-processor.php:
700 (TestRunsGenerator::test_value_list_to_values_by_iterations): Fixed a bug in the error message code. It was
701 referencing an undeclared variable.
702 * tools/process-maintenance-backlog.py: Added.
704 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
706 AnalysisResultsViewer never uses this._smallerIsBetter
707 https://bugs.webkit.org/show_bug.cgi?id=154134
709 Reviewed by Chris Dumez.
711 Removed the unused instance variable _smallerIsBetter from AnalysisResultsViewer and TestGroupStackingBlock.
713 * public/v3/components/analysis-results-viewer.js:
714 (AnalysisResultsViewer): Removed the unused _smallerIsBetter.
715 (AnalysisResultsViewer.prototype.setSmallerIsBetter): Deleted.
716 (AnalysisResultsViewer.prototype.buildRowGroups):
717 (AnalysisResultsViewer.TestGroupStackingBlock): Removed the unused _smallerIsBetter.
718 * public/v3/pages/analysis-task-page.js:
719 (AnalysisTaskPage.prototype._didFetchTask):
721 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
723 Build fix after r196440.
725 * public/v3/models/test-group.js:
726 (TestGroup.prototype.addBuildRequest): Clear the map instead of setting the property to null.
728 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
730 Perf dashboard should have UI to retry A/B testing
731 https://bugs.webkit.org/show_bug.cgi?id=154090
733 Reviewed by Chris Dumez.
735 Added a button to re-try an existing A/B testing group with a custom repetition count. The same button functions
736 as a way of confirming the progression/regression when there have been no A/B testing scheduled in the task.
738 Also fixed the bug that A/B testing groups that have been waiting for other test groups will be shown as "running".
740 * public/v3/components/results-table.js:
741 (ResultsTable.cssTemplate): Don't pad the list of extra repositories when it's empty.
743 * public/v3/components/test-group-results-table.js:
744 (TestGroupResultsTable.prototype.buildRowGroups): Use TestGroup.labelForRootSet instead of manually
745 computing the letter for each configuration set.
747 * public/v3/models/build-request.js:
748 (BuildRequest.prototype.hasStarted): Added.
750 * public/v3/models/data-model.js:
751 (DataModelObject.ensureSingleton): Added.
752 (DataModelObject.cachedFetch): Added noCache option. This is used when re-fetching the test groups after
755 * public/v3/models/measurement-cluster.js:
756 (MeasurementCluster.prototype.startTime): Added.
758 * public/v3/models/measurement-set.js:
759 (MeasurementSet.prototype.hasFetchedRange): Added. Returns true only if there are no "holes" (cluster
760 yet to be fetched) between the specified time range. This was added to fix a bug in AnalysisTaskPage's
761 _didFetchMeasurement.
763 * public/v3/models/test-group.js:
764 (TestGroup): Added this._rootSetToLabel.
765 (TestGroup.prototype.addBuildRequest): Reset this._rootSetToLabel along with this._requestedRootSets.
766 (TestGroup.prototype.repetitionCount): Added. Returns the number of iterations executed per set. We assume that
767 every root set in the test group shares a single repetition count.
768 (TestGroup.prototype.requestedRootSets): Now populates this._rootSetToLabel for labelForRootSet.
769 (TestGroup.prototype.labelForRootSet): Added.
770 (TestGroup.prototype.hasStarted): Added.
771 (TestGroup.prototype.compareTestResults): Use 'running' and 'pending' to differentiate test groups that are waiting
772 for other groups to finish running from the ones that are actually running ('incomplete' before this patch).
773 (TestGroup.fetchByTask):
774 (TestGroup.createAndRefetchTestGroups): Added. Creates a new test group using the privileged-api/create-test-group
775 and fetches the list of test groups for the specified analysis task.
776 (TestGroup._createModelsFromFetchedTestGroups): Extracted from TestGroup.fetchByTask.
778 * public/v3/pages/analysis-task-page.js:
779 (AnalysisTaskPage): Initialize _renderedCurrentTestGroup to undefined so that we'd always can differentiate
780 the initial call to AnalysisTaskPage.render and subsequent calls in which it's identical to _currentTestGroup.
781 (AnalysisTaskPage.prototype._didFetchMeasurement): Fixed a bug that we don't exit early even when some
782 clusters in between startPoint and endPoint are still being fetched via newly added hasFetchedRange.
783 (AnalysisTaskPage.prototype.render): Update the default repetition count based on the current test group.
784 Also update the label of the button to "Confirm the change" if there is no A/B testing in this task.
785 (AnalysisTaskPage.prototype._retryCurrentTestGroup): Added. Re-triggers an existing A/B testing group or creates
786 the A/B testing for the entire range of the analysis task.
787 (AnalysisTaskPage.prototype._hasDuplicateTestGroupName): Added.
788 (AnalysisTaskPage.prototype._createRetryNameForTestGroup): Added.
789 (AnalysisTaskPage.htmlTemplate): Added form controls to re-trigger A/B testing.
790 (AnalysisTaskPage.cssTemplate): Updated the style.
792 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
794 Removed the duplicated definition of ChartPaneBase.
796 * public/v3/components/chart-pane-base.js:
798 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
800 Analysis task page on v3 UI should show charts
801 https://bugs.webkit.org/show_bug.cgi?id=154057
803 Reviewed by Chris Dumez.
805 Extracted ChartPaneBase out of ChartPane and added an instance of its new subclass, AnalysisTaskChartPane,
806 to the analysis task page. The main difference is that ChartPaneBase doesn't depend on the presence of
807 this._chartsPage unlike ChartPane. It also doesn't have the header with toolbar (to show breakdown, etc...).
809 * public/v3/components/base.js:
810 (ComponentBase.prototype._constructShadowTree): Call htmlTemplate() and cssTemplate() with the right "this".
812 * public/v3/components/chart-pane-base.js: Added.
813 (ChartPaneBase): Extracted from ChartPane.
814 (ChartPaneBase.prototype.configure): Extracted from the constructor. Separating this function allows the
815 component to be instantiated inside a HTML template.
816 (ChartPaneBase.prototype._fetchAnalysisTasks): Moved from ChartPane._fetchAnalysisTasks.
817 (ChartPaneBase.prototype.platformId): Ditto.
818 (ChartPaneBase.prototype.metricId): Ditto.
819 (ChartPaneBase.prototype.setOverviewDomain): Ditto.
820 (ChartPaneBase.prototype.setMainDomain): Ditto.
821 (ChartPaneBase.prototype._overviewSelectionDidChange): Extracted from the constructor. This is overridden in
822 ChartPane and unused in AnalysisTaskChartPane.
823 (ChartPaneBase.prototype._mainSelectionDidChange): Extracted from ChartPane._mainSelectionDidChange.
824 (ChartPaneBase.prototype._mainSelectionDidZoom): Extracted from ChartPane._mainSelectionDidZoom.
825 (ChartPaneBase.prototype._indicatorDidChange): Extracted from ChartPane._indicatorDidChange.
826 (ChartPaneBase.prototype._didFetchData): Moved from ChartPane._fetchAnalysisTasks.
827 (ChartPaneBase.prototype._openAnalysisTask): Ditto.
828 (ChartPaneBase.prototype._openCommitViewer): Ditto. Also fixed a bug that we don't show the spinner while
829 waiting for the data to be fetched by calling this.render() here.
830 (ChartPaneBase.prototype._keyup): Moved from ChartPane._keyup. Also fixed the bug that the revisions list
831 doesn't update by calling this.render() here.
832 (ChartPaneBase.prototype.render): Extracted from ChartPane.render.
833 (ChartPaneBase.htmlTemplate): Extracted from ChartPane.htmlTemplate.
834 (ChartPaneBase.paneHeaderTemplate): Added. This is overridden in ChartPane and unused in AnalysisTaskChartPane.
835 (ChartPaneBase.cssTemplate): Extracted from ChartPane.htmlTemplate.
837 * public/v3/components/chart-styles.js: Renamed from public/v3/pages/page-with-charts.js.
838 (PageWithCharts): Renamed from PageWithCharts since it no longer extends PageWithHeading.
839 (ChartStyles.createChartSourceList):
841 * public/v3/components/commit-log-viewer.js:
842 (CommitLogViewer.prototype.view): Set this._repository right away instead of waiting for the fetched data
843 so that spinner will be shown while the data is being fetched.
845 * public/v3/index.html:
847 * public/v3/pages/analysis-task-page.js:
848 (AnalysisTaskChartPane): Added extends ChartPaneBase.
849 (AnalysisTaskPage): Added. this._chartPane.
850 (AnalysisTaskPage.prototype._didFetchTask): Initialize this._chartPane with a domain.
851 (AnalysisTaskPage.prototype.render): Render this._chartPane.
852 (AnalysisTaskPage.htmlTemplate):
854 * public/v3/pages/chart-pane-status-view.js:
855 (ChartPaneStatusView): Removed the unused router from the argument list.
856 (ChartPaneStatusView.prototype.pointsRangeForAnalysis): Renamed from analyzeData() since it was ambiguous.
857 (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Fixed the bug that we don't update the list
858 of the revisions here.
859 (ChartPaneStatusView.prototype.computeChartStatusLabels):
861 * public/v3/pages/chart-pane.js:
862 (ChartPane): Now extends ChartPaneBase.
863 (ChartPane.prototype._overviewSelectionDidChange): Extracted from the constructor.
864 (ChartPane.prototype._mainSelectionDidChange):
865 (ChartPane.prototype._mainSelectionDidZoom):
866 (ChartPane.prototype._indicatorDidChange):
867 (ChartPane.prototype.render):
868 (ChartPane.prototype._renderActionToolbar):
869 (ChartPane.paneHeaderTemplate): Extracted from htmlTemplate.
870 (ChartPane.cssTemplate):
871 (ChartPane.overviewOptions.selection.onchange): Deleted.
872 (ChartPane.prototype._fetchAnalysisTasks): Deleted.
873 (ChartPane.prototype.platformId): Deleted.
874 (ChartPane.prototype.metricId): Deleted.
875 (ChartPane.prototype.setOverviewDomain): Deleted.
876 (ChartPane.prototype.setMainDomain): Deleted.
877 (ChartPane.prototype._openCommitViewer): Deleted.
878 (ChartPane.prototype._didFetchData): Deleted.
879 (ChartPane.prototype._keyup): Deleted.
881 * public/v3/pages/charts-page.js:
883 (ChartsPage.createDomainForAnalysisTask): Extracted by createDomainForAnalysisTask; used to set the domain
884 of the charts in the analysis task page.
885 (ChartsPage.createStateForAnalysisTask):
887 * public/v3/pages/dashboard-page.js:
889 (DashboardPage.prototype._createChartForCell):
891 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
893 Add the support for maintenance mode
894 https://bugs.webkit.org/show_bug.cgi?id=154072
896 Reviewed by Chris Dumez.
898 Added the crude support for maintenance mode whereby which the reports are stored in the filesystem
899 instead of the database.
901 * config.json: Added maintenanceMode and maintenanceDirectory as well as forgotten siteTitle and
902 remoteServer.httpdMutexDir.
903 * public/api/report.php:
904 (main): Don't connect to the database or modify database when maintenanceMode is set.
905 * public/include/json-header.php:
906 (ensure_privileged_api_data): Exit with InMaintenanceMode when maintenanceMode is set. This prevents
907 privileged API such as creating analysis tasks and new A/B testing groups from modifying the database.
909 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
911 Analysis task page on v3 show progression as regressions
912 https://bugs.webkit.org/show_bug.cgi?id=154045
914 Reviewed by Chris Dumez.
916 The bug was caused by TestGroup.compareTestResults referring to undefined _smallerIsBetter.
917 Retrieve it from the associated metric object via the owner analysis task.
919 * public/v3/models/test-group.js:
921 2016-02-05 Ryosuke Niwa <rniwa@webkit.org>
923 Testing with remote server cache is unusably slow
924 https://bugs.webkit.org/show_bug.cgi?id=153928
926 Reviewed by Chris Dumez.
928 Don't use the single process mode of httpd as it's way too slow even for testing.
929 Also we'll hit a null pointer crash (http://svn.apache.org/viewvc?view=revision&revision=1711479)
931 Since httpd exits immediately when launched in multi-process mode, remote-cache-server.py (renamed from
932 run-with-remote-server.py) now has "start" and "stop" commands to start/stop the Apache. Also added
933 "reset" command to reset the cache for convenience.
935 * Install.md: Updated the instruction.
936 * config.json: Fixed a typo: httpdErro*r*Log.
937 * tools/remote-cache-server.py: Copied from Websites/perf.webkit.org/tools/run-with-remote-server.py.
938 Now takes one of the following commands: "start", "stop", and "reset".
940 (start_httpd): Extracted from main.
942 * tools/remote-server-relay.conf: Removed redundant (duplicate) LoadModule's.
943 * tools/run-with-remote-server.py: Removed.
945 2016-02-04 Ryosuke Niwa <rniwa@webkit.org>
947 Perf dashboard should have a script to setup database
948 https://bugs.webkit.org/show_bug.cgi?id=153906
950 Reviewed by Chris Dumez.
952 Added tools/setup-database.py to setup the database. It retrieves the database name, username, password
953 and initializes a database at the specified location.
955 * Install.md: Updated instruction to setup postgres to use setup-database.py.
956 * tools/setup-database.py: Added.
958 (load_database_config):
959 (determine_psql_dir):
960 (start_or_stop_database):
961 (execute_psql_command):
963 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
965 buildbot syncing scripts sometimes schedule more than one requests per builder
966 https://bugs.webkit.org/show_bug.cgi?id=153047
968 Reviewed by Chris Dumez.
970 The bug was caused by the check for singularity of scheduledRequests being conducted per configuration
971 instead of per builder. So if there were multiple test configurations (e.g. Speedometer and Octane) that
972 both used the same builder, then we may end up scheduling both at once.
974 Fixed the bug by sharing a single set to keep track of the scheduled requests for all configurations per
977 * tools/sync-with-buildbot.py:
978 (load_config): Share a set amongst test configurations for each builder.
979 (find_request_updates): Instead of creating a new set for each configuration, reuse the existing sets to
980 share a single set agmonst test configurations for each builder.
982 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
984 Analysis results viewer sometimes doesn't show the correct relative difference
985 https://bugs.webkit.org/show_bug.cgi?id=152930
987 Reviewed by Chris Dumez.
989 The bug was caused by single A/B testing result associated with multiple rows when there are multiple data
990 points with the same root set which matches that of an A/B testing.
992 Fixed the bug by detecting such a case, and only associating each A/B testing result with the row created
993 for the first matching point.
995 * public/v3/components/analysis-results-viewer.js:
996 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
998 2016-01-08 Ryosuke Niwa <rniwa@webkit.org>
1000 Make v3 UI analysis task page is hard to understand
1001 https://bugs.webkit.org/show_bug.cgi?id=152917
1003 Reviewed by Antti Koivisto.
1005 Add a dark gray border around the selected block in the analysis results viewer instead of using darker
1006 shades since that looks as if they were bigger regression/progression.
1008 Explicitly show "Failed" as the label instead of omitting with "-" when all build requests in an A/B
1009 testing group fails.
1011 * public/v3/components/analysis-results-viewer.js:
1012 (AnalysisResultsViewer.cssTemplate): Tweaked the style to underline text in the hovered blocks and the
1013 selected blocks and show a dark gray border around the selected blocks.
1014 (AnalysisResultsViewer.TestGroupStackingBlock):
1015 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Use this._title for title.
1016 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
1017 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForRootSet): Deleted.
1019 * public/v3/components/results-table.js:
1020 (ResultsTable.prototype.render):
1021 (ResultsTable.prototype._createRevisionListCells): Extracted from ResultsTable.prototype.render.
1022 (ResultsTable.cssTemplate): Tweaked the style.
1024 (ResultsTableRow.prototype.constructor): Added _labelForWholeRow to store the label for the entire row.
1025 This is used to show the comparison result of two root sets (e.g. A vs B).
1026 (ResultsTableRow.prototype.setLabelForWholeRow): Added.
1027 (ResultsTableRow.prototype.labelForWholeRow): Added.
1028 (ResultsTableRow.prototype.resultContent): Extracted from buildHeading. Creates a hyperlinked bar graph
1029 used for each A/B testing result.
1030 (ResultsTableRow.prototype.buildHeading): Deleted since we need to set colspan on the second table cell
1031 when we're creating a row with _labelForWholeRow.
1033 * public/v3/components/test-group-results-table.js:
1034 (TestGroupResultsTable.prototype.buildRowGroups): Added rows to show relative differences and statistical
1035 significance between root sets (e.g. A vs B).
1037 * public/v3/models/build-request.js:
1038 (BuildRequest.prototype.hasCompleted): Added.
1040 * public/v3/models/test-group.js:
1041 (TestGroup.prototype.compareTestResults): Extracted from AnalysisResultsViewer.TestGroupStackingBlock's
1042 _computeTestGroupStatus and generalized to be reused in TestGroupResultsTable.
1043 (TestGroup.prototype._valuesForRootSet): Moved from AnalysisResultsViewer.TestGroupStackingBlock.
1045 * public/v3/pages/analysis-task-page.js:
1046 (AnalysisTaskPage.cssTemplate): Tweaked the style.
1048 2016-01-07 Ryosuke Niwa <rniwa@webkit.org>
1050 Perf dashboard should automatically add aggregators
1051 https://bugs.webkit.org/show_bug.cgi?id=152818
1053 Reviewed by Chris Dumez.
1055 When an aggregator entry is missing in aggregators table, automatically insert it in /api/report.
1057 In a very early version of the perf dashboard, we had the ability to define a custom aggregator
1058 in an admin page. In practice, nobody used or needed this feature so we got rid of it even before
1059 the dashboard was landed into WebKit repository. This patch cleans up that mess.
1062 (main): Added the filtering capability.
1063 (TestEnvironment): Expose the config JSON in the test environment.
1065 * public/include/report-processor.php:
1066 (ReportProcessor): Renamed name_to_aggregator now that it only contains ID.
1067 (ReportProcessor::__construct): No longer fetches the aggregator table. An equivalent work is done
1068 in newly added ensure_aggregators.
1069 (ReportProcessor::process): Calls ensure_aggregators which populates name_to_aggregator_id.
1070 (ReportProcessor::ensure_aggregators): Added. Add the builtin aggregators: Arithmetic, Geometric,
1071 Harmonic, and Total.
1072 (TestRunsGenerator): Renamed name_to_aggregator now that it only contains ID.
1073 (TestRunsGenerator::__construct):
1074 (TestRunsGenerator::add_aggregated_metric): Don't include aggregator_definition here since it's
1075 never used now that all the aggregations are done natively in PHP.
1076 (TestRunsGenerator::$aggregators): Added. We don't include SquareSum since it's only used for
1077 computing run_square_sum_cache in test_runs table and it's useless elsewhere.
1078 (TestRunsGenerator::aggregate_values): Add a comment about that.
1080 * tests/api-report.js: Updated a test case to reflect the change.
1082 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1084 Perf dashboard JSON API should fail gracefully when postgres is down
1085 https://bugs.webkit.org/show_bug.cgi?id=152812
1087 Reviewed by Chris Dumez.
1089 Even though all JSON APIs returned DatabaseConnectionFailure as the status when Database::connect
1090 returned a falsy value, PHP was spitting out warnings and producing HTTP responses that cannot be
1091 parsed as a JSON when pg_connect failed.
1093 Fixed the bug by suppressing warning messages in pg_connect.
1095 * public/include/db.php:
1096 (Database::connect): Use '@' prefix to suppress warning messages.
1098 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1100 Perf dashboard should auto-generate manifest file when one is missing
1101 https://bugs.webkit.org/show_bug.cgi?id=152813
1103 Reviewed by Chris Dumez.
1105 When /data/manifest.json is missing, fall back to newly added /api/manifest instead of
1106 silently failing to show the UI. This will make the initial setup easier.
1108 * public/api/manifest.php: Added.
1110 * public/include/manifest.php:
1111 (Manifest::manifest): Added.
1112 * public/v3/main.js:
1114 (didFetchManifest): Extracted from fetchManifest.
1116 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1118 Commit another forgotten change, this time, for r194653.
1120 * public/v3/models/measurement-set.js:
1122 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1124 The sampling of time series on v3 UI is too aggressive
1125 https://bugs.webkit.org/show_bug.cgi?id=152804
1127 Reviewed by Chris Dumez.
1129 Fixed a bug that we were always halving the number of data points in _sampleTimeSeries
1130 and increased the number of data points allowed to make the sampling less aggressive.
1132 * public/v3/components/time-series-chart.js:
1133 (TimeSeriesChart.prototype._ensureSampledTimeSeries): Increase the number of maximum points
1134 to 2x the number of pixels divided by the radius of each point.
1135 (TimeSeriesChart.prototype._sampleTimeSeries.findMedian): Changed the semantics of endIndex
1136 to mean the index after the last point and renamed it to indexAfterEnd.
1137 (TimeSeriesChart.prototype._sampleTimeSeries): Fixed a bug that this code always coerced two
1138 data points into one sampled data point despite of the fact i and j are sufficiently apart
1139 since data[j].time - data[i].time > timePerSample by definition.
1141 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1143 Commit the forgotten change for r194651.
1145 * public/v3/pages/domain-control-toolbar.js:
1146 (DomainControlToolbar.prototype.setStartTime):
1148 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1150 The right hand side of main chart appears to be cut off as you zoom out on v3 UI
1151 https://bugs.webkit.org/show_bug.cgi?id=152778
1153 Reviewed by Antti Koivisto.
1155 Add a padding on x-axis after the end time to make the main chart more easily interactive.
1157 * public/v3/components/time-series-chart.js:
1158 (TimeSeriesChart.prototype._computeHorizontalRenderingMetrics):
1160 * public/v3/pages/page-with-charts.js:
1161 (PageWithCharts.mainChartOptions): Add a padding of 5px at the end of x-axis.
1163 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1165 v3 UI should use four sig-figs to label y-axis of the main charts
1166 https://bugs.webkit.org/show_bug.cgi?id=152779
1168 Reviewed by Antti Koivisto.
1170 Increase the number of significant figures used in the main charts to four as done in v2 UI.
1172 * public/v3/pages/chart-pane.js:
1173 (ChartPane.constructor): Create a formatter with four significant figures.
1174 * public/v3/pages/page-with-charts.js:
1175 (PageWithCharts.mainChartOptions): Increase the width of y-axis labels.
1177 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1179 v3 UI's time range slider is harder to use than that of v2 UI
1180 https://bugs.webkit.org/show_bug.cgi?id=152780
1182 Reviewed by Antti Koivisto.
1184 Improved the time range slider by using a cubic mapping to time range and providing a text field
1185 to directly edit the number of days to show.
1187 Now an user can enter the text mode to directly edit the number of days to show by clicking on
1188 the number of days (text field is always there with opacity=0).
1190 * public/v3/pages/charts-toolbar.js:
1191 (ChartsToolbar): Store the minimum and maximum number of days allowed. Also rename _inputElement
1192 to _slider and added a new type=number text field as _editor.
1193 (ChartsToolbar.prototype.render):
1194 (ChartsToolbar.prototype.setStartTime): Exit the text mode when the number of days is changed by
1195 an URL state transition (i.e. back/forward navigation).
1196 (ChartsToolbar.prototype._setInputElementValue): Added. Updates the values of _slider and _editor.
1197 (ChartsToolbar.prototype._enterTextMode): Added. Hide the elements used by the slider mode and
1198 show the text field.
1199 (ChartsToolbar.prototype._exitTextMode): Added. Does the opposite.
1200 (ChartsToolbar.prototype._sliderValueMayHaveChanged): Renamed from _inputValueMayHaveChanged.
1201 (ChartsToolbar.prototype._editorValueMayHaveChanged): Added. Similar to _sliderValueMayHaveChanged
1202 but also corrects the value of _editor if needed.
1203 (ChartsToolbar.prototype._callNumberOfDaysCallback): Extracted from _inputValueMayHaveChanged.
1204 Also fixed a bug that we didn't update the URL state when the change event was fired without
1205 modifying the effective number of days.
1206 (ChartsToolbar.cssTemplate): Tweaked the style to support the new mode. Also set a fixed width on
1207 the span showing the number of days in the slider mode.
1209 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1211 Zooming button is broken on v3 UI
1212 https://bugs.webkit.org/show_bug.cgi?id=152777
1214 Reviewed by Chris Dumez.
1216 Bring up the zoom button in z-index so that users can click it.
1218 * public/v3/components/interactive-time-series-chart.js:
1219 (InteractiveTimeSeriesChart.cssTemplate):
1221 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1223 v3 UI doesn't preserve the time range when charts page is opened from a dashboard
1224 https://bugs.webkit.org/show_bug.cgi?id=152776
1226 Reviewed by Chris Dumez.
1228 Fixed the bug by moving the construction of charts URL from DashboardPage.prototype.open to
1229 DashboardPage.prototype.render and re-rendering the entire page upon an URL state transition.
1231 * public/v3/pages/charts-page.js:
1232 (ChartsPage.createStateForDashboardItem): Takes the start time for the charts page.
1234 * public/v3/pages/dashboard-page.js:
1235 (DashboardPage.prototype.updateFromSerializedState): Merged _numberOfDaysDidChange and
1236 _updateChartsDomainFromToolbar into this function since they're not used elsewhere. Also re-render
1237 the entire page when transition between different number of days to show.
1238 (DashboardPage.prototype._numberOfDaysDidChange): Deleted.
1239 (DashboardPage.prototype._updateChartsDomainFromToolbar): Deleted.
1240 (DashboardPage.prototype.render): Construct URL for each charts here.
1241 (DashboardPage.prototype._createChartForCell): Don't construct URL here since this function is
1242 called once when the dashboard page is opened, and not when the time range is changed.
1244 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1246 Build fix for an old version of PHP after r194618.
1248 * public/api/measurement-set.php:
1250 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1252 A/B testing results should be visualized intuitively on v3 UI
1253 https://bugs.webkit.org/show_bug.cgi?id=152496
1255 Rubber-stamped by Chris Dumez.
1257 Add the "stacking block" view of A/B testing results to the analysis task page on v3 UI.
1259 The patch enhances JSON APIs at /api/analysis-task /api/measurement-set/ to reduce the number of
1260 HTTP requests, and adds two UI components: TestGroupResultsTable and AnalysisResultsViewer both
1261 of which inherits from an abstract superclass: ResultsTable.
1263 ResultsTable provides a tabular presentation of measured values in regular measurement sets and
1264 A/B testing results using groups of bar graphs created by BarGraphGroup. TestGroupResultsTable
1265 inherits from this class to display A/B testing configurations and the averaged results for each
1266 configuration, and AnalysisResultsViewer inherits from it to provide an intuitive visualization
1267 of the outcomes of all A/B testing results associated with a given analysis task.
1269 * public/api/analysis-tasks.php:
1270 (main): Add the capability to find the analysis task based on its build request.
1271 This allows /v3/#/analysis/task/?buildRequest=<id> to be hyperlinked on buildbot page.
1273 * public/api/measurement-set.php:
1274 (main): Removed the unused startTime and endTime, and added "analysisTask" to query parameters.
1275 (AnalysisResultsFetcher): Added. Used to fetch measured data associated with every build request
1276 on an analysis task.
1277 (AnalysisResultsFetcher::__construct):
1278 (AnalysisResultsFetcher::fetch): Unlike MeasurementSetFetcher, we fetch the list of commits and
1279 list of measurements separately since there will be a lot less builds and commits than measured
1280 data (since we're fetching measured values for all tests and their metrics).
1281 (AnalysisResultsFetcher::fetch_commits): Fetches commits.
1282 (AnalysisResultsFetcher::format_measurement): Like MeasurementSetFetcher::format_measurement but
1283 with config_type and config_metric since we're returning measured data for all metrics and test
1285 (AnalysisResultsFetcher::format_map): Similar to MeasurementSetFetcher::format_map.
1287 * public/v3/components/analysis-results-viewer.js: Added.
1288 (AnalysisResultsViewer): Added.
1289 (AnalysisResultsViewer.prototype.didUpdateResults): This callback is called by AnalysisTaskPage
1290 when A/B testing results become available.
1291 (AnalysisResultsViewer.prototype.render): Overrides ResultsTable's render to highlight the block
1292 representing the currently selected test group.
1294 (AnalysisResultsViewer.prototype.buildRowGroups): Creates a list of rows with "stacking blocks"
1295 that visualizes A/B testing results. The algorithm works as follows: 1. Create all table rows.
1296 2. Find which row is associated with each set in each test group. 3. Layout "blocks".
1298 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Collects root sets from all data
1299 in the measurement set as well as A/B testing **requests** (results may contain more repositories
1300 than requested but they aren't interesting for the purpose of visualizing results for the entire
1303 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Create table rows. First,
1304 create table rows for measurement set points that have a matching test group (i.e. either set A
1305 or set B of an A/B testing uses the same root set as a point). Second, insert a new row for each
1306 root set in each test group which didn't find a matching measurement set point. There is a little
1307 subtlety that some A/B testing may specify revisions for a subset of repositories and/or some A/B
1308 testing results may appear as if it goes back in time with respect to other A/B testing results.
1309 For example, consider creating two A/B test groups for WebKit changes and OS changes separately.
1310 There could be no coherent linearization of those two A/B testing in which both WebKit and OS
1311 versions move forward.
1313 (AnalysisResultsViewer.RootSetInTestGroup): Added. Represents a pair (test group, root set) since
1314 a root set could be shared by multiple test groups.
1315 (AnalysisResultsViewer.TestGroupStackingBlock): Added. A stacked block representing a test group.
1316 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex): Associates a row number with
1317 either set A or set B.
1318 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Creates a table cell
1320 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Returns true if this test group
1321 has failed and this block should look "thin" without any label.
1322 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus): Computes the
1323 status for this test group.
1325 (AnalysisResultsViewer.TestGroupStackingGrid): Added. AnalysisResultsViewer uses this class to
1326 layout blocks representing test groups.
1327 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.insertBlockToColumn): Inserts a new block
1328 to layout. We keep all test groups doing the same A/B test next to each other.
1329 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.layout): Layouts each block / test group
1330 in the order they are created.
1331 (AnalysisResultsViewer.TestGroupStackingGrid.prototype._layoutBlock): Places the block in the
1332 left-most column that can accommodate it while avoiding columns of a different thin-ness. A column
1333 is thin if its A/B testing has failed, and not thin otherwise.
1334 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.createCellsForRow): Creates table cells for
1335 a given row. For each column, generate a table cell if we're in the first row and the first block
1336 starts in a later row, a block starts in the current row, or the last block ended in the previous
1337 row and the next block or the last row appears later.
1339 * public/v3/components/bar-graph-group.js: Added. A component for showing a group of bar graphs.
1340 (BarGraphGroup): Added. Creates a group of bar graphs with the same value range. It's used by
1341 AnalysisResultsViewer and ResultsTable to show bar graphs to compare values.
1342 (SingleBarGraph): A component created and collectively controlled by BarGraphGroup.
1344 * public/v3/components/results-table.js: Added.
1345 (ResultsTable): An abstract superclass for TestGroupResultsTable and AnalysisResultsViewer.
1347 (ResultsTable.prototype.render): Renders the table. 1. Call "buildRowGroups()" implemented by
1348 a subclass to obtain the list of rows. 2. Compute the list of repositories to show. 3. For each
1349 cell in the table, compute the number of rows to show the same value (for rowspan). 4. Render the
1350 table with an extra list of repositories if exists.
1352 (ResultsTable.prototype._computeRepositoryList): Compute the list of repositories to list
1353 revisions in the table. Omit repositories not present in any row or for which all rows have the
1354 same revision. In the latter case, include it in the extra repositories listed below the table.
1355 This minimizes the amount of redundant information presented to the user.
1357 (ResultsTableRow): Added. Represents a single row in the table. ResultsTable constructs necessary
1358 table cells to tabulate the associated root sets, and shows the associated result using a grouped
1359 bar graph. Additional columns are used by AnalysisResultsViewer to show stacked blocks for A/B
1362 * public/v3/components/test-group-results-table.js: Added.
1363 (TestGroupResultsTable):
1364 (TestGroupResultsTable.prototype.didUpdateResults):
1365 (TestGroupResultsTable.prototype.setTestGroup):
1366 (TestGroupResultsTable.prototype.heading):
1367 (TestGroupResultsTable.prototype.render):
1368 (TestGroupResultsTable.prototype.buildRowGroups):
1370 * public/v3/index.html:
1371 * public/v3/models/analysis-results.js: Added.
1372 (AnalysisResults): Added. Like MeasurementSet, this class represents a set of measured values
1373 associated with a given analysis task.
1374 (AnalysisResults.prototype.find): Returns a measured valued for a given build and metric.
1375 (AnalysisResults.prototype.add): Adds a new measured value. Used by AnalysisResults.fetch.
1376 (AnalysisResults.fetch): Fetches data and creates AnalysisResults for a given analysis task.
1378 * public/v3/models/analysis-task.js:
1379 (AnalysisTask.prototype.startMeasurementId): Added.
1380 (AnalysisTask.prototype.endMeasurementId): Added.
1381 (AnalysisTask.fetchByBuildRequestId): Added.
1382 (AnalysisTask._fetchSubset): Uses DataModelObject.cachedFetch.
1384 * public/v3/models/build-request.js: Added.
1385 (BuildRequest): Added. Represents a single A/B testing request associated with a test group.
1387 * public/v3/models/builder.js:
1388 (Build): Added. Represents a build associated with a given A/B testing result.
1390 * public/v3/models/commit-log.js:
1391 (CommitLog): Made this class inherit from DataModelObject.
1392 (CommitLog.ensureSingleton): Added. Finds the singleton object created for a given revision
1393 in the specified repository. This helps RootSet and other classes compare commits fast.
1394 (CommitLog.prototype.repository): Added.
1395 (CommitLog.fetchBetweenRevisions): Uses CommitLog.ensureSingleton.
1397 * public/v3/models/data-model.js:
1399 (DataModelObject.namedStaticMap): Added.
1400 (DataModelObject.ensureNamedStaticMap): Renamed from namedStaticMap instead of implicitly
1401 assuming that the non-static version always creates the map.
1402 (DataModelObject.prototype.namedStaticMap): Added.
1403 (DataModelObject.cachedFetch): Extracted from AnalysisTask._fetchSubset so that TestGroup's
1404 fetchByTask could also use it.
1407 * public/v3/models/measurement-adaptor.js: Added.
1408 (MeasurementAdaptor): Extracted from MeasurementCluster. This class is responsible for
1409 re-formatting the data received via /api/measurement-set JSON API inside the v3 UI.
1410 (MeasurementAdaptor.prototype.extractId): Added.
1411 (MeasurementAdaptor.prototype.adoptToAnalysisResults): Added. Used by AnalysisResults.
1412 (MeasurementAdaptor.aggregateAnalysisResults): Added. Used by TestGroupResultsTable to
1413 aggregate results for each test configuration; e.g. computing the average for set A.
1414 (MeasurementAdaptor.prototype.adoptToSeries): Extracted from MeasurementCluster.addToSeries.
1415 Added rootSet() to each point. This allows AnalysisResultsViewer to compare them against root
1416 sets associated with A/B testing results.
1417 (MeasurementAdaptor.computeConfidenceInterval): Moved from MeasurementCluster.
1419 * public/v3/models/measurement-cluster.js:
1420 (MeasurementCluster):
1421 (MeasurementCluster.prototype.addToSeries):
1423 * public/v3/models/repository.js:
1424 (Repository.prototype.hasUrlForRevision): Added.
1426 * public/v3/models/root-set.js: Added.
1427 (RootSet): Added. Represents a set of commits in measured results.
1428 (MeasurementRootSet): Added. Ditto for results associated with A/B testing.
1430 * public/v3/models/test-group.js: Added.
1431 (TestGroup): Added. Represents a A/B testing on analysis task.
1432 (TestGroup.prototype.createdAt): Added.
1433 (TestGroup.prototype.buildRequests): Returns the list of build requests associated with this
1435 (TestGroup.prototype.addBuildRequest): Added. Used by BuildRequest's constructor to associate
1436 itself with this group.
1437 (TestGroup.prototype.didSetResult): Added. Called by BuildRequest.setResult when measured
1438 values are fetched and associated with a build request in this group.
1440 * public/v3/models/test.js:
1443 * public/v3/pages/analysis-task-page.js:
1445 (AnalysisTaskPage.prototype.updateFromSerializedState): Fetch the analysis task, test groups
1446 associated with it, and all A/B testing results based on the task id or the build request id
1447 specified in the URL.
1448 (AnalysisTaskPage.prototype._didFetchTask): Added. Start fetching the measured data. This is
1449 the data on charts page for which this analysis task was created, not results of A/B testing.
1450 (AnalysisTaskPage.prototype._didFetchMeasurement): Added. Display the fetched data in a table
1451 inside AnalysisResultsViewer.
1452 (AnalysisTaskPage.prototype._didFetchTestGroups): Added. Display the list of A/B test groups
1453 as well as the results of the first A/B testing.
1454 (AnalysisTaskPage.prototype._didFetchAnalysisResults): Added.
1455 (AnalysisTaskPage.prototype._assignTestResultsIfPossible): Added. Once both the analysis task,
1456 A/B test groups as well as their results are fetched, update build requests in each test group
1458 (AnalysisTaskPage.prototype.render): Show the list of test groups and highlight the currently
1460 (AnalysisTaskPage.prototype._showTestGroup): Added. A callback used by AnalysisResultsViewer
1461 and TestGroupResultsTable to notify this class when the user selects a new test group.
1462 (AnalysisTaskPage.htmlTemplate): Updated the template.
1463 (AnalysisTaskPage.cssTemplate): Ditto.
1465 * public/v3/pages/charts-page.js:
1466 (ChartsPage.createStateForAnalysisTask): Added. Creates a URL state object for opening a chart
1467 associated with an analysis task.
1469 2015-12-22 Ryosuke Niwa <rniwa@webkit.org>
1471 Analysis task page is slow to load
1472 https://bugs.webkit.org/show_bug.cgi?id=152517
1474 Reviewed by Andreas Kling.
1476 The slowness comes from r194130 which made the JSON API at /api/analysis-tasks to report the start
1477 and the end of each analysis task. This query was adding ~2s to the total JSON generation time.
1479 Cache these values on analysis_task table since they never change once an analysis task is created.
1481 * init-database.sql: Added columns task_start_run_time and task_end_run_time to analysis_task table.
1482 Also added the missing drop statements at the top.
1484 * public/api/analysis-tasks.php:
1485 (fetch_and_push_bugs_to_tasks): Don't fetch the latest commit time of the start and the end.
1486 (format_task): Report task_start_run_time and task_end_run_time as startRunTime and endRunTime.
1488 * public/privileged-api/create-analysis-task.php:
1489 (main): Set start_run_time and end_run_time when creating an analysis task.
1490 (time_for_run): Added.
1492 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1494 v3 UI shouldn't open/close pane selector by mouseenter/leave
1495 https://bugs.webkit.org/show_bug.cgi?id=152399
1497 Reviewed by Andreas Kling.
1499 Removed the code to open and close the pane selector by mouseenter and mouseleave
1500 since multiple people have complained about the behavior.
1502 * public/v3/pages/charts-toolbar.js:
1503 (ChartsToolbar): Removed the event listeners.
1504 (ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
1505 to better support the use case of adding multiple panes.
1506 (ChartsToolbar.cssTemplate): Tweaked CSS.
1508 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1510 Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
1511 https://bugs.webkit.org/show_bug.cgi?id=152389
1513 Reviewed by Darin Adler.
1515 Compute the x coordinate of the popover from the center of each annotation bar.
1517 Also adjust the x coordinate to keep the popover within the charts.
1519 * public/v3/components/interactive-time-series-chart.js:
1520 (InteractiveTimeSeriesChart.prototype._renderChartContent):
1522 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1524 Dashboard charts should have uniform widths on v3 UI
1525 https://bugs.webkit.org/show_bug.cgi?id=152395
1527 Reviewed by Chris Dumez.
1529 Fix the bug by applying table-layout: fixed on the dashboard table.
1531 * public/v3/pages/dashboard-page.js:
1532 (DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
1533 (DashboardPage.cssTemplate): Adjusted CSS accordingly.
1535 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1537 Closing a pane on v3 UI always closes the last pane
1538 https://bugs.webkit.org/show_bug.cgi?id=152388
1540 Reviewed by Chris Dumez.
1542 The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
1543 Fixed it by passing in "this" pane object to the first argument.
1545 * public/v3/pages/chart-pane.js:
1548 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1550 Perf Dashboard v3 UI doesn't show recent data points on v2 UI
1551 https://bugs.webkit.org/show_bug.cgi?id=152368
1553 Reviewed by Chris Dumez.
1555 The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
1556 which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
1557 to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
1559 !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
1561 Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
1563 * public/api/measurement-set.php:
1564 (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
1565 * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
1566 of the last modified date depends on when tests run, we can't assert it to be a certain value.
1568 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1570 v3 UI should show and link the build number on charts page
1571 https://bugs.webkit.org/show_bug.cgi?id=152359
1573 Reviewed by Chris Dumez.
1575 Show the hyperlinked build number in the v3 UI.
1577 * public/v3/models/builder.js:
1578 (Builder): Renamed _buildURL to _buildUrlTemplate.
1579 (Builder.prototype.urlForBuild): Added.
1580 * public/v3/pages/chart-pane-status-view.js:
1581 (ChartPaneStatusView):
1582 (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
1583 (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
1584 if the current point is set by an indicator (not by a selection).
1586 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1588 v3 dashboard doesn't stretch charts to fill the screen
1589 https://bugs.webkit.org/show_bug.cgi?id=152354
1591 Reviewed by Chris Dumez.
1593 The bug was caused by a workaround to avoid canvas stretching table cell too much.
1595 Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
1596 so that it does not contribute to the intrinsic/natural width of the cell.
1598 * public/v3/components/time-series-chart.js:
1599 (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
1600 (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
1601 the canvas does not resize with it.
1602 * public/v3/pages/dashboard-page.js:
1603 (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
1605 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1607 The chart status on v3 UI sometimes show wrong revision ranges
1608 https://bugs.webkit.org/show_bug.cgi?id=152331
1610 Reviewed by Chris Dumez.
1612 The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
1613 when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
1614 finds the sampled data point immediately preceding the current point (at which the indicator is shown).
1616 * public/v3/components/chart-status-view.js:
1617 (ChartStatusView.prototype.updateStatusIfNeeded):
1619 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1621 Perf dashboard's cycler page should use v3 UI
1622 https://bugs.webkit.org/show_bug.cgi?id=152324
1624 Reviewed by Chris Dumez.
1626 Use the v3 UI in cycler.html after r194130.
1628 * public/cycler.html:
1629 * public/v3/index.html: Removed the reference to a non-existent platform-selector.js.
1631 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1633 Add v3 UI to perf dashboard
1634 https://bugs.webkit.org/show_bug.cgi?id=152311
1636 Reviewed by Chris Dumez.
1638 Add the third iteration of the perf dashboard UI. UI for viewing and modifying analysis tasks is coming soon.
1639 The v3 UI is focused on speed, and removes all third-party script dependencies including jQuery, d3, and Ember.
1640 Both the DOM-based UI and graphing are implemented manually.
1643 The entire app is structured using new component library implemented in components/base.js. Each component is
1644 an instance of a subclass of ComponentBase which owns a single DOM element. Each subclass may supply static
1645 methods named htmlTemplate and cssTemplate as the template for a component instance. ComponentBase automatically
1646 clones the templates inside the associated element (or its shadow root on the supported browsers). Each subclass
1647 must supply a method called "render()" which constructs and updates the DOM as needed.
1649 There is a special component called Page, which represents an entire page. Each Page is opened by PageRouter's
1650 "route()" function. Each subclass of Page supplies "open()" for initialization and "updateFromSerializedState()"
1651 for a hash URL transition.
1654 The key feature of the v3 UI is the split of time series into chunks called clusters (see r194120). On an internal
1655 instance of the dashboard, the v2 UI downloads 27MB of data whereas the same page loads only 3MB of data in the v3.
1656 The key logic for fetching time series in chunks is implemented by MeasurementSet in /v3/models/measurement-set.js.
1657 We first fetch the cached primary cluster (the cluster that contains the newest data) at:
1658 /data/measurement-set-<platform-id>-<metric-id>.json
1660 If that's outdated according to lastModified in manifest.json, then we immediately re-fetch the primary cluster at:
1661 /api/measurement-set/?platform=<platform-id>&metric=<metric-id>
1663 Once the up-to-date primary cluster is fetched, we fetch all "secondary" clusters. For each cluster being fetched,
1664 including the primary, we invoke registered callbacks.
1667 In addition, the v3 UI reduces the initial page load time by loading a single bundled JS file generated by
1668 tools/bundle-v3-scripts.py. index.html has a fallback to load all 44 JS files individually during development.
1670 * public/api/analysis-tasks.php:
1671 (fetch_and_push_bugs_to_tasks): Added the code to fetch start and end run times. This is necessary in V3 UI
1672 because no longer fetch the entire time series. See r194120 for the new measurement set JSON API.
1673 (format_task): Compute the category of an analysis task based on "result" value. This will be re-vamped once
1674 I add the UI for the analysis task page in v3.
1676 * public/include/json-header.php:
1677 (require_format): CamelCase the name.
1678 (require_match_one_of_values): Ditto.
1679 (validate_arguments): Renamed from require_existence_of and used in measurement-set.php landed in r194120.
1682 * public/v3/components: Added.
1684 * public/v3/components/base.js: Added.
1685 (ComponentBase): The base component class.
1686 (ComponentBase.prototype.element): Returns the DOM element associated with the DOM element.
1687 (ComponentBase.prototype.content): Returns the shadow root if one exists and the associated element otherwise.
1688 (ComponentBase.prototype.render): To be implemented by a subclass.
1689 (ComponentBase.prototype.renderReplace): A helper function to "render" DOM contents.
1690 (ComponentBase.prototype._constructShadowTree): Called inside the constructor to instantiate the templates.
1691 (ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Instantiates components referred by
1692 its element name inside the instantiated content.
1693 (ComponentBase.isElementInViewport): A helper function. Returns true if the element is in the viewport and it has
1694 non-zero width and height.
1695 (ComponentBase.defineElement): Defines a custom element that can be automatically instantiated from htmlTemplate.
1696 (ComponentBase.createElement): A helper function to create DOM tree to be used in "render()" method.
1697 (ComponentBase._addContentToElement): A helper for "createElement".
1698 (ComponentBase.createLink): A helper function to create a hyperlink or another clickable element (via callback).
1699 (ComponentBase.createActionHandler): A helper function to create an event listener that prevents the default action
1700 and stops the event propagation.
1702 * public/v3/components/button-base.js: Added.
1704 * public/v3/components/chart-status-view.js: Added.
1705 (ChartStatusView): A component that reports the current status of time-series-chart. It's subclasses by
1706 ChartPaneStatusView to provide additional information in the charts page's panes.
1708 * public/v3/components/close-button.js: Added.
1710 * public/v3/components/commit-log-viewer.js: Added.
1711 (CommitLogViewer): A component that lists commit revisions along with commit messages for a range of data points.
1713 * public/v3/components/interactive-time-series-chart.js: Added.
1714 (InteractiveTimeSeriesChart): A subclass of InteractiveTimeSeriesChart with interactivity (selection & indicator).
1715 Selection and indicator are mutually exclusive.
1717 * public/v3/components/pane-selector.js: Added.
1718 (PaneSelector): A component for selecting (platform, metric) pair to add in the charts page.
1720 * public/v3/components/spinner-icon.js: Added.
1722 * public/v3/components/time-series-chart.js: Added.
1723 (TimeSeriesChart): A canvas-based chart component without interactivity. It takes a source list and options as
1724 the constructor arguments. A source list is a list of measurement sets (measurement-set.js) with drawing options.
1725 This component fetches data via MeasurementSet.fetchBetween inside TimeSeriesChart.prototype.setDomain and
1726 progressively updates the charts as more data arrives. The canvas is updated on animation frame via rAF and all
1727 layout and rendering metrics are lazily computed in _layout. In addition, this component samples data before
1728 rendering the chart when there are more data points per pixel in _ensureSampledTimeSeries.
1730 * public/v3/index.html: Added. Loads bundled-scripts.js if it exists, or individual script files otherwise.
1732 * public/v3/instrumentation.js: Added. This class is used to gather runtime statistics of v3 UI. (It measures
1733 the performance of the perf dashboard UI).
1735 * public/v3/main.js: Added. Bootstraps the app.
1739 * public/v3/models: Added.
1740 * public/v3/models/analysis-task.js: Added.
1741 * public/v3/models/bug-tracker.js: Added.
1742 * public/v3/models/bug.js: Added.
1743 * public/v3/models/builder.js: Added.
1744 * public/v3/models/commit-log.js: Added.
1745 * public/v3/models/data-model.js: Added.
1746 (DataModelObject): The base class for various data objects that correspond to database tables. It supplies static
1747 hash map to find entries by id as well as other keys.
1748 (LabeledObject): A subclass of DataModelObject with the capability to find an object via its name.
1750 * public/v3/models/measurement-cluster.js: Added.
1751 (MeasurementCluster): Represents a single cluster or a chunk of data in a measurement set.
1753 * public/v3/models/measurement-set.js: Added.
1754 (MeasurementSet): Represents a measurement set.
1755 (MeasurementSet.findSet): Returns the singleton set given (metric, platform). We use singleton to avoid issuing
1756 multiple HTTP requests for the same JSON when there are multiple TimeSeriesChart that show the same graph (e.g. on
1757 charts page with overview and main charts).
1758 (MeasurementSet.prototype.findClusters): Finds the list of clusters to fetch in a given time range.
1759 (MeasurementSet.prototype.fetchBetween): Fetch clusters for a given time range and calls callback whenever new data
1760 arrives. The number of callbacks depends on the how many clusters need to be newly fetched.
1761 (MeasurementSet.prototype._fetchSecondaryClusters): Fetches non-primary (non-latest) clusters.
1762 (MeasurementSet.prototype._fetch): Issues a HTTP request to fetch a cluster.
1763 (MeasurementSet.prototype._didFetchJSON): Called when a cluster is fetched.
1764 (MeasurementSet.prototype._failedToFetchJSON): Called when the fetching of a cluster has failed.
1765 (MeasurementSet.prototype._invokeCallbacks): Invokes callbacks upon an approval of a new cluster.
1766 (MeasurementSet.prototype._addFetchedCluster): Adds the newly fetched cluster in the order.
1767 (MeasurementSet.prototype.fetchedTimeSeries): Returns a time series that contains data from all clusters that have
1769 (TimeSeries.prototype.findById): Additions to TimeSeries defined in /v2/data.js.
1770 (TimeSeries.prototype.dataBetweenPoints): Ditto.
1771 (TimeSeries.prototype.firstPoint): Ditto.
1773 * public/v3/models/metric.js: Added.
1774 * public/v3/models/platform.js: Added.
1775 * public/v3/models/repository.js: Added.
1776 * public/v3/models/test.js: Added.
1778 * public/v3/pages: Added.
1779 * public/v3/pages/analysis-category-page.js: Added. The "Analysis" page that lists the analysis tasks.
1780 * public/v3/pages/analysis-category-toolbar.js: Added. The toolbar to filter analysis tasks based on its category
1781 (unconfirmed, bisecting, identified, closed) and a keyword.
1783 * public/v3/pages/analysis-task-page.js: Added. Not implemented yet. It just has the hyperlink to the v2 UI.
1785 * public/v3/pages/chart-pane-status-view.js: Added.
1786 (ChartPaneStatusView): A subclass of ChartStatusView used in the charts page. In addition to the current value,
1787 comparison to baseline/target, it shows the list of repository revisions (e.g. WebKit revision, OS version).
1789 * public/v3/pages/chart-pane.js: Added.
1790 (ChartPane): A component a pane in the charts page. Each pane has the overview chart and the main chart. The zooming
1791 is synced across all panes in the charts page.
1793 * public/v3/pages/charts-page.js: Added. Charts page.
1794 * public/v3/pages/charts-toolbar.js: Added. The toolbar to set the number of days to show. This affects the overview
1795 chart's domain in each pane.
1797 * public/v3/pages/create-analysis-task-page.js: Added.
1798 (CreateAnalysisTaskPage): A page that gets shown momentarily while creating a new analysis task.
1800 * public/v3/pages/dashboard-page.js: Added. A dashboard page.
1801 * public/v3/pages/dashboard-toolbar.js: Added. Its toolbar with buttons to select the number of days to show.
1802 * public/v3/pages/domain-control-toolbar.js: Added. An abstract superclass of charts and dashboard toolbars.
1804 * public/v3/pages/heading.js: Added. A component for displaying the header and toolbar, if exists, on each page.
1805 * public/v3/pages/page-router.js: Added. This class is responsible for updating the URL hashes as well as opening
1806 and updating each page when the hash changes (via back/forward navigation).
1807 * public/v3/pages/page-with-charts.js: Added. An abstract subclass of page used by dashboards and charts page.
1808 Supplies helper functions for creating TimeSeriesChart options.
1809 * public/v3/pages/page-with-heading.js: Added. An abstract subclass of page that uses the heading component.
1810 * public/v3/pages/page.js: Added. The Page component.
1811 * public/v3/pages/toolbar.js: Added. An abstract toolbar component.
1813 * public/v3/remote.js: Added.
1814 (getJSON): Fetches JSON from the remote server.
1815 (getJSONWithStatus): Ditto. Rejects the response if the status is not "OK".
1816 (PrivilegedAPI.sendRequest): Posts a HTTP request to a privileged API in /privileged-api/.
1817 (PrivilegedAPI.requestCSRFToken): Creates a new CSRF token to request a privileged API post.
1819 * tools/bundle-v3-scripts.py: Added.
1820 (main): Bundles js files together and minifies them by jsmin.py for the v3 UI. Without this script, we're forced to
1821 download 44 JS files or making each JS file contain multiple classes.
1823 * tools/jsmin.py: Copied from WebInspector / JavaScriptCore code.
1825 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1827 Fix v2 UI after r194093.
1829 * public/v2/data.js:
1831 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1833 Add /api/measurement-set for v3 UI
1834 https://bugs.webkit.org/show_bug.cgi?id=152312
1836 Rubber-stamped by Chris Dumez.
1838 The new API JSON allows the front end to fetch measured data in chunks called a "cluster" as specified
1839 in config.json for each measurement set specified by the pair of a platform and a metric.
1841 When the front end needs measured data in a given time range (t_0, t_1) for a measurement set, it first
1842 fetches the primary cluster by /api/measurement-set/?platform=<platform-id>&metric=<metric-id>.
1843 The primary cluster is the last cluster in the set (returning the first cluster here is not useful
1844 since we don't typically show very old data), and provides the information needed to fetch other clusters.
1846 Fetching the primary cluster also creates JSON files at:
1847 /data/measurement-set-<platform-id>-<metric-id>-<cluster-end-time>.json
1848 to allow latency free access for secondary clusters. The front end code can also fetch the cache of
1849 the primary cluster at: /data/measurement-set-<platform-id>-<metric-id>.json.
1851 Because the front end code has to behave as if all data is fetched, each cluster contains one data point
1852 immediately before the first data point and one immediately after the last data point. This avoids having
1853 to fetch multiple empty clusters for manually specified baseline data. To support this behavior, we generate
1854 all clusters for a given measurement set at once when the primary cluster is requested.
1856 Furthermore, all measurement sets are divided at the same time into clusters so that the boundary of clusters
1857 won't shift as more data are reported to the server.
1859 * config.json: Added clusterStart and clusterSize as options.
1860 * public/api/measurement-set.php: Added.
1862 (MeasurementSetFetcher::__construct):
1863 (MeasurementSetFetcher::fetch_config_list): Finds configurations that belongs to this (platform, metric) pair.
1864 (MeasurementSetFetcher::at_end): Returns true if we've reached the end of all clusters for this set.
1865 (MeasurementSetFetcher::fetch_next_cluster): Generates the JSON data for the next cluster. We generate clusters
1866 in increasing chronological order (the oldest first and the newest last).
1867 (MeasurementSetFetcher::execute_query): Executes the main query.
1868 (MeasurementSetFetcher::format_map): Returns the mapping of a measurement field to an array index. This removes
1869 the need to have key names for each measurement and reduces the JSON size by ~10%.
1870 (MeasurementSetFetcher::format_run): Creates an array that contains data for a single measurement. The order
1871 matches that of keys in format_map.
1872 (MeasurementSetFetcher::parse_revisions_array): Added. Copied from runs.php.
1873 * tests/api-measurement-set.js: Added. Added tests for /api/measurement-set.
1875 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1877 Using fake timestamp in OS version make some results invisible
1878 https://bugs.webkit.org/show_bug.cgi?id=152289
1880 Reviewed by Stephanie Lewis.
1882 Fix various bugs after r194088.
1884 * public/api/commits.php:
1885 (format_commit): Include the commit order.
1886 * public/v2/data.js:
1887 (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
1888 * tools/pull-os-versions.py:
1889 (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
1890 (available_builds_from_command): Exit early when an exception is thrown.
1892 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1894 Fix a typo in the previous commit.
1896 * public/include/report-processor.php:
1898 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1900 Build fix after r192965. Suppress a warning about log being referred to as a closure variable.
1902 * public/include/report-processor.php:
1904 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1906 Using fake timestamp in OS version make some results invisible
1907 https://bugs.webkit.org/show_bug.cgi?id=152289
1909 Reviewed by Stephanie Lewis.
1911 Added commit_order column to explicitly order OS versions. This fixes the bug whereby which
1912 baseline results reported with only OS versions are shown with x coordinate set to 10 years ago.
1914 To migrate the existing database, run:
1915 ALTER TABLE commits ADD COLUMN commit_order integer;
1916 CREATE INDEX commit_order_index ON commits(commit_order);
1918 Then for each repository $1,
1919 UPDATE commits SET (commit_time, commit_order) = (NULL, CAST(EXTRACT(epoch from commit_time) as integer))
1920 WHERE commit_repository = $1;
1923 * init-database.sql: Added the column.
1924 * public/api/commits.php:
1925 (fetch_commits_between): Use commit_order to order commits when commit_time is missing.
1926 * public/api/report-commits.php:
1927 (main): Set commit_order.
1928 * tools/pull-os-versions.py:
1929 (OSBuildFetcher.fetch_and_report_new_builds):
1930 (OSBuildFetcher._assign_order): Renamed from _assign_fake_timestamps. Set the order instead of a fake timestmap.
1932 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1934 Perf dashboard can't merge when the destination platform is missing baseline/target
1935 https://bugs.webkit.org/show_bug.cgi?id=152286
1937 Reviewed by Stephanie Lewis.
1939 The bug was caused by the query to migrate test configurations to new platform checking
1940 configuration type and metric separately; that is, it assumes the configuration exists
1941 only if either the same type or the same metric exists in the destination.
1943 Fixed the bug by checking both conditions simultaneously for each configuration.
1945 * public/admin/platforms.php:
1946 * tests/admin-platforms.js: Added a test.
1948 2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
1950 Perf dashboard's buildbot sync config JSON duplicates too much information
1951 https://bugs.webkit.org/show_bug.cgi?id=152196
1953 Reviewed by Stephanie Lewis.
1955 Added shared, per-builder, and per-test (called type) configurations.
1957 * tools/sync-with-buildbot.py:
1959 (load_config.merge):
1961 2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
1963 Perf dashboard should avoid overflow during geometric mean computation
1964 https://bugs.webkit.org/show_bug.cgi?id=151773
1966 Reviewed by Chris Dumez.
1968 * public/include/report-processor.php:
1970 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
1972 Perf dashboard should extend baseline and target to the future
1973 https://bugs.webkit.org/show_bug.cgi?id=151511
1975 Reviewed by Darin Adler.
1977 * public/v2/data.js:
1978 (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
1979 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
1980 (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
1981 (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
1982 * public/v2/manifest.js:
1983 (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
1985 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
1987 Perf dashboard should always show comparison to baseline and target even if one is missing
1988 https://bugs.webkit.org/show_bug.cgi?id=151510
1990 Reviewed by Darin Adler.
1992 Show the comparison status against the baseline when baseline is present but target is missing.
1994 To make the code more readable, this patch splits the logic into three cases:
1995 1. Both baseline and target are present
1996 2. Only baseline is present
1997 3. Only target is present
1999 Also extracted a helper function to construct the label.
2002 (.labelForDiff): Added.
2003 (App.Pane.computeStatus):
2005 2015-11-23 Commit Queue <commit-queue@webkit.org>
2007 Unreviewed, rolling out r192716 and r192717.
2008 https://bugs.webkit.org/show_bug.cgi?id=151582
2010 The patch was incorrect. We always need at least one data
2011 point in each configuration (Requested by rniwa on #webkit).
2013 Reverted changesets:
2015 "Perf dashboard's should not include results more than 366
2017 https://bugs.webkit.org/show_bug.cgi?id=151529
2018 http://trac.webkit.org/changeset/192716
2020 "Build fix for old version of PHP."
2021 http://trac.webkit.org/changeset/192717
2023 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2025 Build fix for old version of PHP.
2027 * public/api/runs.php:
2029 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2031 Perf dashboard's should not include results more than 366 days old in JSON
2032 https://bugs.webkit.org/show_bug.cgi?id=151529
2034 Reviewed by Timothy Hatcher.
2036 Don't return results more than 366 days old in /api/runs/ JSON API.
2037 This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.
2039 * public/api/runs.php:
2040 (main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
2041 Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
2042 of doing so will be included in elapsedTime.
2043 (RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
2044 (RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
2045 (RunsGenerator::parse_revisions_array): Compute the max of commit times.
2047 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2049 Remove chartPointRadius from interactive chart component
2050 https://bugs.webkit.org/show_bug.cgi?id=151480
2052 Reviewed by Darin Adler.
2054 Replaced the parameter by CSS rules.
2056 * public/v2/chart-pane.css:
2058 (.chart .dot.foreground):
2059 (.chart .highlight):
2061 * public/v2/index.html:
2062 * public/v2/interactive-chart.js:
2063 (App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
2064 (App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):
2066 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
2068 Perf dashboard's runs API uses more than 128MB of memory
2069 https://bugs.webkit.org/show_bug.cgi?id=151478
2071 Reviewed by Andreas Kling.
2073 Don't fetch all query results at once to avoid using twice as much memory as needed.
2074 Use iterative API to format each result at a time.
2076 This change is also a 5% runtime performance gain.
2078 * public/api/runs.php:
2079 (RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
2080 no longer needed as we pass in each configuration type explicitly to fetch_runs.
2081 (RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
2082 Also moved the logic to compute the last modified time here.
2083 (RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
2084 (RunsGeneratorForTestGroup):
2085 (RunsGeneratorForTestGroup::__construct):
2086 (RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.
2088 * public/include/db.php:
2089 (generate_data_file): Lock the file to avoid corruption.
2091 2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
2093 Perf dashboard always fetches charts JSON twice
2094 https://bugs.webkit.org/show_bug.cgi?id=151483
2096 Reviewed by Andreas Kling.
2098 Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
2099 obsolete (shouldRefetch is set true) or corrupt (the second closure).
2104 2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
2106 Internal perf dashboard takes forever to load
2107 https://bugs.webkit.org/show_bug.cgi?id=151430
2109 Rubber-stamped by Antti Koivisto.
2111 Fix a few performance problems with the perf dashboard v2 UI.
2114 (App.DashboardRow._createPane): Set "inDashboard" to true.
2115 (App.Pane._fetch): Immediately show the cached chart instead of waiting for the refetched data which invokes
2116 a PHP JSON API. Also don't fetch the analysis tasks when the chart is shown in the dashboard since we don't
2117 show annotate charts in the dashboard.
2119 2015-10-15 Ryosuke Niwa <rniwa@webkit.org>
2121 Unreviewed fix of a test after r190687.
2123 * tests/admin-regenerate-manifest.js:
2125 2015-10-12 Ryosuke Niwa <rniwa@webkit.org>
2127 Perf dashboard tools shouldn't require server credentials in multiple configuration files
2128 https://bugs.webkit.org/show_bug.cgi?id=149994
2130 Reviewed by Chris Dumez.
2132 Made detect-changes.js and pull-svn.py pull username and passwords from the server config JSON to reduce
2133 the number of JSON files that need to include credentials.
2135 Also made each script reload the server config after sleep to allow dynamic credential updates.
2137 In addition, change the server config JSON's format to include scheme, host, and port numbers separately
2138 instead of a url since detect-changes.js needs each value separately.
2140 This reduces the number of JSONs with credentials to two for our internal dashboard.
2142 * tools/detect-changes.js:
2143 (main): Added a property argument parsing. Now takes --server-config-json, --change-detection-config-json,
2144 and --seconds-to-sleep like other scripts.
2145 (parseArgument): Added.
2146 (fetchManifestAndAnalyzeData): Reload the server config JSON.
2147 (loadServerConfig): Added. Set settings.perfserver and settings.slave from the server config JSON. Also
2148 add settings.perfserver.host to match the old format.
2149 (configurationsForTesting): Fixed a bug that we throw an exception when a dashboard contains an empty cell.
2151 * tools/pull-os-versions.py:
2152 (main): Use load_server_config after each sleep.
2154 * tools/pull-svn.py:
2155 (main): Use load_server_config after each sleep.
2156 (fetch_commits_and_submit): Use the perf dashboard's auth as subversion credential when useServerAuth is set.
2158 * tools/sync-with-buildbot.py:
2159 (main): Use load_server_config after each sleep.
2162 (load_server_config): Extracted from python scripts. Computes server's url from scheme, host, and port number
2163 to match the old format python scripts except.
2165 2015-10-11 Ryosuke Niwa <rniwa@webkit.org>
2167 Build fix after r190817. Now that pull-os-versions store fake timestamps, we need to bypass timestamp
2168 checks for OS versions when bots try to report new results. Otherwise, we fail to process the reports
2169 with a MismatchingCommitTime error.
2171 * public/include/report-processor.php:
2172 (ReportProcessor::resolve_build_id):
2174 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2176 Perf dashboard erroneously shows an old OS build in A/B testing range
2177 https://bugs.webkit.org/show_bug.cgi?id=149942
2179 Reviewed by Darin Adler.
2181 Ordering OS builds lexicologically turned out be a bad idea since 15A25 falls between 15A242 and 15A251.
2182 Use a fake/synthetic timestamp to force the commonly understood total order instead.
2184 Refactored pull-os-versions.py to share the server config JSON with other scripts. Also made the script
2185 support pulling multiple sources; e.g. both OS X and iOS.
2187 Also removed superfluous feature to submit results in chunks. The perf dashboard can handle thousands of
2188 revisions being submitted at once just fine.
2190 * public/api/commits.php:
2191 (main): A partial revert of r185574 since we no longer need to order builds lexicologically.
2193 * tools/pull-os-versions.py:
2194 (main): Takes --os-config-json, --server-config-json, and --seconds-to-sleep as arguments instead of
2195 a single --config argument to share the server config JSON with other scripts.
2196 (OSBuildFetcher): Extracted out of main. This class is instantiated for each OS kind (e.g. OS X).
2197 (OSBuildFetcher.__init__): Added.
2198 (OSBuildFetcher._fetch_available_builds): Extracted out of main. Fetches available builds from a website
2200 (OSBuildFetcher.fetch_and_report_new_builds): Extracted out of main. Submits the fetched builds after
2201 filtering out the ones we've already reported.
2202 (OSBuildFetcher._assign_fake_timestamps): Creates a fake timestamp to establish a total order amongst each
2203 OS X / iOS style build number such as 12A3456b.
2205 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2207 pull-svn.py fails to sync revisions when SVN credentials is not setup
2208 https://bugs.webkit.org/show_bug.cgi?id=149941
2210 Reviewed by Chris Dumez.
2212 Added the support for specifying subversion credentials.
2214 Also added the support for pulling from multiple subversion servers. Subversion servers are specified
2215 in a JSON configuration file specified by --svn-config formatted as follows:
2220 "url": "http://svn.webkit.org/repository/webkit",
2221 "username": "webkitten",
2222 "password": "webkitten's password",
2223 "trustCertificate": true,
2224 "accountNameFinderScript":
2225 ["python", "/Volumes/Data/WebKit/Tools/Scripts/webkit-patch", "find-users"]
2230 In addition, refactored it to use the shared server config JSON for the dashboard access.
2232 * tools/pull-svn.py:
2233 (main): Now takes --svn-config-json, --server-config-json, --seconds-to-sleep and --max-fetch-count
2234 as required options instead of seven unnamed arguments.
2235 (fetch_commits_and_submit): Extracted from main. Fetches at most max_fetch_count new revisions from
2236 the subversion server, and submits them in accordance with server_config.
2237 (fetch_commit_and_resolve_author): Now takes a single repository dictionary instead of two separate
2238 arguments for name and URL to pass down the repository's authentication info to fetch_commit.
2239 (fetch_commit): Ditto. Add appropriate arguments when username and passwords are specified.
2240 (resolve_author_name_from_account): Use a list argument instead of a single string argument now that
2241 the argument comes from a JSON instead of sys.argv.
2243 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2245 Unreviewed race condition fix. Exit early when xScale or yScale is not defined.
2247 * public/v2/interactive-chart.js:
2248 (App.InteractiveChartComponent._updateRangeBarRects):
2250 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2252 Add a page that cycles through v2 dashboards
2253 https://bugs.webkit.org/show_bug.cgi?id=149907
2255 Reviewed by Chris Dumez.
2257 Add cycler.html that goes through each dashboard on v2 UI.
2259 This allows the dashboards to be cycled through on a TV screen.
2261 * public/cycler.html: Added.
2262 (loadURLAt): Appends a new iframe to load the next URL (i is the index of the dashboard to be shown)
2263 at the end of body. We don't immediately show the new iframe since it might take a while to load.
2264 (showNewFrameIfLoaded): Remove the current iframe and show the next iframe if the next dashboard has
2265 finished loading. We can't rely on DOMContentLoaded or load events because we use asynchronous XHR to
2266 load each chart's data. Instead, wait until some chart becomes available or fails to load and none of
2267 charts are still in progress to be shown.
2269 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2271 Allow custom revisions to be specified in A/B testing
2272 https://bugs.webkit.org/show_bug.cgi?id=149905
2274 Reviewed by Chris Dumez.
2276 Allow custom revision number on each "repository" when creating a test group.
2278 * public/v2/app.css:
2279 (form .analysis-group [name=customValue]): Added.
2282 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
2283 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
2284 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
2285 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
2286 revision option is selected.
2288 * public/v2/index.html: Added a text field for specifying a custom revision number.
2290 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2292 Make the site name configurable in perf dashboard
2293 https://bugs.webkit.org/show_bug.cgi?id=149894
2295 Reviewed by Chris Dumez.
2297 Added "siteTitle" as a new configuration key to specify the site name.
2299 * public/include/db.php:
2300 (config): Now takes the default value as an argument.
2301 * public/include/manifest.php:
2302 (ManifestGenerator::generate): Include siteTitle in the manifest.
2303 * public/index.html: Update the title and the heading when the manifest is loaded.
2304 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
2305 * public/v2/manifest.js:
2306 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
2308 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2310 Perf dashboard doesn't show analysis tasks anchored at outliers
2311 https://bugs.webkit.org/show_bug.cgi?id=149870
2313 Reviewed by Chris Dumez.
2315 The bug was caused by the computation of start and end times of analysis tasks being dependent on
2316 time series provided to the interactive chart component even though they are already filtered.
2318 Since the interactive chart component shouldn't be messing with the underlying data models, moved
2319 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
2320 the unfiltered time series newly exposed on ChartData.
2322 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
2324 * public/admin/fetch-from-remote.php:
2325 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
2326 and Ember can start hanging browsers (took me three hours to debug this).
2329 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
2330 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
2331 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
2332 Filter the results manually instead.
2333 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
2334 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
2335 need to call a private method on it.
2336 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
2337 This will cause chartData to be modified so just exit early and wait for getting called again.
2339 * public/v2/interactive-chart.js:
2340 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
2343 * public/v2/manifest.js:
2344 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
2345 to compute the end points of analysis tasks when their end points are outliers.
2347 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2349 Unreviewed. Fix a typo in r190645.
2351 * public/include/db.php:
2353 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2355 V2 UI shouldn't sort dashboards lexicologically
2356 https://bugs.webkit.org/show_bug.cgi?id=149856
2358 Reviewed by Chris Dumez.
2360 Don't sort the dashboards by name in App.Manifest.
2363 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
2364 * public/v2/manifest.js:
2365 (App.Manifest.._fetchedManifest):
2367 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2369 V2 UI fails to show the data for the very first point in charts
2370 https://bugs.webkit.org/show_bug.cgi?id=149857
2372 Reviewed by Chris Dumez.
2374 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
2375 Explicitly check the type of this property instead.
2377 * public/v2/data.js:
2378 (TimeSeries.prototype.seriesBetweenPoints):
2380 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2382 Perf dashboard should have the capability to test local UI with production data
2383 https://bugs.webkit.org/show_bug.cgi?id=149834
2385 Reviewed by Chris Dumez.
2387 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
2389 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
2391 * config.json: Added remote server configurations.
2392 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
2393 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
2396 * public/include/db.php:
2397 (config_path): Extracted from generate_data_file.
2398 (generate_data_file):
2399 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
2400 run-with-remote-server.py.
2401 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
2403 (abspath_from_root):
2405 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
2409 * public/js/helper-classes.js:
2411 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
2413 build-requests should use conform to JSON API format
2414 https://bugs.webkit.org/show_bug.cgi?id=146375
2416 Reviewed by Stephanie Lewis.
2418 Instead of returning single dictionary that maps root set id to a dictionary of repository names
2419 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
2420 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
2421 matches what we do in /api/test-groups.
2423 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
2424 This is useful for debugging purposes.
2426 * public/api/build-requests.php:
2427 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
2428 (update_builds): Extracted from main.
2430 * public/include/build-requests-fetcher.php:
2431 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
2432 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
2433 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
2434 Moved the logic to exit early when the root set had already been fetched here.
2436 * public/v2/analysis.js:
2437 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
2440 * tools/pull-os-versions.py:
2442 (setup_auth): Moved to util.py
2444 * tools/sync-with-buildbot.py:
2445 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
2446 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
2448 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
2449 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
2450 (config_for_request): Fixed a bug that the script blows up when the build request is missing
2451 the repository specified in the configuration. This tolerance is necessary when a new repository
2452 dependency is added but we want to run A/B tests for old builds without the dependency.
2453 (fetch_json): No longer takes auth.
2456 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
2458 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
2460 Build fix. A/B testing is broken when continuous builders report revisions out of order.
2463 (App.AnalysisTaskController.Ember.Controller.extend.):
2465 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
2467 A/B testing results should be shown even if they were submitted to different platforms
2468 https://bugs.webkit.org/show_bug.cgi?id=146219
2470 Reviewed by Andreas Kling.
2472 Fetch A/B testing results regardless of the platform to which results are submitted
2473 by providing the platform ID to which the results were submitted for each test group.
2475 * public/api/test-groups.php:
2476 (main): Include the platform id in the test groups.
2477 * public/v2/analysis.js:
2478 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
2480 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
2482 Remove unnecessary svn:executable flags
2483 https://bugs.webkit.org/show_bug.cgi?id=146107
2485 Reviewed by Alexey Proskuryakov.
2487 * public/js/helper-classes.js: Removed property svn:executable.
2488 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
2489 * public/v2/app.css: Removed property svn:executable.
2490 * public/v2/app.js: Removed property svn:executable.
2491 * public/v2/chart-pane.css: Removed property svn:executable.
2492 * public/v2/data.js: Removed property svn:executable.
2493 * public/v2/index.html: Removed property svn:executable.
2494 * public/v2/js/d3/LICENSE: Removed property svn:executable.
2495 * public/v2/js/d3/d3.js: Removed property svn:executable.
2496 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
2497 * public/v2/js/ember-data.js: Removed property svn:executable.
2498 * public/v2/js/ember.js: Removed property svn:executable.
2499 * public/v2/js/handlebars.js: Removed property svn:executable.
2500 * public/v2/js/jquery.min.js: Removed property svn:executable.
2501 * public/v2/js/statistics.js: Removed property svn:executable.
2502 * public/v2/manifest.js: Removed property svn:executable.
2503 * public/v2/popup.js: Removed property svn:executable.
2505 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2507 Reading the list of analysis tasks is extremely slow
2508 https://bugs.webkit.org/show_bug.cgi?id=146086
2510 Reviewed by Darin Adler.
2512 The bug was caused by Ember data requesting manifest.js hundreds of times.
2513 Fetch it ahead of time in each route instead.
2516 (App.AnalysisRoute.model):
2517 (App.AnalysisTaskRoute.model):
2519 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2521 Update ReadMe.md and Install.md per database changes
2522 https://bugs.webkit.org/show_bug.cgi?id=146076
2524 Reviewed by Darin Adler.
2531 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2533 Increase the popup dismissal time from 100ms to 500ms
2534 https://bugs.webkit.org/show_bug.cgi?id=146077
2536 Rubber-stamped by Andreas Kling.
2538 * public/v2/popup.js:
2539 (App.PopupView.scheduleHiding):
2541 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
2543 v2 UI should have buttons to breakdown a test
2544 https://bugs.webkit.org/show_bug.cgi?id=146010
2546 Reviewed by Chris Dumez.
2548 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
2549 as well as "Breakdown" to add all subtests' metrics.
2551 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
2552 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
2555 (App.ChartsController.addAlternativePanes): Added.
2556 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
2557 (App.TestProxyForPopup.actionName): Added.
2558 (App.TestProxyForPopup.actionArgument): Added.
2559 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
2560 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
2561 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
2562 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
2563 that are already present in the list of panes.
2564 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
2565 * public/v2/index.html:
2566 * public/v2/manifest.js:
2567 (App.Metric.childMetrics): Added.
2569 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2571 Build fix after r185574.
2574 (set get App.Pane.Ember.Object.extend.):
2576 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2580 * tools/pull-os-versions.py:
2583 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2585 Perf dashboard should be able to list iOS versions as well as OS X versions
2586 https://bugs.webkit.org/show_bug.cgi?id=146003
2588 Reviewed by Stephanie Lewis.
2590 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
2591 information specified in config.json.
2593 * tools/pull-os-versions.py: Renamed from pull-osx.py.
2594 (main): Use available_builds_from_command when 'customCommands' is specified.
2595 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
2596 (fetch_available_builds): Now takes the repository name.
2598 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2600 Removed a superfluous console.log per Chris's comment.
2604 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2606 Analysis task should show all possible revisions for A/B testing
2607 https://bugs.webkit.org/show_bug.cgi?id=145996
2609 Reviewed by Chris Dumez.
2611 * public/api/commits.php:
2612 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
2613 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
2614 have a "commit time".
2617 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
2618 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
2619 the fetched list of commits if available.
2620 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
2621 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
2622 of points shown in the A/B testing configurations become too long.
2624 * public/v2/commits-viewer.js:
2625 (App.CommitsViewerComponent.commitsChanged):
2627 * public/v2/data.js:
2628 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
2630 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
2632 Add a script to post new OS X builds to perf dashboard
2633 https://bugs.webkit.org/show_bug.cgi?id=145955
2635 Reviewed by Darin Adler.
2637 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
2639 * public/api/report-commits.php:
2640 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
2641 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
2643 * tools/pull-osx.py: Added.
2644 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
2645 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
2646 (setup_auth): Sets up basic or digest auth to access the dashboard.
2647 (fetch_available_builds): Fetches and parses the XML document from an internal website.
2648 (textContent): A helper function to get the text content out of a XML node.
2649 (submit_commits): Submits commits to the perf dashboard.
2651 * tools/pull-svn.py:
2654 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
2656 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
2658 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
2659 https://bugs.webkit.org/show_bug.cgi?id=145940
2661 Reviewed by Darin Adler.
2663 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
2664 Also deleted the code to mark points outside the envelop as outliers.
2668 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
2670 Unreviewed build fix for merging platforms.
2672 * public/admin/platforms.php:
2674 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
2676 Unreviewed build fix. Some builder names are really long.
2678 * init-database.sql:
2680 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
2682 Show results and status before revisions for A/B testing results
2683 https://bugs.webkit.org/show_bug.cgi?id=145327
2685 Reviewed by Chris Dumez.
2687 Place the results and the status columns before the columns for revisions.
2688 Also show the absolute difference as well as the relative difference between the averages of A and B.
2691 (App.TestGroupPane._populate):
2692 (App.TestGroupPane._computeStatisticalSignificance):
2693 * public/v2/index.html:
2695 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2697 Build fix after r184591.
2699 * public/v2/manifest.js:
2701 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2703 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
2705 * public/include/build-requests-fetcher.php:
2707 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2709 UI to associate bugs with an analysis task is crappy
2710 https://bugs.webkit.org/show_bug.cgi?id=145198
2712 Reviewed by Andreas Kling.
2714 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
2715 a bug and a separate select view with a text field to associate a new bug instead of implicitly
2716 updating or deleting the existing record based on what the user had typed.
2718 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
2719 a given analysis task since it's perfectly reasonable for a given task to be associated with
2720 multiple WebKit bugs.
2722 * public/privileged-api/associate-bug.php:
2723 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
2724 one that matches the analysis task and the bug tracker when the bug number is falsey.
2726 * public/v2/analysis.js:
2727 (App.Bug.url): Added.
2728 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
2730 * public/v2/app.css:
2733 (App.AnalysisTaskController.actions.addBug): Added.
2734 (App.AnalysisTaskController.actions.deleteBug): Added.
2735 (App.AnalysisTaskController.associateBug): Deleted.
2737 * public/v2/index.html: Updated the templates.
2739 * public/v2/manifest.js:
2740 (App.BugTracker.urlFromBugNumber): Added.
2742 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2744 A/B testing rootSets should provide commit times as well as revisions
2745 https://bugs.webkit.org/show_bug.cgi?id=145207
2747 Reviewed by Andreas Kling.
2749 Some continuous build systems need the commit time as well as the revision number / hash so provide one
2750 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
2752 * public/include/build-requests-fetcher.php:
2753 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
2754 the revision number as well as the commit time.
2755 * tools/sync-with-buildbot.py:
2756 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
2757 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
2758 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
2760 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
2762 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
2764 * public/v2/manifest.js:
2765 (App.Manifest.Ember.Controller.extend.):
2766 (App.Manifest.Ember.Controller.extend):
2768 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
2770 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
2771 https://bugs.webkit.org/show_bug.cgi?id=145181
2773 Rubber-stamped by Chris Dumez.
2775 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
2776 for clarity. This change also reduces the code complexity.
2778 * public/index.html:
2780 (App.AnalysisTaskController._chartDataChanged):
2781 (App.TestGroupPane._createConfigurationSummary):
2782 * public/v2/data.js:
2783 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
2785 * public/v2/interactive-chart.js: Removed the support for showing units separately.
2786 (App.InteractiveChartComponent._constructGraphIfPossible):
2787 (App.InteractiveChartComponent._relayoutDataAndAxes)
2789 * public/v2/manifest.js:
2790 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
2791 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
2792 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
2793 automatically include unit.
2795 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
2797 REGRESSION: v2 UI reports a higher memory usage
2798 https://bugs.webkit.org/show_bug.cgi?id=145151
2800 Reviewed by Chris Dumez.
2802 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
2803 Fixed the bug by manually implementing the formatter as done in v1.
2805 * public/v2/manifest.js:
2806 (App.Manfiest._formatBytes): Added.
2807 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
2809 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
2811 Unreviewed build fix. Add "Duration" as a time metric.
2813 * public/js/helper-classes.js:
2814 * public/v2/data.js:
2815 (RunsData.unitFromMetricName):
2817 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
2819 Perf dashboard treats Speedometer and JetStream as smaller is better
2820 https://bugs.webkit.org/show_bug.cgi?id=144711
2822 Reviewed by Chris Dumez.
2824 Added the support for "Score" metric.
2826 * public/js/helper-classes.js:
2828 * public/v2/data.js:
2829 (RunsData.unitFromMetricName):
2830 (RunsData.isSmallerBetter):
2832 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
2834 Build fix after r183232.
2836 * public/include/json-header.php:
2838 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
2840 Perf dashboard should automatically detect regressions
2841 https://bugs.webkit.org/show_bug.cgi?id=141443
2843 Reviewed by Anders Carlsson.
2845 Added a node.js script detect-changes.js to detect potential regressions and progressions
2846 on the graphs tracked on v2 dashboards.
2848 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
2849 columns to analysis_tasks to keep the segmentation and test range selection strategies used
2850 to create an analysis task.
2852 * public/api/analysis-tasks.php:
2853 (format_task): Include task_segmentation and analysis_tasks in the results.
2855 * public/include/json-header.php:
2856 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
2857 of a CSRF prevention token.
2858 (should_authenticate_as_slave): Added.
2859 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
2860 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
2861 to a CSRF attack, we don't need to check a CSRF token.
2863 * public/privileged-api/create-analysis-task.php:
2864 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
2865 analysis task. Also add or find segmentation and test range selection strategies if specified.
2867 * public/privileged-api/create-test-group.php:
2868 (main): Use ensure_privileged_api_data_and_token_or_slave.
2870 * public/privileged-api/generate-csrf-token.php:
2873 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
2875 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
2876 (Array.prototype.find): Added a polyfill to be used in node.js.
2877 (RunsData.fetchRuns):
2878 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
2879 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
2880 in detect-changes.js.
2881 (RunsData.unitFromMetricName): Ditto.
2882 (RunsData.isSmallerBetter): Ditto.
2883 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
2884 times are identical.
2885 (TimeSeries): When commit times are identical, order points based on build time. This is needed
2886 for when we trigger two builds at two different OS versions with the same WebKit revision since
2887 OS versions don't change the commit times.
2888 (TimeSeries.prototype.findPointByIndex): Added.
2889 (TimeSeries.prototype.rawValues): Added.
2891 * public/v2/js/statistics.js:
2892 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
2893 description of this strategy instead of the default probability. Also fixed a bug that debugging
2894 code was referring to non-existent variables.
2895 (Statistics.executeStrategy): Moved from App.Pane (app.js).
2897 * public/v2/manifest.js:
2898 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
2899 used in detect-changes.js.
2901 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
2902 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
2903 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
2904 (main): Loads the settings JSON specified in the argument.
2905 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
2906 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
2907 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
2908 and computes various values for when statistically significant changes are detected later.
2909 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
2910 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
2911 in chronological order and create a new analysis task for the very last change we detected. We'll
2912 eventually create an analysis task for all detected changes since we're repeating the analysis in
2913 fetchManifestAndAnalyzeData after some time.
2914 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
2915 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
2916 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
2917 tasks for the same range (e.g. humans may create one before the script gets to do it).
2918 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
2919 testing if available, and notify another server with a HTML message as specified.
2920 (findStrategyByLabel):
2921 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
2922 test or values are getting smaller in a larger-is-better test and vice versa.
2923 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
2924 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
2928 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
2929 (instantiateNotificationTemplate):
2932 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
2934 Perf dashboard should have UI to set status on analysis tasks
2935 https://bugs.webkit.org/show_bug.cgi?id=143977
2937 Reviewed by Chris Dumez.
2939 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
2940 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
2941 The latter will be a useful metric once we start automatically creating analysis tasks.
2943 * init-database.sql: Added two columns to analysis_tasks table.
2944 * public/api/analysis-tasks.php: Include the added columns in the JSON.
2945 * public/include/db.php:
2946 (Database::to_database_boolean): Added.
2947 * public/include/json-header.php:
2948 (require_match_one_of_values): Added.
2949 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
2951 * public/v2/analysis.js:
2952 (App.AnalysisTask.result): Added.
2953 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
2954 and we want to differentiate null from false in order to differentiate the null-ness of the value.
2955 (App.AnalysisTask.saveStatus): Added.
2956 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
2957 * public/v2/app.css:
2959 (App.AnalysisTaskController.analysisResultOptions): Added.
2960 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
2961 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
2962 been created if 'no change' is selected.
2963 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
2964 (App.AnalysisTaskController.actions.saveStatus): Added.
2965 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
2966 'result' and 'needed' values of the analysis task.
2968 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
2970 Unreviewed build fix. Updated config.json after recent changes.
2974 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
2976 Make the analysis page more useful
2977 https://bugs.webkit.org/show_bug.cgi?id=143617
2979 Reviewed by Chris Dumez.
2981 * public/api/analysis-tasks.php:
2982 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
2983 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
2984 * public/v2/analysis.js:
2985 (App.AnalysisTask.formattedCreatedAt): Added.
2986 (App.AnalysisTask._addLeadingZero): Added.
2987 (App.AnalysisTask.buildRequestCount): Added.
2988 (App.AnalysisTask.finishedBuildRequestCount): Added.
2989 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
2990 (App.AnalysisTask.testGroups):
2991 (App.AnalysisTask.triggerable):
2992 (App.AnalysisTask.label):
2994 * public/v2/app.css: Tweaked style rules for the analysis page.
2997 (App.buildPopup): Sort the list of platforms by name.
2998 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
2999 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
3000 such as "Bugzilla" with the corresponding text field.
3002 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
3003 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
3004 for the accompanying graph.
3006 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
3008 Perf dashboard should automatically select ranges for A/B testing
3009 https://bugs.webkit.org/show_bug.cgi?id=143580
3011 Reviewed by Chris Dumez.
3013 Added a new statistics option for picking a A/B test range selection strategy.
3014 The selected ranges are shown in the graph using the same UI to show analysis tasks.
3017 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
3018 charts page used by the dashboard since we've added a new parameter at the end.
3019 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
3020 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
3021 (App.Pane._cloneStrategy): Copy isSegmentation.
3022 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
3023 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
3024 selection strategy is picked by the user.
3025 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
3026 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
3027 the return value from the moving average time series to a dictionary that contains the moving
3028 average time series, a dictionary of anomalies, and an array of test ranges.
3029 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
3030 (App.ChartsController._serializePaneList): Ditto for serialization.
3031 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
3032 test range selection strategy.
3034 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
3036 * public/v2/index.html: Added UI for selecting a test range selection strategy.
3038 * public/v2/interactive-chart.js:
3039 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
3041 * public/v2/js/statistics.js:
3042 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
3043 (Statistics.TestRangeSelectionStrategies): Added.
3045 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
3047 The results of A/B testing should state statistical significance
3048 https://bugs.webkit.org/show_bug.cgi?id=143552
3050 Reviewed by Chris Dumez.
3052 Added statistical comparisons between results for each configuration on analysis task page using
3053 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
3056 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
3057 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
3059 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
3060 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
3061 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
3062 Also renamed "items" to "requests" for clarity.
3064 * public/v2/index.html: Added the template for showing statistical comparisons.
3066 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
3067 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
3068 probability and vice versa.
3069 (Statistics.supportedConfidenceIntervalProbabilities):
3070 (Statistics.confidenceIntervalDelta):
3071 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
3072 the probability that two values are sampled from distinct distributions using Welch's t-test.
3073 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
3074 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
3075 (.oneSidedToTwoSidedProbability): Extracted.
3076 (.twoSidedToOneSidedProbability): Extracted.
3077 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
3078 now that computeWelchsT takes two-sided probability.
3080 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
3082 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
3086 (App.Pane.refetchRuns):
3088 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
3090 Perf dashboard should have a way of marking outliers
3091 https://bugs.webkit.org/show_bug.cgi?id=143466
3093 Reviewed by Chris Dumez.
3095 Address kling's in-person comment to notify users when the new run status is saved in the database.
3098 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
3099 * public/v2/chart-pane.css: Fixed a typo.
3101 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
3103 Perf dashboard should have a way of marking outliers
3104 https://bugs.webkit.org/show_bug.cgi?id=143466
3106 Reviewed by Chris Dumez.
3108 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
3109 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
3111 * init-database.sql: Added run_marked_outlier column to test_runs table.
3113 * public/admin/tests.php:
3115 * public/api/runs.php:
3116 (main): Only emit Cache-Control and Expires headers in v1 UI.
3117 (RunsGenerator::format_run): Emit markedOutlier.
3119 * public/include/admin-header.php:
3121 * public/include/db.php:
3122 (Database::is_true): Made it static.
3124 * public/include/manifest.php:
3125 (Manifest::platforms):
3127 * public/index.html: Call into /api/runs/ with ?cache=true.
3129 * public/privileged-api/update-run-status.php: Added.
3130 (main): Updates the newly added column in test_runs table.
3134 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
3135 (App.Pane._didFetchRuns): Renamed from _updateChartData.
3136 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
3137 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
3138 the interactive chart component only observes changes to chartData and not individual properties of it.
3139 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
3140 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
3141 clone chartData here.
3143 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
3144 invoking App.Pane._setNewChartData.
3145 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
3146 opening the pane for marking points as outliers would be annoying.
3147 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
3148 (App.PaneController.selectedMeasurement): Added.
3149 (App.PaneController.showOutlierTitle): Added.
3150 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
3151 mark the selected point as an outlier via the newly added privileged API.
3153 * public/v2/chart-pane.css: Updated styles.
3155 * public/v2/data.js:
3156 (PrivilegedAPI._post): Report the semantic errors.
3157 (Measurement.prototype.markedOutlier): Added.
3158 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
3159 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
3160 whether the time series should include measurements marked as outliers or not.
3161 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
3162 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
3163 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
3165 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
3166 mark individual points as outliers.
3168 * public/v2/interactive-chart.js:
3169 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
3170 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
3171 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
3172 with the arrow key navigation support, this is no longer an issue.
3174 * public/v2/manifest.js:
3175 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
3176 updates the time series in this chart data in order to include or exclude outliers.
3178 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
3180 Perf dashboard should be able to trigger A/B testing jobs for iOS
3181 https://bugs.webkit.org/show_bug.cgi?id=143398
3183 Reviewed by Chris Dumez.
3185 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
3187 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
3189 * public/api/triggerables.php:
3190 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
3191 * public/v2/analysis.js:
3192 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
3194 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
3195 some of the data points. This will happen when we modify the list of projects we build for iOS.
3196 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
3197 attempts to create an invalid test group; when there is already another test group of the same or when
3198 only either configuration specifies the revision for some repository.
3199 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
3200 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
3201 * tools/sync-with-buildbot.py:
3202 (find_request_updates):
3203 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
3204 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
3205 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
3206 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
3208 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
3210 Add time series segmentation algorithms as moving averages
3211 https://bugs.webkit.org/show_bug.cgi?id=143362
3213 Reviewed by Chris Dumez.
3215 This patch implements two preliminary time series segmentation algorithms as moving averages.
3217 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
3218 If Welch's t-test implicates a statistically significance difference, then split the segment into two
3219 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
3220 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
3221 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
3223 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
3224 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
3225 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
3226 values y_1 through y_n with mean y_avg, we want to minimize the sum of (y_i - y_avg)^2 over i = 1
3227 through i = n. However, we also don't want to split every data point into a separate segment so we need
3228 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
3229 models discussed in [2] for simplicity. We will tune this cost function further in the future.
3231 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
3232 space is exponential with respect to the size of the time series since we could split at each data point.
3233 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
3234 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
3235 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
3236 exploring much of the problem space.
3238 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
3239 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
3240 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
3241 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
3242 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
3243 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
3244 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
3246 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
3247 a nonstationary time series", Physical Review E 69, 021108 (2004)
3249 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
3250 Lithuanian Mathematical Journal, vol 46, 2006
3252 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
3253 * public/v2/js/statistics.js:
3254 (Statistics.testWelchsT):
3255 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
3256 of each value array between which Welch's t-statistic is computed. This generalization helps the
3257 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
3258 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
3259 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
3260 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
3261 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
3263 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
3264 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
3266 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
3268 REGRESSION: Perf dashboard sometimes fails to update zooming level
3269 https://bugs.webkit.org/show_bug.cgi?id=143359
3271 Reviewed by Darin Adler.
3273 The bug was caused by various bugs that ended up in an exception.
3276 (App.Pane._handleFetchErrors): Removed superfluous console.log.
3277 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
3278 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
3279 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
3280 to # when Ember.js fails to attach event listeners on time.
3281 * public/v2/interactive-chart.js:
3282 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
3283 the containing element's size is 0.
3284 (App.InteractiveChartComponent._updateBrush): Ditto.
3286 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
3288 Perf dashboard should have UI to test out anomaly detection strategies
3289 https://bugs.webkit.org/show_bug.cgi?id=143290
3291 Reviewed by Benjamin Poulain.
3293 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
3295 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
3296 as well as Welch's t-test that compares the last five points to the prior twenty points.
3298 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
3299 performance tests although they compare medians instead of means.
3301 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
3304 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
3305 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
3306 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
3307 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
3308 Only report the first data point when multiple consecutive data points are detected as anomalies.
3309 * public/v2/chart-pane.css: Updated styles.
3310 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
3311 * public/v2/js/statistics.js:
3312 (Statistics.testWelchsT): Added. Implements Welch's t-test.
3313 (.sampleMeanAndVarianceForValues): Added.
3314 (.createWesternElectricRule): Added.
3315 (.countValuesOnSameSide): Added.
3316 (Statistics.AnomalyDetectionStrategy): Added.
3318 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
3320 REGRESSION: Searching commits can highlight wrong data points
3321 https://bugs.webkit.org/show_bug.cgi?id=143272
3323 Reviewed by Antti Koivisto.
3325 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
3326 return commit times with only second precision. This resulted in the frontend code to match a commit
3327 with the data point that included the next commit when the millisecond component of commit's timestamp
3328 wasn't identically 0.
3330 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
3331 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
3332 so miliseconds component was only preserved in /api/commits.
3334 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
3335 it returns time in milisecond precision.
3337 * public/api/commits.php:
3338 (fetch_commits_between): Use Database::to_js_time for format commit times.
3339 (format_commit): Ditto.
3340 * public/include/db.php:
3341 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
3342 * public/v2/data.js:
3343 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
3345 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
3347 Perf dashboard should show relative change in values
3348 https://bugs.webkit.org/show_bug.cgi?id=143252
3350 Reviewed by Antti Koivisto.
3352 When a range of values are selected, show the percentage difference between the start and the end
3353 in addition to the absolute value difference. When a single point is selected, show the relative
3354 difference with respect to the previous point. Use two significant figures and always show plus sign
3355 when the difference is positive.
3357 * public/v2/app.js: Compute and format the relative difference.
3358 * public/v2/chart-pane.css: Don't let commits view shrink itself when they're all collapsed.
3359 * public/v2/index.html: Show the relative difference.
3361 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
3363 REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
3364 https://bugs.webkit.org/show_bug.cgi?id=143254
3366 Reviewed by Antti Koivisto.
3368 The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
3369 or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
3370 so that the interactive chart component will observe a change to 'chartData'.
3373 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.
3375 2015-03-19 Ryosuke Niwa <rniwa@webkit.org>
3377 Unreviewed build fixes.
3379 * public/include/manifest.php:
3380 (Manifest::generate): These should be {} instead of [] when they're empty.
3381 * public/v2/data.js:
3382 (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
3383 * public/v2/manifest.js:
3384 (App.Metric.fullName): Fixed the typo.
3385 * tests/admin-regenerate-manifest.js: Fixed the test.
3387 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
3389 Commit the erroneously reverted change.
3391 * public/api/runs.php:
3392 (RunsGenerator::results):
3394 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
3396 Loading the perf dashboard takes multiple seconds
3397 https://bugs.webkit.org/show_bug.cgi?id=141860
3399 Reviewed by Andreas Kling.
3401 This patch introduces the caches of JSON files returned by /api/ in /data/ directory. It also records
3402 the last time test_runs rows associated with the requested platforms and metrics are inserted, updated,
3403 or removed in the caches as well as the manifest JSON files ("last modified time"). Because the manifest
3404 is regenerated each time a new test result is reported, the front end can compare last modified time in
3405 the manifest file with that in a /api/runs JSON cache to detect the stale-ness.
3407 More concretely, the front end first optimistically fetches the JSON in /data/. If the cache doesn't exit
3408 or the last modified time in the cache doesn't match with that in the manifest file, it would fetch it
3409 again via /api/runs. In the case the cache did exist, we render the charts based on the cache meanwhile.
3410 This dramatically reduces the perceived latency for the page load since charts are drawn immediately using
3411 the cache and we would only re-render the charts as new up-to-date JSON comes in.
3413 This patch also changes the format of runs JSONs by pushing the exiting properties into 'configurations'
3414 and adding 'lastModified' and 'elapsedTime' at the top level.
3416 * init-database.sql: Added config_runs_last_modified to test_configurations table as well as a trigger to
3417 auto-update this column upon changes to test_runs table.
3419 * public/admin/test-configurations.php:
3420 (add_run): Regenerate the manifest file to invalidate the /api/runs JSON cache.
3421 (delete_run): Ditto.
3423 * public/api/runs.php:
3424 (main): Fetch all columns of test_configurations table including config_runs_last_modified. Also generate
3425 the cache in /data/ directory.
3426 (RunsGenerator::__construct): Compute the last modified time for this (platform, metric) pair.
3427 (RunsGenerator::results): Put the old content in 'configurations' property and include 'lastModified' and
3428 'elapsedTime' properties. 'elapsedTime' is added for debugging purposes.
3429 (RunsGenerator::add_runs):
3430 (RunsGenerator::parse_revisions_array):
3432 * public/include/db.php:
3433 (CONFIG_DIR): Added.
3434 (generate_data_file): Added based on ManifestGenerator::store.
3435 (Database::to_js_time): Extracted from RunsGenerator::add_runs to share code.
3437 * public/include/json-header.php:
3438 (echo_success): Renamed from success_json. Return the serialized JSON instead of echo'ing it so that we can
3439 generate caches in /api/runs/.
3440 (exit_with_success):
3442 * public/include/manifest.php:
3443 (ManifestGenerator::generate): Added 'elapsedTime' property for the time taken to generate the manifest.
3444 It seems like we're generating it in 200-300ms for now so that's good.
3445 (ManifestGenerator::store): Uses generate_data_file.
3446 (ManifestGenerator::platforms): Added 'lastModified' array to each platform entry. This array contains the
3447 last modified time for each (platform, metric) pair.
3449 * public/index.html:
3450 (fetchTest): Updated per the format change in runs JSON.
3453 (App.Pane._fetch): Fetch the cached JSON first. Refetch the uncached version if instructed as such.
3454 (App.Pane._updateChartData): Extracted from App.Pane._fetch.
3455 (App.Pane._handleFetchErrors): Ditto.
3457 * public/v2/data.js:
3458 (RunsData.fetchRuns): Takes the fourth argument indicating whether we should fetch the cached version or not.
3459 The cached JSON is located in /data/ with the same filename. When fetching a cached JSON results in 404,
3460 fulfill the promise with null as the result instead of rejecting it. The only client of this function which
3461 sets useCache to true is App.Manifest.fetchRunsWithPlatformAndMetric, and it handles this special case.
3463 * public/v2/manifest.js:
3464 (App.DateArrayTransform): Added. Handles the array of last modified dates in platform objects.
3465 (App.Platform.lastModifiedTimeForMetric): Added. Returns the last modified date in the manifest JSON.
3466 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes "useCache" like RunsData.fetchRuns. Set shouldRefetch
3467 to true if response is null (the cache didn't exit) or the cache is out-of-date.
3468 (App.Manifest._formatFetchedData): Extracted from App.Manifest.fetchRunsWithPlatformAndMetric.
3471 (initializeDatabase): Avoid splitting function definitions in the middle.
3473 * tests/api-report.js: Added tests to verify that reporting new test results updates the last modified time
3474 in test_configurations.
3476 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
3478 REGRESSION(r180333): Analysis tasks can't be associated with bugs
3479 https://bugs.webkit.org/show_bug.cgi?id=141858
3481 Reviewed by Andreas Kling.
3483 Added back the erroneously removed table to associate bugs. Also moved "details-table-container" div outside
3484 of the chart-details partial template as it needs to wrap associate bugs in analysis task pages.
3486 * public/v2/chart-pane.css:
3487 * public/v2/index.html:
3489 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
3491 Selecting revisions for A/B testing is hard
3492 https://bugs.webkit.org/show_bug.cgi?id=141824
3494 Reviewed by Andreas Kling.
3496 Update the revisions used in A/B testing based on the selection in the overview chart. This allows users to
3497 intuitively select revisions based on points shown in the chart. Removed the old select elements used to
3498 select A/B testing points manually.
3500 Also renamed 'testSets' to 'configurations', 'roots' to 'rootConfigurations', and 'revisions' in each root's
3501 sets to 'options' for clarity.
3503 * public/v2/app.css: Reorganized style rules.
3506 (App.AnalysisTaskController):
3507 (App.AnalysisTaskController._taskUpdated): Merged updateTestGroupPanes.
3508 (App.AnalysisTaskController._chartDataChanged): Renamed from paneDomain. It's now an observer instead of
3509 a property, which sets 'overviewDomain' property as well as other properties.
3510 (App.AnalysisTaskController.updateRootConfigurations): Renamed from updateRoots.
3511 (App.AnalysisTaskController._updateRootsBySelectedPoints): Added. Select roots based on the selected points
3512 in the overview chart.
3514 * public/v2/chart-pane.css: Added arrows next to the configuration names (e.g. 'A') to indicate whether
3515 individual build requests / test results are shown or not.
3517 * public/v2/index.html: Removed the select element per configuration column. Also moved the select element
3518 for the number of runs as it doesn't belong in the same table as the one that lists repositories and roots.
3520 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
3522 Unreviewed test fixes after r179037, r179591, and r179763.
3524 * tests/admin-regenerate-manifest.js:
3525 * tests/admin-reprocess-report.js:
3527 2015-02-19 Ryosuke Niwa <rniwa@webkit.org>
3529 Relationship between A/B testing results are unclear
3530 https://bugs.webkit.org/show_bug.cgi?id=141810
3532 Reviewed by Andreas Kling.
3534 Show a "reference chart" indicating which two points have been tested in each test group pane.
3536 Now the chart shown at the top of an analysis task page is called the "overview pane", and we use the pane
3537 and the domain used in this chart to show charts in each test group.
3539 Also renamed an array of revisions used in the A/B test results tables from 'revisions' to 'revisionList'.
3541 * public/v2/analysis.js:
3542 (App.TestGroup._fetchTestResults): Renamed from _fetchChartData. Set 'testResults' instead of 'chartData'
3543 since this is the results of A/B testing results, not the data for charts shown next to them.
3545 * public/v2/app.css: Added CSS rules for reference charts.
3548 (App.AnalysisTaskController.paneDomain): Set 'overviewPane' and 'overviewDomain' on each test group pane.
3549 (App.TestGroupPane._populate): Updated per 'chartData' to 'testResults' rename.
3550 (App.TestGroupPane._updateReferenceChart): Get the chart data via the overview pane and find points that
3551 identically matches root sets. If one of configuration used a set of revisions for which no measurement
3552 was made in the original chart, don't show the reference chart as that would be misleading / confusing.
3553 (App.TestGroupPane._computeRepositoryList): Updated per 'chartData' to 'testResults' rename.
3554 (App.TestGroupPane._createConfigurationSummary): Ditto. Also renamed 'revisions' to 'revisionList'.
3555 In addition, renamed 'buildNumber' to 'buildLabel' and prefixed it with "Build ".
3557 * public/v2/data.js:
3558 (Measurement.prototype.revisionForRepository): Added.
3559 (Measurement.prototype.commitTimeForRepository): Cleanup.
3560 (TimeSeries.prototype.findPointByRevisions): Added. Finds a point based on a set of revisions.
3562 * public/v2/index.html: Added the reference chart. Streamlined the status label for each build request
3563 by including the build number in the title attribute instead of in the markup.
3565 * public/v2/interactive-chart.js:
3566 (App.InteractiveChartComponent._updateDomain): Fixed a typo introduced as a consequence of r179913.
3567 (App.InteractiveChartComponent._computeYAxisDomain): Expand the y-axis to show the highlighted points.
3568 (App.InteractiveChartComponent._highlightedItemsChanged): Adjust the y-axis as needed.
3570 2015-02-18 Ryosuke Niwa <rniwa@webkit.org>
3572 Analysis task pages are unusable
3573 https://bugs.webkit.org/show_bug.cgi?id=141786
3575 Reviewed by Andreas Kling.
3577 This patch makes following improvements to analysis task pages:
3578 1. Making the main chart interactive. This change required the use of App.Pane as well as moving the code to
3579 compute the data for the details pane from PaneController.
3580 2. Moving the form to add a new test group to the top of test groups instead of the bottom of them.
3581 3. Grouping the build requests in each test group by root sets instead of the order by which they were ran.
3582 This change required the creation of App.TestGroupPane as well as its methods.
3583 4. Show a box plot for each root set configuration as well as each build request. This change required
3584 App.BoxPlotComponent.
3585 5. Show revisions of each repository (e.g. WebKit) for each root set and build request.
3587 * public/api/build-requests.php:
3588 (main): Update per the rename of BuildRequestsFetcher::root_sets to BuildRequestsFetcher::root_sets_by_id.
3590 * public/api/test-groups.php:
3591 (main): Include root sets and roots in the response.
3592 (format_test_group):
3594 * public/include/build-requests-fetcher.php:
3595 (BuildRequestsFetcher::root_sets_by_id): Renamed from root_sets.
3596 (BuildRequestsFetcher::root_sets): Added.
3597 (BuildRequestsFetcher::roots): Added.
3598 (BuildRequestsFetcher::fetch_roots_for_set): Takes a boolean argument $resolve_ids. This flag is only set to
3599 true in /api/build-requests/ (as done prior to this patch) to use repository names as identifiers since
3600 tools/sync-with-buildbot.py can't convert repository names to their ids.
3602 * public/v2/analysis.js:
3604 (App.RootSet): Added.
3605 (App.RootSet.revisionForRepository): Added.
3606 (App.TestGroup.rootSets): Deleted the code to compute root set ids from build requests now that the JSON
3607 response at /api/test-groups will include them.
3608 (App.BuildRequest): Ditto. Also deleted 'configLetter' property, which has been moved to a proxy created by
3609 _createConfigurationSummary.
3610 (App.BuildRequest.statusLabel): Use 'Completed' as the human readable label for 'completed' status.
3611 (App.BuildRequest.aggregateStatuses): Added. Generates a human readable status for a set of build requests.
3613 * public/v2/app.css: Updated style rules for analysis task pages.
3616 (App.Pane): This class is now used in analysis task pages to make the main chart interactive.
3617 (App.Pane._updateDetails): Moved from App.PaneController.
3619 (App.PaneController._updateCanAnalyze): Updated the code per the move of selectedPoints.
3621 (App.AnalysisTaskController): Added 'details'.
3622 (App.AnalysisTaskController._taskUpdated):
3623 (App.AnalysisTaskController.paneDomain):Renamed from _fetchedRuns.
3624 (App.AnalysisTaskController.updateTestGroupPanes): Added. Creates App.TestGroupPane for each test group.
3625 (App.AnalysisTaskController.actions.toggleShowRequestList): Added.
3627 (App.TestGroupPane): Added.
3628 (App.TestGroupPane._populate): Added. Group build requests by root sets and create a summary for each group.
3629 (App.TestGroupPane._computeRepositoryList): Added. Returns a sorted list of repositories which is the union
3630 of all repositories appearing in root sets and builds associated with A/B testing results.
3631 (App.TestGroupPane._groupRequestsByConfigurations): Added. Groups build requests by root sets.
3632 (App.TestGroupPane._createConfigurationSummary): Added. Creates a summary for a group of build requests that
3633 use the same root set. We start by wrapping "raw" build requests in a proxy with formatted values,
3634 build numbers, etc... obtained from the fetched chart data. The list of revisions shown in the group summary
3635 is a union of revisions in the root set and the first build request in the group. We null-out revision info
3636 for a build request if it is identical to the one in the summary. The range of values is expanded as needed
3637 by the values in the group as well as 95% percentile confidence interval.
3639 (App.BoxPlotComponent): Added. Controls a box plot shown for each test group summary and build request.
3640 (App.BoxPlotComponent.didInsertElement): Added. Inserts a SVG element as well as two indicator rects to show
3641 the mean and the confidence interval.
3642 (App.BoxPlotComponent._updateBars): Added. Updates the dimensions of the indicator rects.
3643 (App.BoxPlotComponent.valueChanged): Added. Computes the relative dimensions of the indicator rects and
3644 calls _updateBars to update the rects.
3646 * public/v2/chart-pane.css: Added some style rules to be used in the details pane in analysis task pages.
3648 * public/v2/data.js:
3649 (Measurement.prototype.formattedRevisions):
3650 (Measurement.formatRevisionRange): Renamed from Measurement.prototype._formatRevisionRange so that it can be
3651 called in _createConfigurationSummary.
3653 * public/v2/index.html: Updated the templates for analysis task pages. Moved the form to create a new test
3654 group above all test groups, and replaced the list of data points by "details" pane used in the charts page.
3655 Also made the fetching of chartData no longer block showing of test groups.
3657 * public/v2/interactive-chart.js:
3658 (App.InteractiveChartComponent._updateDomain): Added an early exit to fix a newly revealed race condition.
3659 (App.InteractiveChartComponent._domainChanged): Ditto.
3660 (App.InteractiveChartComponent._updateSelectionToolbar): Made it respect 'zoomable' boolean property.
3662 * public/v2/js/statistics.js:
3663 (Statistics.min): Added.
3664 (Statistics.max): Added.
3666 * public/v2/manifest.js:
3667 (App.Manifest.fetchRunsWithPlatformAndMetric): Added formatWithDeltaAndUnit to be used in _createConfigurationSummary.
3669 2015-02-14 Ryosuke Niwa <rniwa@webkit.org>
3671 Build URL on new perf dashboard doesn't resolve $builderName
3672 https://bugs.webkit.org/show_bug.cgi?id=141583
3674 Reviewed by Darin Adler.
3676 Support $builderName in the build URL template.
3678 * public/js/helper-classes.js:
3679 (TestBuild.buildUrl): Replaced $builderName with the builder name.
3681 * public/v2/manifest.js:
3682 (App.Metric.fullName): Fixed the typo. We need &ni, not &in.
3683 (App.BuilderurlFromBuildNumber): Replaced $builderName with the builder name.
3685 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
3687 Unreviewed build fix after r179591.
3689 * public/api/commits.php:
3691 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
3693 The status of a A/B testing request always eventually becomes "Failed"
3694 https://bugs.webkit.org/show_bug.cgi?id=141523
3696 Reviewed by Andreas Kling.
3698 The bug was caused by /api/build-requests always setting the status of a build request to 'failed' when
3699 'failedIfNotCompleted' was sent by the buildbot sync'er.
3701 Fixed the bug by only setting the status to 'failed' if it wasn't set to 'completed'.
3703 * public/api/build-requests.php:
3706 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
3708 Unreviewed, remove empty directories.
3710 * public/data: Removed.
3712 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
3714 Perf dashboard should show the results of A/B testing
3715 https://bugs.webkit.org/show_bug.cgi?id=141500
3717 Reviewed by Chris Dumez.
3719 Added the support for fetching test_runs for a specific test group in /api/runs/, and used it in the