1 2016-02-20 Ryosuke Niwa <rniwa@webkit.org>
3 Add the support for universal slave password
4 https://bugs.webkit.org/show_bug.cgi?id=154476
6 Reviewed by David Kilzer.
8 Added the support for universalSlavePassword.
11 * public/include/report-processor.php:
12 (ReportProcessor::process):
13 (ReportProcessor::authenticate_and_construct_build_data): Extracted from process().
15 2016-02-19 Ryosuke Niwa <rniwa@webkit.org>
17 Analysis tasks page complains about missing repository but with a wrong name
18 https://bugs.webkit.org/show_bug.cgi?id=154468
20 Reviewed by Chris Dumez.
22 Fixed the bug by using the right variable in the template literal.
24 * public/v3/components/customizable-test-group-form.js:
25 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use querySelector here since Chrome doesn't have
26 getElementsByClassName on ShadowRoot.
27 * public/v3/pages/analysis-task-page.js:
28 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Use name which is the name of
31 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
33 Revert an unintended change made in the previous commit.
37 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
39 Perf dashboard should let user cancel pending A/B testing and hide failed ones
40 https://bugs.webkit.org/show_bug.cgi?id=154433
42 Reviewed by Chris Dumez.
44 Added a button to hide a test group in the details view (the bottom table) in the analysis task page, and
45 "Show hidden tests" link to show the hidden test groups on demand. When a test group is hidden, all pending
46 requests in the group will also be canceled since a common scenario of using this feature is that the user
47 had triggered an useless A/B testing; e.g. all builds will fail, wrong, etc... We can revisit and add the
48 capability to just cancel the pending requests and leaving the group visible later if necessary.
50 Run `ALTER TYPE build_request_status_type ADD VALUE 'canceled';` to add the new type.
52 * init-database.sql: Added testgroup_hidden column to analysis_test_groups table and added 'canceled'
53 as a value to build_request_status_type table.
54 * public/api/test-groups.php:
55 (format_test_group): Added 'hidden' field in the JSON result.
56 * public/privileged-api/update-test-group.php:
57 (main): Added the support for updating testgroup_hidden column. When this column is set to true, also
58 cancel all pending build requests (by setting its request_status to 'canceled' which will be ignore by
60 * public/v3/components/test-group-results-table.js:
61 (TestGroupResultsTable.prototype.setTestGroup): Reset _renderedTestGroup here so that the next call to
62 render() will update the table; e.g. when build requests' status change from 'Pending' to 'Canceled'.
63 * public/v3/models/build-request.js:
64 (BuildRequest.prototype.hasCompleted): A build request is considered complete/finished if it's canceled.
65 (BuildRequest.prototype.hasPending): Added.
66 (BuildRequest.prototype.statusLabel): Handle 'canceled' status.
67 * public/v3/models/test-group.js:
69 (TestGroup.prototype.updateSingleton): Added to update 'hidden' field.
70 (TestGroup.prototype.isHidden): Added.
71 (TestGroup.prototype.hasPending): Added.
72 (TestGroup.prototype.hasPending): Added.
73 (TestGroup.prototype.updateHiddenFlag): Added. Uses the privileged API to update testgroup_hidden column.
74 The JSON API also updates the status of the 'pending' build requests in the group to 'canceled'.
75 * public/v3/pages/analysis-task-page.js:
76 (AnalysisTaskPage): Added _showHiddenTestGroups and _filteredTestGroups as instance variables.
77 (AnalysisTaskPage.prototype._didFetchTestGroups):
78 (AnalysisTaskPage.prototype._showAllTestGroups): Added.
79 (AnalysisTaskPage.prototype._didUpdateTestGroupHiddenState): Extracted from _didFetchTestGroups.
80 (AnalysisTaskPage.prototype._renderTestGroupList): Use the filtered list of test groups to show the list
81 of test groups. When all test groups are shown, we would first show the hidden ones after the regular ones.
82 (AnalysisTaskPage.prototype._createTestGroupListItem): Extracted from _renderTestGroupList.
83 (AnalysisTaskPage.prototype._renderTestGroupDetails): Update the text inside the button to hide the test
84 group. Also show a warning text that the pending requests will be canceled if there are any.
85 (AnalysisTaskPage.prototype._hideCurrentTestGroup): Added.
86 (AnalysisTaskPage.cssTemplate): Updated the style.
88 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
90 The rows in the analysis results table should be expandable
91 https://bugs.webkit.org/show_bug.cgi?id=154427
93 Reviewed by Chris Dumez.
95 Added "(Expand)" link between rows that have hidden points. Upon click it inserts the hidden rows.
97 We insert around five rows at a time when there are hundreds of hidden points but we also avoid leaving
98 behind expandable rows of less than two rows.
100 Also fixed a bug in CustomizableTestGroupForm that getElementsById would throw in the shipping Safari
101 because getElementsById doesn't exist on Element.prototype by using class name instead.
103 * public/v3/components/analysis-results-viewer.js:
104 (AnalysisResultsViewer):
105 (AnalysisResultsViewer.prototype.setCurrentTestGroup): Removed superfluous call to render().
106 (AnalysisResultsViewer.prototype.setPoints): Always show the start and the end points.
107 (AnalysisResultsViewer.prototype.buildRowGroups):
108 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Add an instance of ExpandableRow which
109 shows a "(Expand)" link to show hidden rows here.
110 (AnalysisResultsViewer.prototype._expandBetween): Added. Expands rows between two points.
111 (AnalysisResultsViewer.cssTemplate): Added rules for "(Expand)" links.
112 (AnalysisResultsViewer.ExpandableRow): Added.
113 (AnalysisResultsViewer.ExpandableRow.prototype.resultContent): Added. Overrides what's in the results column.
114 (AnalysisResultsViewer.ExpandableRow.prototype.heading): Added. Generates "(Expand)" link.
116 * public/v3/components/customizable-test-group-form.js:
117 (CustomizableTestGroupForm.prototype._computeRootSetMap): Use getElementsByClassName instead of
119 (CustomizableTestGroupForm.prototype._classForLabelAndRepository): Renamed from _idForLabelAndRepository.
120 (CustomizableTestGroupForm._constructRevisionRadioButtons): Set class name instead of id.
122 * public/v3/components/results-table.js:
123 (ResultsTable.prototype.render): Don't generate radio buttons to select a row when root set is missing;
124 e.g. for rows that show "(Expand)" links.
126 2016-02-18 Ryosuke Niwa <rniwa@webkit.org>
128 Statistically significant A/B testing results should be color coded in details view
129 https://bugs.webkit.org/show_bug.cgi?id=154414
131 Reviewed by Chris Dumez.
133 Color code the statistically significant comparisions in TestGroupResultsTable as done in the analysis
136 * public/v3/components/customizable-test-group-form.js:
137 (CustomizableTestGroupForm.cssTemplate): Build fix after r196768.
138 * public/v3/components/test-group-results-table.js:
139 (TestGroupResultsTable.prototype.buildRowGroups): Add the status as a class name.
140 (TestGroupResultsTable.cssTemplate): Added styles to color-code statistically significant results.
142 2016-02-17 Ryosuke Niwa <rniwa@webkit.org>
144 v3 UI should allow custom revisions for A/B testing
145 https://bugs.webkit.org/show_bug.cgi?id=154379
147 Reviewed by Chris Dumez.
149 Added the capability to customize revisions selected in the overview chart and the results viewer.
151 Newly added CustomizableTestGroupForm is responsible for allowing users to modify the set of revisions in
152 a new A/B testing group. Unlike TestGroupForm which doesn't know anything about which revisions are selected
153 for each project/repository, CustomizableTestGroupForm is aware of the list of revisions used in each set.
155 The list of revisions used in each set is represented by RootSet if users had not customized them, and
156 CustomRootSet otherwise; the latter was added since regular RootSet object requires CommitLog and other
157 DataModelObjects which are hard to create without corresponding database entries.
159 * public/v3/components/customizable-test-group-form.js: Added.
160 (CustomizableTestGroupForm): Added.
161 (CustomizableTestGroupForm.prototype.setRootSetMap): Added.
162 (CustomizableTestGroupForm.prototype._submitted): Overrides the superclass' method.
163 (CustomizableTestGroupForm.prototype._customize): Ditto. Unlike TestGroupForm's callback, this class'
164 callback passes in a root set map as the third argument.
165 (CustomizableTestGroupForm.prototype._computeRootSetMap): Added. Returns this._rootSetMap, which is set by
166 AnalysisTaskPage if user had not customized the root sets. Otherwise return a new map with CustomRootSet's.
167 (CustomizableTestGroupForm.prototype.render): Added. Creates a table to allow customization of root sets.
168 (CustomizableTestGroupForm._constructRevisionRadioButtons): Added.
169 (CustomizableTestGroupForm._createRadioButton): Added.
170 (CustomizableTestGroupForm.cssTemplate): Added.
171 (CustomizableTestGroupForm.formContent): Added. This method is called by TestGroupForm.htmlTemplate.
172 * public/v3/components/test-group-form.js:
173 (TestGroupForm): Updated the various methods to not directly mutate DOM. Store the state in instance
174 variables and update DOM in render() as done elsewhere.
175 (TestGroupForm.prototype.setNeedsName): Deleted. We no longer need this flag since TestGroupForm which is
176 used for retries never needs a name and CustomizableTestGroupForm which is used to create a new test group
177 always requires a name.
178 (TestGroupForm.prototype.setDisabled):
179 (TestGroupForm.prototype.setLabel):
180 (TestGroupForm.prototype.setRepetitionCount):
181 (TestGroupForm.prototype.render): Added.
182 (TestGroupForm.prototype._submitted): Moved the code to prevent the default action has been moved to the
183 constructor since this method is overridden by CustomizableTestGroupForm.
184 (TestGroupForm.cssTemplate): Added.
185 (TestGroupForm.htmlTemplate):
186 (TestGroupForm.formContent): Extracted from htmlTemplate.
187 * public/v3/index.html:
188 * public/v3/models/repository.js:
189 (Repository.sortByNamePreferringOnesWithURL): Added.
190 * public/v3/models/root-set.js:
191 (RootSet.prototype.revisionForRepository): Added so that _createTestGroupAfterVerifyingRootSetList can retrieve
192 the revision information from CustomRootSet without going through CommitLog objects since CustomRootSet doesn't
193 have associated CommitLog objects.
194 (CustomRootSet): Added. Used by CustomizableTestGroupForm to create a custom root map since regular RootSet
195 requires CommitLog and other related objects which are hard to create without database entries.
196 (CustomRootSet.prototype.setRevisionForRepository): Added.
197 (CustomRootSet.prototype.repositories): Added.
198 (CustomRootSet.prototype.revisionForRepository): Added.
199 * public/v3/pages/analysis-task-page.js:
201 (AnalysisTaskPage.prototype.render): Removed the reference to v2 UI since v3 UI is now strictly more powerful
202 than v2 UI. Also update the root set maps in each form here.
203 (AnalysisTaskPage.prototype._retryCurrentTestGroup): No longer takes unused name argument as it got removed
205 (AnalysisTaskPage.prototype._chartSelectionDidChange): No longer updates the disabled-ness here since it's now
206 done in render() via setRootSetMap().
207 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Now takes rootSetMap as an argument.
208 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): No longer updates the disabled-ness here
209 since it's now done in render() via setRootSetMap().
210 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Now takes rootSetMap as an argument.
211 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Take a dictionary of root set labels
212 such as A and B, which maps to a RootSet or a newly-added CustomRootSet.
213 (AnalysisTaskPage.htmlTemplate): Use customizable-test-group-form for creating a new A/B testing group. Retry
214 form will continue to use TestGroupForm since customizing revisions is non-sensical in retries.
215 (AnalysisTaskPage.cssTemplate): Updated the style.
217 2016-02-16 Ryosuke Niwa <rniwa@webkit.org>
219 v3 UI has the capability to schedule an A/B testing in a specific range
220 https://bugs.webkit.org/show_bug.cgi?id=154329
222 Reviewed by Chris Dumez.
224 Extended AnalysisTaskChartPane and ResultsTable so that users can select a range of points in either
225 the overview chart pane and the results viewer table. Extracted TestGroupForm out of the analysis task
226 page and used right below those two components in the analysis task page.
228 * public/v3/components/results-table.js:
230 (ResultsTable.prototype.setRangeSelectorLabels): Added.
231 (ResultsTable.prototype.setRangeSelectorCallback): Added.
232 (ResultsTable.prototype.selectedRange): Added.
233 (ResultsTable.prototype._rangeSelectorClicked): Added.
234 (ResultsTable.prototype.render): Generate radio boxes to select a range.
236 * public/v3/components/test-group-form.js:
238 (TestGroupForm.prototype.setStartCallback): Added.
239 (TestGroupForm.prototype.setNeedsName): Added.
240 (TestGroupForm.prototype.setDisabled): Added.
241 (TestGroupForm.prototype.setLabel): Added.
242 (TestGroupForm.prototype.setRepetitionCount): Added.
243 (TestGroupForm.prototype._submitted): Added.
244 (TestGroupForm.htmlTemplate): Extracted from AnalysisTaskPage.htmlTemplate.
246 * public/v3/index.html:
248 * public/v3/pages/analysis-task-page.js:
249 (AnalysisTaskChartPane.prototype._mainSelectionDidChange): Added. Delegates the work to AnalysisTaskPage.
250 (AnalysisTaskChartPane.prototype.selectedPoints): Added.
252 (AnalysisTaskPage.prototype.title):
253 (AnalysisTaskPage.prototype.render):
254 (AnalysisTaskPage.prototype._renderTestGroupDetails): Use TestGroupForm's methods instead of mutating DOM.
255 (AnalysisTaskPage.prototype._retryCurrentTestGroup):
256 (AnalysisTaskPage.prototype._chartSelectionDidChange): Added.
257 (AnalysisTaskPage.prototype._createNewTestGroupFromChart): Added.
258 (AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): Added.
259 (AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Added.
260 (AnalysisTaskPage.prototype._createRetryNameForTestGroup):
261 (AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Extracted from _retryCurrentTestGroup
262 so that we can call it in _createNewTestGroupFromChart and _createNewTestGroupFromViewer.
263 (AnalysisTaskPage.htmlTemplate):
265 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
267 Extract the code specific to v2 UI out of shared statistics.js
268 https://bugs.webkit.org/show_bug.cgi?id=154277
270 Reviewed by Chris Dumez.
272 Extracted statistics-strategies.js out of statistics.js for v2 UI and detect-changes.js. The intent is to
273 deprecate this file once we implement refined statistics tools in v3 UI and adopt it in detect-changes.js.
275 * public/shared/statistics.js:
276 (Statistics.movingAverage): Extracted from the "Simple Moving Average" strategy.
277 (Statistics.cumultaiveMovingAverage): Extracted from the "Cumulative Moving Average" strategy.
278 (Statistics.exponentialMovingAverage): Extracted from the "Exponential Moving Average" strategy.
279 Use a temporary "movingAverage" to keep the last moving average instead of relying on the previous
280 entry in "averages" array to avoid special casing an array of length 1 and starting the loop at i = 1.
281 (Statistics.segmentTimeSeriesGreedyWithStudentsTTest): Extracted from "Segmentation: Recursive t-test"
282 strategy. Don't create the list of averages to match segmentTimeSeriesByMaximizingSchwarzCriterion here.
283 It's done in newly added averagesFromSegments.
284 (Statistics.segmentTimeSeriesByMaximizingSchwarzCriterion): Extracted from
285 "Segmentation: Schwarz criterion" strategy.
286 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Just store the start index to match
288 (App.Pane.updateStatisticsTools):
289 (App.Pane._computeMovingAverageAndOutliers):
291 * public/v2/index.html:
292 * public/v2/statistics-strategies.js: Added.
293 (StatisticsStrategies.MovingAverageStrategies): Added.
294 (averagesFromSegments): Extracted from "Segmentation: Schwarz criterion" strategy. Now used by both
295 "Segmentation: Recursive t-test" and "Segmentation: Schwarz criterion" strategies.
296 (StatisticsStrategies.EnvelopingStrategies): Moved from Statistics.EnvelopingStrategies.
297 (StatisticsStrategies.TestRangeSelectionStrategies): Moved from Statistics.TestRangeSelectionStrategies.
298 (createWesternElectricRule): Moved from statistics.js.
299 (countValuesOnSameSide): Ditto.
300 (StatisticsStrategies.executeStrategy): Moved from Statistics.executeStrategy.
301 * tools/detect-changes.js:
302 (computeRangesForTesting):
304 2016-02-15 Ryosuke Niwa <rniwa@webkit.org>
306 v1 UI and v2 UI should share statistics.js
307 https://bugs.webkit.org/show_bug.cgi?id=154262
309 Reviewed by Chris Dumez.
311 Share statistics.js between v1 and v2 UI.
314 * public/js/shared.js: Deleted.
315 * public/js/statistics.js: Removed.
316 * public/shared: Added.
317 * public/shared/statistics.js: Moved from Websites/perf.webkit.org/public/v2/js/statistics.js.
318 * public/v2/index.html:
319 * public/v2/js/statistics.js: Removed.
320 * public/v3/index.html:
321 * tools/detect-changes.js:
323 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
325 v3 UI sometimes shows same dates twice on the x-axis of time series charts
326 https://bugs.webkit.org/show_bug.cgi?id=154210
328 Reviewed by Chris Dumez.
330 The bug was caused by the label generation code in TimeSeriesChart.computeTimeGrid never emitting hours.
332 Use hours instead of dates as labels when the current time's date is same as the previous label's date.
333 Always include dates before entering this mode to avoid just having hours as labels on the entire x-axis.
335 * public/v3/components/time-series-chart.js:
336 (TimeSeriesChart.prototype._renderXAxis): Slightly increase the "average" width of x-axis label.
337 (TimeSeriesChart.computeTimeGrid): See above. Also assert that the number of labels we generate never
338 exceeds maxLabels as a sanity check.
339 (TimeSeriesChart._timeIterators): Added an iterator that increments by two hours for zoomed graphs.
341 2016-02-13 Ryosuke Niwa <rniwa@webkit.org>
343 v3 UI should show status and associated bugs on analysis task pages
344 https://bugs.webkit.org/show_bug.cgi?id=154212
346 Reviewed by Chris Dumez.
348 Added the capability to see and modify the status and the list of associated of bugs on analysis task pages.
350 Also added the list of related tasks, which are analysis tasks associated with the same bug or have
351 overlapping time ranges with the same test metric but on a potentially different platform.
353 In addition, categorize analysis tasks with the status of "no change" or "inconclusive" as "closed" as no
354 further action can be taken (users can bring them back to non-closed state without any restrictions).
356 * public/api/analysis-tasks.php:
357 (format_task): Categorize 'unchanged' and 'inconclusive' analysis tasks as closed.
359 * public/privileged-api/associate-bug.php:
360 (main): Added shouldDelete as a new mechanism to disassociate a bug since v3 UI shares a single Bug object
361 between multiple analysis tasks (as it should have been in the first place).
363 * public/v3/components/chart-pane-base.js:
365 (ChartPaneBase.prototype._fetchAnalysisTasks): Since each analysis task's change type (status/result) could
366 change, we need to create annotation objects during each render() call.
367 (ChartPaneBase.prototype.render):
368 (ChartPaneBase.prototype._renderAnnotations): Extracted from ChartPaneBase.prototype._fetchAnalysisTasks to
369 do that. I was afraid of the perf impact of this but it doesn't seem to be an issue in my testing.
370 (ChartPaneBase.cssTemplate): Removed superfluous margins (moved to ChartPane.cssTemplate) around the charts
371 since they are only useful in the charts page.
373 * public/v3/models/analysis-task.js:
375 (AnalysisTask.prototype.updateSingleton): Added a comment as to why object.result cannot be renamed to
376 object.changeType in the JSON API.
377 (AnalysisTask.prototype.updateName): Added.
378 (AnalysisTask.prototype.updateChangeType): Added.
379 (AnalysisTask.prototype._updateRemoteState): Added.
380 (AnalysisTask.prototype.associateBug): Added.
381 (AnalysisTask.prototype.disassociateBug): Added.
382 (AnalysisTask.fetchRelatedTasks): Added. See above for the criteria of related-ness.
384 * public/v3/pages/analysis-task-page.js:
386 (AnalysisTaskPage.prototype.updateFromSerializedState):
387 (AnalysisTaskPage.prototype._fetchRelatedInfoForTaskId): Extracted from updateFromSerializedState.
388 (AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks): Added.
389 (AnalysisTaskPage.prototype.render): Render the list of associated bugs, the list of bug trackers (so that
390 users can use it to associate with a new bug), and the list of related analysis tasks.
391 (AnalysisTaskPage.prototype._renderTestGroupList): Extracted from render since it was getting too long.
392 (AnalysisTaskPage.prototype._renderTestGroupDetails): Ditto.
393 (AnalysisTaskPage.prototype._updateChangeType): Added.
394 (AnalysisTaskPage.prototype._associateBug): Added.
395 (AnalysisTaskPage.prototype._disassociateBug): Added.
396 (AnalysisTaskPage.htmlTemplate): Added various elements to show and modify the status, associate bugs,
397 and a list of related analysis tasks.
398 (AnalysisTaskPage.cssTemplate): Added various styles for those form controls.
400 * public/v3/pages/chart-pane.js:
401 (ChartPane.cssTemplate): Moved the margins from ChartPaneBase.cssTemplate.
403 2016-02-12 Ryosuke Niwa <rniwa@webkit.org>
405 Perf dashboard should allow renaming analysis tasks and test groups
406 https://bugs.webkit.org/show_bug.cgi?id=154200
408 Reviewed by Chris Dumez.
410 Allow editing names of analysis tasks and A/B testing groups in the v3 UI.
412 Added the support for updating the name to the privileged API at /privileged-api/update-analysis-task
413 and added a new prevailed API to update A/B testing groups at /privileged-api/update-test-group.
415 * public/privileged-api/update-analysis-task.php: Added the support for renaming the analysis task.
418 * public/privileged-api/update-test-group.php: Added. Supports updating the test group's name.
421 * public/v3/components/editable-text.js: Added.
422 (EditableText): Added. A new editable text label control. It looks like a text node with "(Edit)" link
423 at the end which allow users to go into the "editing mode", which reveals an input element.
424 The user can exit the editing mode by either moving the focus away from the control or clicking on
425 "(Save)" at the end. It calls _updateCallback in the latter case.
426 (EditableText.prototype.editedText): Returns the current value of the input element user.
427 (EditableText.prototype.setText): Sets the label. This does not live-update the input element until
428 the user exists the current editing mode and re-enters it.
429 (EditableText.prototype.setStartedEditingCallback): Sets a callback which gets called when the user
430 requested to enter the editing mode. Since EditableText relies on AnalysisTaskPage to render, this
431 callback only exits to call EditableText.render() in AnalysisTask._didStartEditingTaskName.
432 (EditableText.prototype.setUpdateCallback): Sets a callback which gets called when the user exits
433 the editing mode by activating the "(Save)" link. This callback MUST return a promise upon resolution
434 of which the control gets out of the editing mode. While the promise is in flight, the input element
436 (EditableText.prototype.render): Updates various states of the elements. When _updatingPromise is not
437 falsy, we make the input element readonly and show '(...)' on the link. Don't show the action link
438 if the label is empty (e.g. analysis task or test group is still being fetched).
439 (EditableText.prototype._didClick): Called when the user clicked on the action link. Enter the editing
440 mode or save the edited label via _updateCallback.
441 (EditableText.prototype._didBlur): Exit the editing mode without saving if the input element is not
442 focused, there is no inflight promise returned by _updateCallback, and the action link "(Save)" does
444 (EditableText.prototype._didUpdate): Called when exiting the editing mode.
445 (EditableText.htmlTemplate):
446 (EditableText.cssTemplate):
448 * public/v3/index.html: Include newly added editable-text.js.
450 * public/v3/models/analysis-task.js:
451 (AnalysisTask.prototype.updateSingleton): Added.
452 (AnalysisTask.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
453 the analysis task from the sever.
454 (AnalysisTask._constructAnalysisTasksFromRawData): Use ensureSingleton instead of manually calling
455 findById since we need to update the name of the singleton object we found (via updateSingleton).
457 * public/v3/models/bug.js:
458 (Bug.ensureSingleton): Moved the code to compute the synthetic id from AnalysisTask's
459 _constructAnalysisTasksFromRawData.
460 (Bug.prototype.updateSingleton): Added. Just assert that nothing changes.
462 * public/v3/models/build-request.js:
463 (BuildRequest.prototype.updateSingleton): Added. Assert that the intrinsic values of a build request
464 doesn't change and update status text, status url, and build id as they could change.
466 * public/v3/models/commit-log.js:
467 (CommitLog): Made the constructor argument conform to the convention of id, object pair so that we can
468 use DataModelObject.ensureSingleton.
469 (CommitLog.ensureSingleton):
470 (CommitLog.prototype.updateSingleton): Extracted from CommitLog.ensureSingleton.
472 * public/v3/models/data-model.js:
473 (DataModelObject.ensureSingleton): Call newly added updateSingleton.
474 (DataModelObject.prototype.updateSingleton):
475 (LabeledObject): Removed the name map since it's never used (findByName is never called anywhere).
476 (LabeledObject.prototype.updateSingleton): Added. Updates _name.
477 (LabeledObject.findByName): Deleted.
479 * public/v3/models/test-group.js:
480 (TestGroup.prototype.updateName): Added. Uses PrivilegedAPI to update the name and re-fetches
481 the test group from the sever.
482 (TestGroup._createModelsFromFetchedTestGroups): Removed bogus code. A root set doesn't have a test
483 group associated with it since multiple test groups can share a single root set (this property doesn't
486 * public/v3/pages/analysis-task-page.js:
487 (AnalysisTaskPage): Removed useless _taskId and added this._testGroupLabelMap and this._taskNameLabel.
488 (AnalysisTaskPage.prototype.updateFromSerializedState): Cleanup.
489 (AnalysisTaskPage.prototype._didFetchTask): Assert that this function is called exactly once.
490 (AnalysisTaskPage.prototype.render): Use this._task.id() to show the v2 link. Use EditableText to show
491 the names of the analysis task and the associated test groups. Hide the overview chart and the list of
492 test groups (along with the retry/confirm button) when the analysis task failed to fetch. We always
493 update the names of the analysis task and the associated test groups since they could be updated by
495 (AnalysisTaskPage.prototype._didStartEditingTaskName): Added.
496 (AnalysisTaskPage.prototype._updateTaskName): Added.
497 (AnalysisTaskPage.prototype._updateTestGroupName): Added.
498 (AnalysisTaskPage.htmlTemplate): Updated the style.
500 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
502 Land the change that was supposed to be the part of r196463.
504 * public/v3/pages/analysis-task-page.js:
505 (AnalysisTaskPage.prototype._didFetchTestGroups): Select the latest test group by default.
507 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
509 Refine v3 UI's analysis task page
510 https://bugs.webkit.org/show_bug.cgi?id=154152
512 Reviewed by Chris Dumez.
514 This patch makes the following refinements to the analysis task page:
515 - Always show the relative different of in-progress A/B testing.
516 - Make the annotations (colored bars) in the chart open other analysis tasks.
517 - Order the A/B testing groups in the reverse chronological order.
518 - Select the time range corresponding to the current test group.
520 * public/v3/components/analysis-results-viewer.js:
521 (AnalysisResultsViewer.cssTemplate): Fixed the bug that pending and running testing groups are no longer
522 colored after r196440. Use a slightly more opaque color for currently running groups compared to pending ones.
524 * public/v3/components/chart-pane-base.js:
525 (ChartPaneBase.prototype.setMainSelection): Added.
526 (ChartPaneBase.prototype._openAnalysisTask): Moved the code from ChartPane._openAnalysisTask so that it can be
527 reused in both AnalysisTaskChartPane and ChartPane (in charts page).
528 (ChartPaneBase.prototype.router): Added. Overridden by each subclass.
530 * public/v3/components/test-group-results-table.js:
531 (TestGroupResultsTable.prototype.buildRowGroups): Always show the summary (relative difference of A to B) as
532 long as there are some results in each set.
534 * public/v3/models/test-group.js:
535 (TestGroup.prototype.compareTestResults): Always set .label and .fullLabel with the relative change as long as
536 there are some values. Keep using "pending" and "running" in .status since that would determine the color of
537 stacking blocks representing those A/B testing groups.
539 * public/v3/pages/analysis-task-page.js:
540 (AnalysisTaskChartPane):
541 (AnalysisTaskChartPane.prototype.setPage): Added.
542 (AnalysisTaskChartPane.prototype.router): Added.
544 (AnalysisTaskPage.prototype.render): Show the list of A/B testing groups in the reverse chronological order.
545 Also set the main chart's selection to the time range of the current test group.
547 * public/v3/pages/chart-pane.js:
548 (ChartPane.prototype.router): Added.
549 (ChartPane.prototype._openAnalysisTask): Moved to ChartPaneBase.prototype._openAnalysisTask.
551 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
553 Add a script to process backlogs created while perf dashboard was in the maintenance mode
554 https://bugs.webkit.org/show_bug.cgi?id=154140
556 Reviewed by Chris Dumez.
558 Added a script to process the backlog JSONs created while the perf dashboard was put in the maintenance mode.
559 It re-submits each JSON file to the perf dashboard using the same server config file used by syncing scripts.
561 * public/include/report-processor.php:
562 (TestRunsGenerator::test_value_list_to_values_by_iterations): Fixed a bug in the error message code. It was
563 referencing an undeclared variable.
564 * tools/process-maintenance-backlog.py: Added.
566 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
568 AnalysisResultsViewer never uses this._smallerIsBetter
569 https://bugs.webkit.org/show_bug.cgi?id=154134
571 Reviewed by Chris Dumez.
573 Removed the unused instance variable _smallerIsBetter from AnalysisResultsViewer and TestGroupStackingBlock.
575 * public/v3/components/analysis-results-viewer.js:
576 (AnalysisResultsViewer): Removed the unused _smallerIsBetter.
577 (AnalysisResultsViewer.prototype.setSmallerIsBetter): Deleted.
578 (AnalysisResultsViewer.prototype.buildRowGroups):
579 (AnalysisResultsViewer.TestGroupStackingBlock): Removed the unused _smallerIsBetter.
580 * public/v3/pages/analysis-task-page.js:
581 (AnalysisTaskPage.prototype._didFetchTask):
583 2016-02-11 Ryosuke Niwa <rniwa@webkit.org>
585 Build fix after r196440.
587 * public/v3/models/test-group.js:
588 (TestGroup.prototype.addBuildRequest): Clear the map instead of setting the property to null.
590 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
592 Perf dashboard should have UI to retry A/B testing
593 https://bugs.webkit.org/show_bug.cgi?id=154090
595 Reviewed by Chris Dumez.
597 Added a button to re-try an existing A/B testing group with a custom repetition count. The same button functions
598 as a way of confirming the progression/regression when there have been no A/B testing scheduled in the task.
600 Also fixed the bug that A/B testing groups that have been waiting for other test groups will be shown as "running".
602 * public/v3/components/results-table.js:
603 (ResultsTable.cssTemplate): Don't pad the list of extra repositories when it's empty.
605 * public/v3/components/test-group-results-table.js:
606 (TestGroupResultsTable.prototype.buildRowGroups): Use TestGroup.labelForRootSet instead of manually
607 computing the letter for each configuration set.
609 * public/v3/models/build-request.js:
610 (BuildRequest.prototype.hasStarted): Added.
612 * public/v3/models/data-model.js:
613 (DataModelObject.ensureSingleton): Added.
614 (DataModelObject.cachedFetch): Added noCache option. This is used when re-fetching the test groups after
617 * public/v3/models/measurement-cluster.js:
618 (MeasurementCluster.prototype.startTime): Added.
620 * public/v3/models/measurement-set.js:
621 (MeasurementSet.prototype.hasFetchedRange): Added. Returns true only if there are no "holes" (cluster
622 yet to be fetched) between the specified time range. This was added to fix a bug in AnalysisTaskPage's
623 _didFetchMeasurement.
625 * public/v3/models/test-group.js:
626 (TestGroup): Added this._rootSetToLabel.
627 (TestGroup.prototype.addBuildRequest): Reset this._rootSetToLabel along with this._requestedRootSets.
628 (TestGroup.prototype.repetitionCount): Added. Returns the number of iterations executed per set. We assume that
629 every root set in the test group shares a single repetition count.
630 (TestGroup.prototype.requestedRootSets): Now populates this._rootSetToLabel for labelForRootSet.
631 (TestGroup.prototype.labelForRootSet): Added.
632 (TestGroup.prototype.hasStarted): Added.
633 (TestGroup.prototype.compareTestResults): Use 'running' and 'pending' to differentiate test groups that are waiting
634 for other groups to finish running from the ones that are actually running ('incomplete' before this patch).
635 (TestGroup.fetchByTask):
636 (TestGroup.createAndRefetchTestGroups): Added. Creates a new test group using the privileged-api/create-test-group
637 and fetches the list of test groups for the specified analysis task.
638 (TestGroup._createModelsFromFetchedTestGroups): Extracted from TestGroup.fetchByTask.
640 * public/v3/pages/analysis-task-page.js:
641 (AnalysisTaskPage): Initialize _renderedCurrentTestGroup to undefined so that we'd always can differentiate
642 the initial call to AnalysisTaskPage.render and subsequent calls in which it's identical to _currentTestGroup.
643 (AnalysisTaskPage.prototype._didFetchMeasurement): Fixed a bug that we don't exit early even when some
644 clusters in between startPoint and endPoint are still being fetched via newly added hasFetchedRange.
645 (AnalysisTaskPage.prototype.render): Update the default repetition count based on the current test group.
646 Also update the label of the button to "Confirm the change" if there is no A/B testing in this task.
647 (AnalysisTaskPage.prototype._retryCurrentTestGroup): Added. Re-triggers an existing A/B testing group or creates
648 the A/B testing for the entire range of the analysis task.
649 (AnalysisTaskPage.prototype._hasDuplicateTestGroupName): Added.
650 (AnalysisTaskPage.prototype._createRetryNameForTestGroup): Added.
651 (AnalysisTaskPage.htmlTemplate): Added form controls to re-trigger A/B testing.
652 (AnalysisTaskPage.cssTemplate): Updated the style.
654 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
656 Removed the duplicated definition of ChartPaneBase.
658 * public/v3/components/chart-pane-base.js:
660 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
662 Analysis task page on v3 UI should show charts
663 https://bugs.webkit.org/show_bug.cgi?id=154057
665 Reviewed by Chris Dumez.
667 Extracted ChartPaneBase out of ChartPane and added an instance of its new subclass, AnalysisTaskChartPane,
668 to the analysis task page. The main difference is that ChartPaneBase doesn't depend on the presence of
669 this._chartsPage unlike ChartPane. It also doesn't have the header with toolbar (to show breakdown, etc...).
671 * public/v3/components/base.js:
672 (ComponentBase.prototype._constructShadowTree): Call htmlTemplate() and cssTemplate() with the right "this".
674 * public/v3/components/chart-pane-base.js: Added.
675 (ChartPaneBase): Extracted from ChartPane.
676 (ChartPaneBase.prototype.configure): Extracted from the constructor. Separating this function allows the
677 component to be instantiated inside a HTML template.
678 (ChartPaneBase.prototype._fetchAnalysisTasks): Moved from ChartPane._fetchAnalysisTasks.
679 (ChartPaneBase.prototype.platformId): Ditto.
680 (ChartPaneBase.prototype.metricId): Ditto.
681 (ChartPaneBase.prototype.setOverviewDomain): Ditto.
682 (ChartPaneBase.prototype.setMainDomain): Ditto.
683 (ChartPaneBase.prototype._overviewSelectionDidChange): Extracted from the constructor. This is overridden in
684 ChartPane and unused in AnalysisTaskChartPane.
685 (ChartPaneBase.prototype._mainSelectionDidChange): Extracted from ChartPane._mainSelectionDidChange.
686 (ChartPaneBase.prototype._mainSelectionDidZoom): Extracted from ChartPane._mainSelectionDidZoom.
687 (ChartPaneBase.prototype._indicatorDidChange): Extracted from ChartPane._indicatorDidChange.
688 (ChartPaneBase.prototype._didFetchData): Moved from ChartPane._fetchAnalysisTasks.
689 (ChartPaneBase.prototype._openAnalysisTask): Ditto.
690 (ChartPaneBase.prototype._openCommitViewer): Ditto. Also fixed a bug that we don't show the spinner while
691 waiting for the data to be fetched by calling this.render() here.
692 (ChartPaneBase.prototype._keyup): Moved from ChartPane._keyup. Also fixed the bug that the revisions list
693 doesn't update by calling this.render() here.
694 (ChartPaneBase.prototype.render): Extracted from ChartPane.render.
695 (ChartPaneBase.htmlTemplate): Extracted from ChartPane.htmlTemplate.
696 (ChartPaneBase.paneHeaderTemplate): Added. This is overridden in ChartPane and unused in AnalysisTaskChartPane.
697 (ChartPaneBase.cssTemplate): Extracted from ChartPane.htmlTemplate.
699 * public/v3/components/chart-styles.js: Renamed from public/v3/pages/page-with-charts.js.
700 (PageWithCharts): Renamed from PageWithCharts since it no longer extends PageWithHeading.
701 (ChartStyles.createChartSourceList):
703 * public/v3/components/commit-log-viewer.js:
704 (CommitLogViewer.prototype.view): Set this._repository right away instead of waiting for the fetched data
705 so that spinner will be shown while the data is being fetched.
707 * public/v3/index.html:
709 * public/v3/pages/analysis-task-page.js:
710 (AnalysisTaskChartPane): Added extends ChartPaneBase.
711 (AnalysisTaskPage): Added. this._chartPane.
712 (AnalysisTaskPage.prototype._didFetchTask): Initialize this._chartPane with a domain.
713 (AnalysisTaskPage.prototype.render): Render this._chartPane.
714 (AnalysisTaskPage.htmlTemplate):
716 * public/v3/pages/chart-pane-status-view.js:
717 (ChartPaneStatusView): Removed the unused router from the argument list.
718 (ChartPaneStatusView.prototype.pointsRangeForAnalysis): Renamed from analyzeData() since it was ambiguous.
719 (ChartPaneStatusView.prototype.moveRepositoryWithNotification): Fixed the bug that we don't update the list
720 of the revisions here.
721 (ChartPaneStatusView.prototype.computeChartStatusLabels):
723 * public/v3/pages/chart-pane.js:
724 (ChartPane): Now extends ChartPaneBase.
725 (ChartPane.prototype._overviewSelectionDidChange): Extracted from the constructor.
726 (ChartPane.prototype._mainSelectionDidChange):
727 (ChartPane.prototype._mainSelectionDidZoom):
728 (ChartPane.prototype._indicatorDidChange):
729 (ChartPane.prototype.render):
730 (ChartPane.prototype._renderActionToolbar):
731 (ChartPane.paneHeaderTemplate): Extracted from htmlTemplate.
732 (ChartPane.cssTemplate):
733 (ChartPane.overviewOptions.selection.onchange): Deleted.
734 (ChartPane.prototype._fetchAnalysisTasks): Deleted.
735 (ChartPane.prototype.platformId): Deleted.
736 (ChartPane.prototype.metricId): Deleted.
737 (ChartPane.prototype.setOverviewDomain): Deleted.
738 (ChartPane.prototype.setMainDomain): Deleted.
739 (ChartPane.prototype._openCommitViewer): Deleted.
740 (ChartPane.prototype._didFetchData): Deleted.
741 (ChartPane.prototype._keyup): Deleted.
743 * public/v3/pages/charts-page.js:
745 (ChartsPage.createDomainForAnalysisTask): Extracted by createDomainForAnalysisTask; used to set the domain
746 of the charts in the analysis task page.
747 (ChartsPage.createStateForAnalysisTask):
749 * public/v3/pages/dashboard-page.js:
751 (DashboardPage.prototype._createChartForCell):
753 2016-02-10 Ryosuke Niwa <rniwa@webkit.org>
755 Add the support for maintenance mode
756 https://bugs.webkit.org/show_bug.cgi?id=154072
758 Reviewed by Chris Dumez.
760 Added the crude support for maintenance mode whereby which the reports are stored in the filesystem
761 instead of the database.
763 * config.json: Added maintenanceMode and maintenanceDirectory as well as forgotten siteTitle and
764 remoteServer.httpdMutexDir.
765 * public/api/report.php:
766 (main): Don't connect to the database or modify database when maintenanceMode is set.
767 * public/include/json-header.php:
768 (ensure_privileged_api_data): Exit with InMaintenanceMode when maintenanceMode is set. This prevents
769 privileged API such as creating analysis tasks and new A/B testing groups from modifying the database.
771 2016-02-09 Ryosuke Niwa <rniwa@webkit.org>
773 Analysis task page on v3 show progression as regressions
774 https://bugs.webkit.org/show_bug.cgi?id=154045
776 Reviewed by Chris Dumez.
778 The bug was caused by TestGroup.compareTestResults referring to undefined _smallerIsBetter.
779 Retrieve it from the associated metric object via the owner analysis task.
781 * public/v3/models/test-group.js:
783 2016-02-05 Ryosuke Niwa <rniwa@webkit.org>
785 Testing with remote server cache is unusably slow
786 https://bugs.webkit.org/show_bug.cgi?id=153928
788 Reviewed by Chris Dumez.
790 Don't use the single process mode of httpd as it's way too slow even for testing.
791 Also we'll hit a null pointer crash (http://svn.apache.org/viewvc?view=revision&revision=1711479)
793 Since httpd exits immediately when launched in multi-process mode, remote-cache-server.py (renamed from
794 run-with-remote-server.py) now has "start" and "stop" commands to start/stop the Apache. Also added
795 "reset" command to reset the cache for convenience.
797 * Install.md: Updated the instruction.
798 * config.json: Fixed a typo: httpdErro*r*Log.
799 * tools/remote-cache-server.py: Copied from Websites/perf.webkit.org/tools/run-with-remote-server.py.
800 Now takes one of the following commands: "start", "stop", and "reset".
802 (start_httpd): Extracted from main.
804 * tools/remote-server-relay.conf: Removed redundant (duplicate) LoadModule's.
805 * tools/run-with-remote-server.py: Removed.
807 2016-02-04 Ryosuke Niwa <rniwa@webkit.org>
809 Perf dashboard should have a script to setup database
810 https://bugs.webkit.org/show_bug.cgi?id=153906
812 Reviewed by Chris Dumez.
814 Added tools/setup-database.py to setup the database. It retrieves the database name, username, password
815 and initializes a database at the specified location.
817 * Install.md: Updated instruction to setup postgres to use setup-database.py.
818 * tools/setup-database.py: Added.
820 (load_database_config):
821 (determine_psql_dir):
822 (start_or_stop_database):
823 (execute_psql_command):
825 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
827 buildbot syncing scripts sometimes schedule more than one requests per builder
828 https://bugs.webkit.org/show_bug.cgi?id=153047
830 Reviewed by Chris Dumez.
832 The bug was caused by the check for singularity of scheduledRequests being conducted per configuration
833 instead of per builder. So if there were multiple test configurations (e.g. Speedometer and Octane) that
834 both used the same builder, then we may end up scheduling both at once.
836 Fixed the bug by sharing a single set to keep track of the scheduled requests for all configurations per
839 * tools/sync-with-buildbot.py:
840 (load_config): Share a set amongst test configurations for each builder.
841 (find_request_updates): Instead of creating a new set for each configuration, reuse the existing sets to
842 share a single set agmonst test configurations for each builder.
844 2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
846 Analysis results viewer sometimes doesn't show the correct relative difference
847 https://bugs.webkit.org/show_bug.cgi?id=152930
849 Reviewed by Chris Dumez.
851 The bug was caused by single A/B testing result associated with multiple rows when there are multiple data
852 points with the same root set which matches that of an A/B testing.
854 Fixed the bug by detecting such a case, and only associating each A/B testing result with the row created
855 for the first matching point.
857 * public/v3/components/analysis-results-viewer.js:
858 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
860 2016-01-08 Ryosuke Niwa <rniwa@webkit.org>
862 Make v3 UI analysis task page is hard to understand
863 https://bugs.webkit.org/show_bug.cgi?id=152917
865 Reviewed by Antti Koivisto.
867 Add a dark gray border around the selected block in the analysis results viewer instead of using darker
868 shades since that looks as if they were bigger regression/progression.
870 Explicitly show "Failed" as the label instead of omitting with "-" when all build requests in an A/B
873 * public/v3/components/analysis-results-viewer.js:
874 (AnalysisResultsViewer.cssTemplate): Tweaked the style to underline text in the hovered blocks and the
875 selected blocks and show a dark gray border around the selected blocks.
876 (AnalysisResultsViewer.TestGroupStackingBlock):
877 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Use this._title for title.
878 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
879 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForRootSet): Deleted.
881 * public/v3/components/results-table.js:
882 (ResultsTable.prototype.render):
883 (ResultsTable.prototype._createRevisionListCells): Extracted from ResultsTable.prototype.render.
884 (ResultsTable.cssTemplate): Tweaked the style.
886 (ResultsTableRow.prototype.constructor): Added _labelForWholeRow to store the label for the entire row.
887 This is used to show the comparison result of two root sets (e.g. A vs B).
888 (ResultsTableRow.prototype.setLabelForWholeRow): Added.
889 (ResultsTableRow.prototype.labelForWholeRow): Added.
890 (ResultsTableRow.prototype.resultContent): Extracted from buildHeading. Creates a hyperlinked bar graph
891 used for each A/B testing result.
892 (ResultsTableRow.prototype.buildHeading): Deleted since we need to set colspan on the second table cell
893 when we're creating a row with _labelForWholeRow.
895 * public/v3/components/test-group-results-table.js:
896 (TestGroupResultsTable.prototype.buildRowGroups): Added rows to show relative differences and statistical
897 significance between root sets (e.g. A vs B).
899 * public/v3/models/build-request.js:
900 (BuildRequest.prototype.hasCompleted): Added.
902 * public/v3/models/test-group.js:
903 (TestGroup.prototype.compareTestResults): Extracted from AnalysisResultsViewer.TestGroupStackingBlock's
904 _computeTestGroupStatus and generalized to be reused in TestGroupResultsTable.
905 (TestGroup.prototype._valuesForRootSet): Moved from AnalysisResultsViewer.TestGroupStackingBlock.
907 * public/v3/pages/analysis-task-page.js:
908 (AnalysisTaskPage.cssTemplate): Tweaked the style.
910 2016-01-07 Ryosuke Niwa <rniwa@webkit.org>
912 Perf dashboard should automatically add aggregators
913 https://bugs.webkit.org/show_bug.cgi?id=152818
915 Reviewed by Chris Dumez.
917 When an aggregator entry is missing in aggregators table, automatically insert it in /api/report.
919 In a very early version of the perf dashboard, we had the ability to define a custom aggregator
920 in an admin page. In practice, nobody used or needed this feature so we got rid of it even before
921 the dashboard was landed into WebKit repository. This patch cleans up that mess.
924 (main): Added the filtering capability.
925 (TestEnvironment): Expose the config JSON in the test environment.
927 * public/include/report-processor.php:
928 (ReportProcessor): Renamed name_to_aggregator now that it only contains ID.
929 (ReportProcessor::__construct): No longer fetches the aggregator table. An equivalent work is done
930 in newly added ensure_aggregators.
931 (ReportProcessor::process): Calls ensure_aggregators which populates name_to_aggregator_id.
932 (ReportProcessor::ensure_aggregators): Added. Add the builtin aggregators: Arithmetic, Geometric,
934 (TestRunsGenerator): Renamed name_to_aggregator now that it only contains ID.
935 (TestRunsGenerator::__construct):
936 (TestRunsGenerator::add_aggregated_metric): Don't include aggregator_definition here since it's
937 never used now that all the aggregations are done natively in PHP.
938 (TestRunsGenerator::$aggregators): Added. We don't include SquareSum since it's only used for
939 computing run_square_sum_cache in test_runs table and it's useless elsewhere.
940 (TestRunsGenerator::aggregate_values): Add a comment about that.
942 * tests/api-report.js: Updated a test case to reflect the change.
944 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
946 Perf dashboard JSON API should fail gracefully when postgres is down
947 https://bugs.webkit.org/show_bug.cgi?id=152812
949 Reviewed by Chris Dumez.
951 Even though all JSON APIs returned DatabaseConnectionFailure as the status when Database::connect
952 returned a falsy value, PHP was spitting out warnings and producing HTTP responses that cannot be
953 parsed as a JSON when pg_connect failed.
955 Fixed the bug by suppressing warning messages in pg_connect.
957 * public/include/db.php:
958 (Database::connect): Use '@' prefix to suppress warning messages.
960 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
962 Perf dashboard should auto-generate manifest file when one is missing
963 https://bugs.webkit.org/show_bug.cgi?id=152813
965 Reviewed by Chris Dumez.
967 When /data/manifest.json is missing, fall back to newly added /api/manifest instead of
968 silently failing to show the UI. This will make the initial setup easier.
970 * public/api/manifest.php: Added.
972 * public/include/manifest.php:
973 (Manifest::manifest): Added.
976 (didFetchManifest): Extracted from fetchManifest.
978 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
980 Commit another forgotten change, this time, for r194653.
982 * public/v3/models/measurement-set.js:
984 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
986 The sampling of time series on v3 UI is too aggressive
987 https://bugs.webkit.org/show_bug.cgi?id=152804
989 Reviewed by Chris Dumez.
991 Fixed a bug that we were always halving the number of data points in _sampleTimeSeries
992 and increased the number of data points allowed to make the sampling less aggressive.
994 * public/v3/components/time-series-chart.js:
995 (TimeSeriesChart.prototype._ensureSampledTimeSeries): Increase the number of maximum points
996 to 2x the number of pixels divided by the radius of each point.
997 (TimeSeriesChart.prototype._sampleTimeSeries.findMedian): Changed the semantics of endIndex
998 to mean the index after the last point and renamed it to indexAfterEnd.
999 (TimeSeriesChart.prototype._sampleTimeSeries): Fixed a bug that this code always coerced two
1000 data points into one sampled data point despite of the fact i and j are sufficiently apart
1001 since data[j].time - data[i].time > timePerSample by definition.
1003 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1005 Commit the forgotten change for r194651.
1007 * public/v3/pages/domain-control-toolbar.js:
1008 (DomainControlToolbar.prototype.setStartTime):
1010 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1012 The right hand side of main chart appears to be cut off as you zoom out on v3 UI
1013 https://bugs.webkit.org/show_bug.cgi?id=152778
1015 Reviewed by Antti Koivisto.
1017 Add a padding on x-axis after the end time to make the main chart more easily interactive.
1019 * public/v3/components/time-series-chart.js:
1020 (TimeSeriesChart.prototype._computeHorizontalRenderingMetrics):
1022 * public/v3/pages/page-with-charts.js:
1023 (PageWithCharts.mainChartOptions): Add a padding of 5px at the end of x-axis.
1025 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1027 v3 UI should use four sig-figs to label y-axis of the main charts
1028 https://bugs.webkit.org/show_bug.cgi?id=152779
1030 Reviewed by Antti Koivisto.
1032 Increase the number of significant figures used in the main charts to four as done in v2 UI.
1034 * public/v3/pages/chart-pane.js:
1035 (ChartPane.constructor): Create a formatter with four significant figures.
1036 * public/v3/pages/page-with-charts.js:
1037 (PageWithCharts.mainChartOptions): Increase the width of y-axis labels.
1039 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1041 v3 UI's time range slider is harder to use than that of v2 UI
1042 https://bugs.webkit.org/show_bug.cgi?id=152780
1044 Reviewed by Antti Koivisto.
1046 Improved the time range slider by using a cubic mapping to time range and providing a text field
1047 to directly edit the number of days to show.
1049 Now an user can enter the text mode to directly edit the number of days to show by clicking on
1050 the number of days (text field is always there with opacity=0).
1052 * public/v3/pages/charts-toolbar.js:
1053 (ChartsToolbar): Store the minimum and maximum number of days allowed. Also rename _inputElement
1054 to _slider and added a new type=number text field as _editor.
1055 (ChartsToolbar.prototype.render):
1056 (ChartsToolbar.prototype.setStartTime): Exit the text mode when the number of days is changed by
1057 an URL state transition (i.e. back/forward navigation).
1058 (ChartsToolbar.prototype._setInputElementValue): Added. Updates the values of _slider and _editor.
1059 (ChartsToolbar.prototype._enterTextMode): Added. Hide the elements used by the slider mode and
1060 show the text field.
1061 (ChartsToolbar.prototype._exitTextMode): Added. Does the opposite.
1062 (ChartsToolbar.prototype._sliderValueMayHaveChanged): Renamed from _inputValueMayHaveChanged.
1063 (ChartsToolbar.prototype._editorValueMayHaveChanged): Added. Similar to _sliderValueMayHaveChanged
1064 but also corrects the value of _editor if needed.
1065 (ChartsToolbar.prototype._callNumberOfDaysCallback): Extracted from _inputValueMayHaveChanged.
1066 Also fixed a bug that we didn't update the URL state when the change event was fired without
1067 modifying the effective number of days.
1068 (ChartsToolbar.cssTemplate): Tweaked the style to support the new mode. Also set a fixed width on
1069 the span showing the number of days in the slider mode.
1071 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1073 Zooming button is broken on v3 UI
1074 https://bugs.webkit.org/show_bug.cgi?id=152777
1076 Reviewed by Chris Dumez.
1078 Bring up the zoom button in z-index so that users can click it.
1080 * public/v3/components/interactive-time-series-chart.js:
1081 (InteractiveTimeSeriesChart.cssTemplate):
1083 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
1085 v3 UI doesn't preserve the time range when charts page is opened from a dashboard
1086 https://bugs.webkit.org/show_bug.cgi?id=152776
1088 Reviewed by Chris Dumez.
1090 Fixed the bug by moving the construction of charts URL from DashboardPage.prototype.open to
1091 DashboardPage.prototype.render and re-rendering the entire page upon an URL state transition.
1093 * public/v3/pages/charts-page.js:
1094 (ChartsPage.createStateForDashboardItem): Takes the start time for the charts page.
1096 * public/v3/pages/dashboard-page.js:
1097 (DashboardPage.prototype.updateFromSerializedState): Merged _numberOfDaysDidChange and
1098 _updateChartsDomainFromToolbar into this function since they're not used elsewhere. Also re-render
1099 the entire page when transition between different number of days to show.
1100 (DashboardPage.prototype._numberOfDaysDidChange): Deleted.
1101 (DashboardPage.prototype._updateChartsDomainFromToolbar): Deleted.
1102 (DashboardPage.prototype.render): Construct URL for each charts here.
1103 (DashboardPage.prototype._createChartForCell): Don't construct URL here since this function is
1104 called once when the dashboard page is opened, and not when the time range is changed.
1106 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1108 Build fix for an old version of PHP after r194618.
1110 * public/api/measurement-set.php:
1112 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
1114 A/B testing results should be visualized intuitively on v3 UI
1115 https://bugs.webkit.org/show_bug.cgi?id=152496
1117 Rubber-stamped by Chris Dumez.
1119 Add the "stacking block" view of A/B testing results to the analysis task page on v3 UI.
1121 The patch enhances JSON APIs at /api/analysis-task /api/measurement-set/ to reduce the number of
1122 HTTP requests, and adds two UI components: TestGroupResultsTable and AnalysisResultsViewer both
1123 of which inherits from an abstract superclass: ResultsTable.
1125 ResultsTable provides a tabular presentation of measured values in regular measurement sets and
1126 A/B testing results using groups of bar graphs created by BarGraphGroup. TestGroupResultsTable
1127 inherits from this class to display A/B testing configurations and the averaged results for each
1128 configuration, and AnalysisResultsViewer inherits from it to provide an intuitive visualization
1129 of the outcomes of all A/B testing results associated with a given analysis task.
1131 * public/api/analysis-tasks.php:
1132 (main): Add the capability to find the analysis task based on its build request.
1133 This allows /v3/#/analysis/task/?buildRequest=<id> to be hyperlinked on buildbot page.
1135 * public/api/measurement-set.php:
1136 (main): Removed the unused startTime and endTime, and added "analysisTask" to query parameters.
1137 (AnalysisResultsFetcher): Added. Used to fetch measured data associated with every build request
1138 on an analysis task.
1139 (AnalysisResultsFetcher::__construct):
1140 (AnalysisResultsFetcher::fetch): Unlike MeasurementSetFetcher, we fetch the list of commits and
1141 list of measurements separately since there will be a lot less builds and commits than measured
1142 data (since we're fetching measured values for all tests and their metrics).
1143 (AnalysisResultsFetcher::fetch_commits): Fetches commits.
1144 (AnalysisResultsFetcher::format_measurement): Like MeasurementSetFetcher::format_measurement but
1145 with config_type and config_metric since we're returning measured data for all metrics and test
1147 (AnalysisResultsFetcher::format_map): Similar to MeasurementSetFetcher::format_map.
1149 * public/v3/components/analysis-results-viewer.js: Added.
1150 (AnalysisResultsViewer): Added.
1151 (AnalysisResultsViewer.prototype.didUpdateResults): This callback is called by AnalysisTaskPage
1152 when A/B testing results become available.
1153 (AnalysisResultsViewer.prototype.render): Overrides ResultsTable's render to highlight the block
1154 representing the currently selected test group.
1156 (AnalysisResultsViewer.prototype.buildRowGroups): Creates a list of rows with "stacking blocks"
1157 that visualizes A/B testing results. The algorithm works as follows: 1. Create all table rows.
1158 2. Find which row is associated with each set in each test group. 3. Layout "blocks".
1160 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Collects root sets from all data
1161 in the measurement set as well as A/B testing **requests** (results may contain more repositories
1162 than requested but they aren't interesting for the purpose of visualizing results for the entire
1165 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Create table rows. First,
1166 create table rows for measurement set points that have a matching test group (i.e. either set A
1167 or set B of an A/B testing uses the same root set as a point). Second, insert a new row for each
1168 root set in each test group which didn't find a matching measurement set point. There is a little
1169 subtlety that some A/B testing may specify revisions for a subset of repositories and/or some A/B
1170 testing results may appear as if it goes back in time with respect to other A/B testing results.
1171 For example, consider creating two A/B test groups for WebKit changes and OS changes separately.
1172 There could be no coherent linearization of those two A/B testing in which both WebKit and OS
1173 versions move forward.
1175 (AnalysisResultsViewer.RootSetInTestGroup): Added. Represents a pair (test group, root set) since
1176 a root set could be shared by multiple test groups.
1177 (AnalysisResultsViewer.TestGroupStackingBlock): Added. A stacked block representing a test group.
1178 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex): Associates a row number with
1179 either set A or set B.
1180 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Creates a table cell
1182 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Returns true if this test group
1183 has failed and this block should look "thin" without any label.
1184 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus): Computes the
1185 status for this test group.
1187 (AnalysisResultsViewer.TestGroupStackingGrid): Added. AnalysisResultsViewer uses this class to
1188 layout blocks representing test groups.
1189 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.insertBlockToColumn): Inserts a new block
1190 to layout. We keep all test groups doing the same A/B test next to each other.
1191 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.layout): Layouts each block / test group
1192 in the order they are created.
1193 (AnalysisResultsViewer.TestGroupStackingGrid.prototype._layoutBlock): Places the block in the
1194 left-most column that can accommodate it while avoiding columns of a different thin-ness. A column
1195 is thin if its A/B testing has failed, and not thin otherwise.
1196 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.createCellsForRow): Creates table cells for
1197 a given row. For each column, generate a table cell if we're in the first row and the first block
1198 starts in a later row, a block starts in the current row, or the last block ended in the previous
1199 row and the next block or the last row appears later.
1201 * public/v3/components/bar-graph-group.js: Added. A component for showing a group of bar graphs.
1202 (BarGraphGroup): Added. Creates a group of bar graphs with the same value range. It's used by
1203 AnalysisResultsViewer and ResultsTable to show bar graphs to compare values.
1204 (SingleBarGraph): A component created and collectively controlled by BarGraphGroup.
1206 * public/v3/components/results-table.js: Added.
1207 (ResultsTable): An abstract superclass for TestGroupResultsTable and AnalysisResultsViewer.
1209 (ResultsTable.prototype.render): Renders the table. 1. Call "buildRowGroups()" implemented by
1210 a subclass to obtain the list of rows. 2. Compute the list of repositories to show. 3. For each
1211 cell in the table, compute the number of rows to show the same value (for rowspan). 4. Render the
1212 table with an extra list of repositories if exists.
1214 (ResultsTable.prototype._computeRepositoryList): Compute the list of repositories to list
1215 revisions in the table. Omit repositories not present in any row or for which all rows have the
1216 same revision. In the latter case, include it in the extra repositories listed below the table.
1217 This minimizes the amount of redundant information presented to the user.
1219 (ResultsTableRow): Added. Represents a single row in the table. ResultsTable constructs necessary
1220 table cells to tabulate the associated root sets, and shows the associated result using a grouped
1221 bar graph. Additional columns are used by AnalysisResultsViewer to show stacked blocks for A/B
1224 * public/v3/components/test-group-results-table.js: Added.
1225 (TestGroupResultsTable):
1226 (TestGroupResultsTable.prototype.didUpdateResults):
1227 (TestGroupResultsTable.prototype.setTestGroup):
1228 (TestGroupResultsTable.prototype.heading):
1229 (TestGroupResultsTable.prototype.render):
1230 (TestGroupResultsTable.prototype.buildRowGroups):
1232 * public/v3/index.html:
1233 * public/v3/models/analysis-results.js: Added.
1234 (AnalysisResults): Added. Like MeasurementSet, this class represents a set of measured values
1235 associated with a given analysis task.
1236 (AnalysisResults.prototype.find): Returns a measured valued for a given build and metric.
1237 (AnalysisResults.prototype.add): Adds a new measured value. Used by AnalysisResults.fetch.
1238 (AnalysisResults.fetch): Fetches data and creates AnalysisResults for a given analysis task.
1240 * public/v3/models/analysis-task.js:
1241 (AnalysisTask.prototype.startMeasurementId): Added.
1242 (AnalysisTask.prototype.endMeasurementId): Added.
1243 (AnalysisTask.fetchByBuildRequestId): Added.
1244 (AnalysisTask._fetchSubset): Uses DataModelObject.cachedFetch.
1246 * public/v3/models/build-request.js: Added.
1247 (BuildRequest): Added. Represents a single A/B testing request associated with a test group.
1249 * public/v3/models/builder.js:
1250 (Build): Added. Represents a build associated with a given A/B testing result.
1252 * public/v3/models/commit-log.js:
1253 (CommitLog): Made this class inherit from DataModelObject.
1254 (CommitLog.ensureSingleton): Added. Finds the singleton object created for a given revision
1255 in the specified repository. This helps RootSet and other classes compare commits fast.
1256 (CommitLog.prototype.repository): Added.
1257 (CommitLog.fetchBetweenRevisions): Uses CommitLog.ensureSingleton.
1259 * public/v3/models/data-model.js:
1261 (DataModelObject.namedStaticMap): Added.
1262 (DataModelObject.ensureNamedStaticMap): Renamed from namedStaticMap instead of implicitly
1263 assuming that the non-static version always creates the map.
1264 (DataModelObject.prototype.namedStaticMap): Added.
1265 (DataModelObject.cachedFetch): Extracted from AnalysisTask._fetchSubset so that TestGroup's
1266 fetchByTask could also use it.
1269 * public/v3/models/measurement-adaptor.js: Added.
1270 (MeasurementAdaptor): Extracted from MeasurementCluster. This class is responsible for
1271 re-formatting the data received via /api/measurement-set JSON API inside the v3 UI.
1272 (MeasurementAdaptor.prototype.extractId): Added.
1273 (MeasurementAdaptor.prototype.adoptToAnalysisResults): Added. Used by AnalysisResults.
1274 (MeasurementAdaptor.aggregateAnalysisResults): Added. Used by TestGroupResultsTable to
1275 aggregate results for each test configuration; e.g. computing the average for set A.
1276 (MeasurementAdaptor.prototype.adoptToSeries): Extracted from MeasurementCluster.addToSeries.
1277 Added rootSet() to each point. This allows AnalysisResultsViewer to compare them against root
1278 sets associated with A/B testing results.
1279 (MeasurementAdaptor.computeConfidenceInterval): Moved from MeasurementCluster.
1281 * public/v3/models/measurement-cluster.js:
1282 (MeasurementCluster):
1283 (MeasurementCluster.prototype.addToSeries):
1285 * public/v3/models/repository.js:
1286 (Repository.prototype.hasUrlForRevision): Added.
1288 * public/v3/models/root-set.js: Added.
1289 (RootSet): Added. Represents a set of commits in measured results.
1290 (MeasurementRootSet): Added. Ditto for results associated with A/B testing.
1292 * public/v3/models/test-group.js: Added.
1293 (TestGroup): Added. Represents a A/B testing on analysis task.
1294 (TestGroup.prototype.createdAt): Added.
1295 (TestGroup.prototype.buildRequests): Returns the list of build requests associated with this
1297 (TestGroup.prototype.addBuildRequest): Added. Used by BuildRequest's constructor to associate
1298 itself with this group.
1299 (TestGroup.prototype.didSetResult): Added. Called by BuildRequest.setResult when measured
1300 values are fetched and associated with a build request in this group.
1302 * public/v3/models/test.js:
1305 * public/v3/pages/analysis-task-page.js:
1307 (AnalysisTaskPage.prototype.updateFromSerializedState): Fetch the analysis task, test groups
1308 associated with it, and all A/B testing results based on the task id or the build request id
1309 specified in the URL.
1310 (AnalysisTaskPage.prototype._didFetchTask): Added. Start fetching the measured data. This is
1311 the data on charts page for which this analysis task was created, not results of A/B testing.
1312 (AnalysisTaskPage.prototype._didFetchMeasurement): Added. Display the fetched data in a table
1313 inside AnalysisResultsViewer.
1314 (AnalysisTaskPage.prototype._didFetchTestGroups): Added. Display the list of A/B test groups
1315 as well as the results of the first A/B testing.
1316 (AnalysisTaskPage.prototype._didFetchAnalysisResults): Added.
1317 (AnalysisTaskPage.prototype._assignTestResultsIfPossible): Added. Once both the analysis task,
1318 A/B test groups as well as their results are fetched, update build requests in each test group
1320 (AnalysisTaskPage.prototype.render): Show the list of test groups and highlight the currently
1322 (AnalysisTaskPage.prototype._showTestGroup): Added. A callback used by AnalysisResultsViewer
1323 and TestGroupResultsTable to notify this class when the user selects a new test group.
1324 (AnalysisTaskPage.htmlTemplate): Updated the template.
1325 (AnalysisTaskPage.cssTemplate): Ditto.
1327 * public/v3/pages/charts-page.js:
1328 (ChartsPage.createStateForAnalysisTask): Added. Creates a URL state object for opening a chart
1329 associated with an analysis task.
1331 2015-12-22 Ryosuke Niwa <rniwa@webkit.org>
1333 Analysis task page is slow to load
1334 https://bugs.webkit.org/show_bug.cgi?id=152517
1336 Reviewed by Andreas Kling.
1338 The slowness comes from r194130 which made the JSON API at /api/analysis-tasks to report the start
1339 and the end of each analysis task. This query was adding ~2s to the total JSON generation time.
1341 Cache these values on analysis_task table since they never change once an analysis task is created.
1343 * init-database.sql: Added columns task_start_run_time and task_end_run_time to analysis_task table.
1344 Also added the missing drop statements at the top.
1346 * public/api/analysis-tasks.php:
1347 (fetch_and_push_bugs_to_tasks): Don't fetch the latest commit time of the start and the end.
1348 (format_task): Report task_start_run_time and task_end_run_time as startRunTime and endRunTime.
1350 * public/privileged-api/create-analysis-task.php:
1351 (main): Set start_run_time and end_run_time when creating an analysis task.
1352 (time_for_run): Added.
1354 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1356 v3 UI shouldn't open/close pane selector by mouseenter/leave
1357 https://bugs.webkit.org/show_bug.cgi?id=152399
1359 Reviewed by Andreas Kling.
1361 Removed the code to open and close the pane selector by mouseenter and mouseleave
1362 since multiple people have complained about the behavior.
1364 * public/v3/pages/charts-toolbar.js:
1365 (ChartsToolbar): Removed the event listeners.
1366 (ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
1367 to better support the use case of adding multiple panes.
1368 (ChartsToolbar.cssTemplate): Tweaked CSS.
1370 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1372 Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
1373 https://bugs.webkit.org/show_bug.cgi?id=152389
1375 Reviewed by Darin Adler.
1377 Compute the x coordinate of the popover from the center of each annotation bar.
1379 Also adjust the x coordinate to keep the popover within the charts.
1381 * public/v3/components/interactive-time-series-chart.js:
1382 (InteractiveTimeSeriesChart.prototype._renderChartContent):
1384 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1386 Dashboard charts should have uniform widths on v3 UI
1387 https://bugs.webkit.org/show_bug.cgi?id=152395
1389 Reviewed by Chris Dumez.
1391 Fix the bug by applying table-layout: fixed on the dashboard table.
1393 * public/v3/pages/dashboard-page.js:
1394 (DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
1395 (DashboardPage.cssTemplate): Adjusted CSS accordingly.
1397 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
1399 Closing a pane on v3 UI always closes the last pane
1400 https://bugs.webkit.org/show_bug.cgi?id=152388
1402 Reviewed by Chris Dumez.
1404 The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
1405 Fixed it by passing in "this" pane object to the first argument.
1407 * public/v3/pages/chart-pane.js:
1410 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1412 Perf Dashboard v3 UI doesn't show recent data points on v2 UI
1413 https://bugs.webkit.org/show_bug.cgi?id=152368
1415 Reviewed by Chris Dumez.
1417 The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
1418 which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
1419 to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
1421 !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
1423 Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
1425 * public/api/measurement-set.php:
1426 (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
1427 * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
1428 of the last modified date depends on when tests run, we can't assert it to be a certain value.
1430 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1432 v3 UI should show and link the build number on charts page
1433 https://bugs.webkit.org/show_bug.cgi?id=152359
1435 Reviewed by Chris Dumez.
1437 Show the hyperlinked build number in the v3 UI.
1439 * public/v3/models/builder.js:
1440 (Builder): Renamed _buildURL to _buildUrlTemplate.
1441 (Builder.prototype.urlForBuild): Added.
1442 * public/v3/pages/chart-pane-status-view.js:
1443 (ChartPaneStatusView):
1444 (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
1445 (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
1446 if the current point is set by an indicator (not by a selection).
1448 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1450 v3 dashboard doesn't stretch charts to fill the screen
1451 https://bugs.webkit.org/show_bug.cgi?id=152354
1453 Reviewed by Chris Dumez.
1455 The bug was caused by a workaround to avoid canvas stretching table cell too much.
1457 Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
1458 so that it does not contribute to the intrinsic/natural width of the cell.
1460 * public/v3/components/time-series-chart.js:
1461 (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
1462 (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
1463 the canvas does not resize with it.
1464 * public/v3/pages/dashboard-page.js:
1465 (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
1467 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
1469 The chart status on v3 UI sometimes show wrong revision ranges
1470 https://bugs.webkit.org/show_bug.cgi?id=152331
1472 Reviewed by Chris Dumez.
1474 The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
1475 when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
1476 finds the sampled data point immediately preceding the current point (at which the indicator is shown).
1478 * public/v3/components/chart-status-view.js:
1479 (ChartStatusView.prototype.updateStatusIfNeeded):
1481 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1483 Perf dashboard's cycler page should use v3 UI
1484 https://bugs.webkit.org/show_bug.cgi?id=152324
1486 Reviewed by Chris Dumez.
1488 Use the v3 UI in cycler.html after r194130.
1490 * public/cycler.html:
1491 * public/v3/index.html: Removed the reference to a non-existent platform-selector.js.
1493 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1495 Add v3 UI to perf dashboard
1496 https://bugs.webkit.org/show_bug.cgi?id=152311
1498 Reviewed by Chris Dumez.
1500 Add the third iteration of the perf dashboard UI. UI for viewing and modifying analysis tasks is coming soon.
1501 The v3 UI is focused on speed, and removes all third-party script dependencies including jQuery, d3, and Ember.
1502 Both the DOM-based UI and graphing are implemented manually.
1505 The entire app is structured using new component library implemented in components/base.js. Each component is
1506 an instance of a subclass of ComponentBase which owns a single DOM element. Each subclass may supply static
1507 methods named htmlTemplate and cssTemplate as the template for a component instance. ComponentBase automatically
1508 clones the templates inside the associated element (or its shadow root on the supported browsers). Each subclass
1509 must supply a method called "render()" which constructs and updates the DOM as needed.
1511 There is a special component called Page, which represents an entire page. Each Page is opened by PageRouter's
1512 "route()" function. Each subclass of Page supplies "open()" for initialization and "updateFromSerializedState()"
1513 for a hash URL transition.
1516 The key feature of the v3 UI is the split of time series into chunks called clusters (see r194120). On an internal
1517 instance of the dashboard, the v2 UI downloads 27MB of data whereas the same page loads only 3MB of data in the v3.
1518 The key logic for fetching time series in chunks is implemented by MeasurementSet in /v3/models/measurement-set.js.
1519 We first fetch the cached primary cluster (the cluster that contains the newest data) at:
1520 /data/measurement-set-<platform-id>-<metric-id>.json
1522 If that's outdated according to lastModified in manifest.json, then we immediately re-fetch the primary cluster at:
1523 /api/measurement-set/?platform=<platform-id>&metric=<metric-id>
1525 Once the up-to-date primary cluster is fetched, we fetch all "secondary" clusters. For each cluster being fetched,
1526 including the primary, we invoke registered callbacks.
1529 In addition, the v3 UI reduces the initial page load time by loading a single bundled JS file generated by
1530 tools/bundle-v3-scripts.py. index.html has a fallback to load all 44 JS files individually during development.
1532 * public/api/analysis-tasks.php:
1533 (fetch_and_push_bugs_to_tasks): Added the code to fetch start and end run times. This is necessary in V3 UI
1534 because no longer fetch the entire time series. See r194120 for the new measurement set JSON API.
1535 (format_task): Compute the category of an analysis task based on "result" value. This will be re-vamped once
1536 I add the UI for the analysis task page in v3.
1538 * public/include/json-header.php:
1539 (require_format): CamelCase the name.
1540 (require_match_one_of_values): Ditto.
1541 (validate_arguments): Renamed from require_existence_of and used in measurement-set.php landed in r194120.
1544 * public/v3/components: Added.
1546 * public/v3/components/base.js: Added.
1547 (ComponentBase): The base component class.
1548 (ComponentBase.prototype.element): Returns the DOM element associated with the DOM element.
1549 (ComponentBase.prototype.content): Returns the shadow root if one exists and the associated element otherwise.
1550 (ComponentBase.prototype.render): To be implemented by a subclass.
1551 (ComponentBase.prototype.renderReplace): A helper function to "render" DOM contents.
1552 (ComponentBase.prototype._constructShadowTree): Called inside the constructor to instantiate the templates.
1553 (ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Instantiates components referred by
1554 its element name inside the instantiated content.
1555 (ComponentBase.isElementInViewport): A helper function. Returns true if the element is in the viewport and it has
1556 non-zero width and height.
1557 (ComponentBase.defineElement): Defines a custom element that can be automatically instantiated from htmlTemplate.
1558 (ComponentBase.createElement): A helper function to create DOM tree to be used in "render()" method.
1559 (ComponentBase._addContentToElement): A helper for "createElement".
1560 (ComponentBase.createLink): A helper function to create a hyperlink or another clickable element (via callback).
1561 (ComponentBase.createActionHandler): A helper function to create an event listener that prevents the default action
1562 and stops the event propagation.
1564 * public/v3/components/button-base.js: Added.
1566 * public/v3/components/chart-status-view.js: Added.
1567 (ChartStatusView): A component that reports the current status of time-series-chart. It's subclasses by
1568 ChartPaneStatusView to provide additional information in the charts page's panes.
1570 * public/v3/components/close-button.js: Added.
1572 * public/v3/components/commit-log-viewer.js: Added.
1573 (CommitLogViewer): A component that lists commit revisions along with commit messages for a range of data points.
1575 * public/v3/components/interactive-time-series-chart.js: Added.
1576 (InteractiveTimeSeriesChart): A subclass of InteractiveTimeSeriesChart with interactivity (selection & indicator).
1577 Selection and indicator are mutually exclusive.
1579 * public/v3/components/pane-selector.js: Added.
1580 (PaneSelector): A component for selecting (platform, metric) pair to add in the charts page.
1582 * public/v3/components/spinner-icon.js: Added.
1584 * public/v3/components/time-series-chart.js: Added.
1585 (TimeSeriesChart): A canvas-based chart component without interactivity. It takes a source list and options as
1586 the constructor arguments. A source list is a list of measurement sets (measurement-set.js) with drawing options.
1587 This component fetches data via MeasurementSet.fetchBetween inside TimeSeriesChart.prototype.setDomain and
1588 progressively updates the charts as more data arrives. The canvas is updated on animation frame via rAF and all
1589 layout and rendering metrics are lazily computed in _layout. In addition, this component samples data before
1590 rendering the chart when there are more data points per pixel in _ensureSampledTimeSeries.
1592 * public/v3/index.html: Added. Loads bundled-scripts.js if it exists, or individual script files otherwise.
1594 * public/v3/instrumentation.js: Added. This class is used to gather runtime statistics of v3 UI. (It measures
1595 the performance of the perf dashboard UI).
1597 * public/v3/main.js: Added. Bootstraps the app.
1601 * public/v3/models: Added.
1602 * public/v3/models/analysis-task.js: Added.
1603 * public/v3/models/bug-tracker.js: Added.
1604 * public/v3/models/bug.js: Added.
1605 * public/v3/models/builder.js: Added.
1606 * public/v3/models/commit-log.js: Added.
1607 * public/v3/models/data-model.js: Added.
1608 (DataModelObject): The base class for various data objects that correspond to database tables. It supplies static
1609 hash map to find entries by id as well as other keys.
1610 (LabeledObject): A subclass of DataModelObject with the capability to find an object via its name.
1612 * public/v3/models/measurement-cluster.js: Added.
1613 (MeasurementCluster): Represents a single cluster or a chunk of data in a measurement set.
1615 * public/v3/models/measurement-set.js: Added.
1616 (MeasurementSet): Represents a measurement set.
1617 (MeasurementSet.findSet): Returns the singleton set given (metric, platform). We use singleton to avoid issuing
1618 multiple HTTP requests for the same JSON when there are multiple TimeSeriesChart that show the same graph (e.g. on
1619 charts page with overview and main charts).
1620 (MeasurementSet.prototype.findClusters): Finds the list of clusters to fetch in a given time range.
1621 (MeasurementSet.prototype.fetchBetween): Fetch clusters for a given time range and calls callback whenever new data
1622 arrives. The number of callbacks depends on the how many clusters need to be newly fetched.
1623 (MeasurementSet.prototype._fetchSecondaryClusters): Fetches non-primary (non-latest) clusters.
1624 (MeasurementSet.prototype._fetch): Issues a HTTP request to fetch a cluster.
1625 (MeasurementSet.prototype._didFetchJSON): Called when a cluster is fetched.
1626 (MeasurementSet.prototype._failedToFetchJSON): Called when the fetching of a cluster has failed.
1627 (MeasurementSet.prototype._invokeCallbacks): Invokes callbacks upon an approval of a new cluster.
1628 (MeasurementSet.prototype._addFetchedCluster): Adds the newly fetched cluster in the order.
1629 (MeasurementSet.prototype.fetchedTimeSeries): Returns a time series that contains data from all clusters that have
1631 (TimeSeries.prototype.findById): Additions to TimeSeries defined in /v2/data.js.
1632 (TimeSeries.prototype.dataBetweenPoints): Ditto.
1633 (TimeSeries.prototype.firstPoint): Ditto.
1635 * public/v3/models/metric.js: Added.
1636 * public/v3/models/platform.js: Added.
1637 * public/v3/models/repository.js: Added.
1638 * public/v3/models/test.js: Added.
1640 * public/v3/pages: Added.
1641 * public/v3/pages/analysis-category-page.js: Added. The "Analysis" page that lists the analysis tasks.
1642 * public/v3/pages/analysis-category-toolbar.js: Added. The toolbar to filter analysis tasks based on its category
1643 (unconfirmed, bisecting, identified, closed) and a keyword.
1645 * public/v3/pages/analysis-task-page.js: Added. Not implemented yet. It just has the hyperlink to the v2 UI.
1647 * public/v3/pages/chart-pane-status-view.js: Added.
1648 (ChartPaneStatusView): A subclass of ChartStatusView used in the charts page. In addition to the current value,
1649 comparison to baseline/target, it shows the list of repository revisions (e.g. WebKit revision, OS version).
1651 * public/v3/pages/chart-pane.js: Added.
1652 (ChartPane): A component a pane in the charts page. Each pane has the overview chart and the main chart. The zooming
1653 is synced across all panes in the charts page.
1655 * public/v3/pages/charts-page.js: Added. Charts page.
1656 * public/v3/pages/charts-toolbar.js: Added. The toolbar to set the number of days to show. This affects the overview
1657 chart's domain in each pane.
1659 * public/v3/pages/create-analysis-task-page.js: Added.
1660 (CreateAnalysisTaskPage): A page that gets shown momentarily while creating a new analysis task.
1662 * public/v3/pages/dashboard-page.js: Added. A dashboard page.
1663 * public/v3/pages/dashboard-toolbar.js: Added. Its toolbar with buttons to select the number of days to show.
1664 * public/v3/pages/domain-control-toolbar.js: Added. An abstract superclass of charts and dashboard toolbars.
1666 * public/v3/pages/heading.js: Added. A component for displaying the header and toolbar, if exists, on each page.
1667 * public/v3/pages/page-router.js: Added. This class is responsible for updating the URL hashes as well as opening
1668 and updating each page when the hash changes (via back/forward navigation).
1669 * public/v3/pages/page-with-charts.js: Added. An abstract subclass of page used by dashboards and charts page.
1670 Supplies helper functions for creating TimeSeriesChart options.
1671 * public/v3/pages/page-with-heading.js: Added. An abstract subclass of page that uses the heading component.
1672 * public/v3/pages/page.js: Added. The Page component.
1673 * public/v3/pages/toolbar.js: Added. An abstract toolbar component.
1675 * public/v3/remote.js: Added.
1676 (getJSON): Fetches JSON from the remote server.
1677 (getJSONWithStatus): Ditto. Rejects the response if the status is not "OK".
1678 (PrivilegedAPI.sendRequest): Posts a HTTP request to a privileged API in /privileged-api/.
1679 (PrivilegedAPI.requestCSRFToken): Creates a new CSRF token to request a privileged API post.
1681 * tools/bundle-v3-scripts.py: Added.
1682 (main): Bundles js files together and minifies them by jsmin.py for the v3 UI. Without this script, we're forced to
1683 download 44 JS files or making each JS file contain multiple classes.
1685 * tools/jsmin.py: Copied from WebInspector / JavaScriptCore code.
1687 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1689 Fix v2 UI after r194093.
1691 * public/v2/data.js:
1693 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
1695 Add /api/measurement-set for v3 UI
1696 https://bugs.webkit.org/show_bug.cgi?id=152312
1698 Rubber-stamped by Chris Dumez.
1700 The new API JSON allows the front end to fetch measured data in chunks called a "cluster" as specified
1701 in config.json for each measurement set specified by the pair of a platform and a metric.
1703 When the front end needs measured data in a given time range (t_0, t_1) for a measurement set, it first
1704 fetches the primary cluster by /api/measurement-set/?platform=<platform-id>&metric=<metric-id>.
1705 The primary cluster is the last cluster in the set (returning the first cluster here is not useful
1706 since we don't typically show very old data), and provides the information needed to fetch other clusters.
1708 Fetching the primary cluster also creates JSON files at:
1709 /data/measurement-set-<platform-id>-<metric-id>-<cluster-end-time>.json
1710 to allow latency free access for secondary clusters. The front end code can also fetch the cache of
1711 the primary cluster at: /data/measurement-set-<platform-id>-<metric-id>.json.
1713 Because the front end code has to behave as if all data is fetched, each cluster contains one data point
1714 immediately before the first data point and one immediately after the last data point. This avoids having
1715 to fetch multiple empty clusters for manually specified baseline data. To support this behavior, we generate
1716 all clusters for a given measurement set at once when the primary cluster is requested.
1718 Furthermore, all measurement sets are divided at the same time into clusters so that the boundary of clusters
1719 won't shift as more data are reported to the server.
1721 * config.json: Added clusterStart and clusterSize as options.
1722 * public/api/measurement-set.php: Added.
1724 (MeasurementSetFetcher::__construct):
1725 (MeasurementSetFetcher::fetch_config_list): Finds configurations that belongs to this (platform, metric) pair.
1726 (MeasurementSetFetcher::at_end): Returns true if we've reached the end of all clusters for this set.
1727 (MeasurementSetFetcher::fetch_next_cluster): Generates the JSON data for the next cluster. We generate clusters
1728 in increasing chronological order (the oldest first and the newest last).
1729 (MeasurementSetFetcher::execute_query): Executes the main query.
1730 (MeasurementSetFetcher::format_map): Returns the mapping of a measurement field to an array index. This removes
1731 the need to have key names for each measurement and reduces the JSON size by ~10%.
1732 (MeasurementSetFetcher::format_run): Creates an array that contains data for a single measurement. The order
1733 matches that of keys in format_map.
1734 (MeasurementSetFetcher::parse_revisions_array): Added. Copied from runs.php.
1735 * tests/api-measurement-set.js: Added. Added tests for /api/measurement-set.
1737 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1739 Using fake timestamp in OS version make some results invisible
1740 https://bugs.webkit.org/show_bug.cgi?id=152289
1742 Reviewed by Stephanie Lewis.
1744 Fix various bugs after r194088.
1746 * public/api/commits.php:
1747 (format_commit): Include the commit order.
1748 * public/v2/data.js:
1749 (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
1750 * tools/pull-os-versions.py:
1751 (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
1752 (available_builds_from_command): Exit early when an exception is thrown.
1754 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1756 Fix a typo in the previous commit.
1758 * public/include/report-processor.php:
1760 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1762 Build fix after r192965. Suppress a warning about log being referred to as a closure variable.
1764 * public/include/report-processor.php:
1766 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1768 Using fake timestamp in OS version make some results invisible
1769 https://bugs.webkit.org/show_bug.cgi?id=152289
1771 Reviewed by Stephanie Lewis.
1773 Added commit_order column to explicitly order OS versions. This fixes the bug whereby which
1774 baseline results reported with only OS versions are shown with x coordinate set to 10 years ago.
1776 To migrate the existing database, run:
1777 ALTER TABLE commits ADD COLUMN commit_order integer;
1778 CREATE INDEX commit_order_index ON commits(commit_order);
1780 Then for each repository $1,
1781 UPDATE commits SET (commit_time, commit_order) = (NULL, CAST(EXTRACT(epoch from commit_time) as integer))
1782 WHERE commit_repository = $1;
1785 * init-database.sql: Added the column.
1786 * public/api/commits.php:
1787 (fetch_commits_between): Use commit_order to order commits when commit_time is missing.
1788 * public/api/report-commits.php:
1789 (main): Set commit_order.
1790 * tools/pull-os-versions.py:
1791 (OSBuildFetcher.fetch_and_report_new_builds):
1792 (OSBuildFetcher._assign_order): Renamed from _assign_fake_timestamps. Set the order instead of a fake timestmap.
1794 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
1796 Perf dashboard can't merge when the destination platform is missing baseline/target
1797 https://bugs.webkit.org/show_bug.cgi?id=152286
1799 Reviewed by Stephanie Lewis.
1801 The bug was caused by the query to migrate test configurations to new platform checking
1802 configuration type and metric separately; that is, it assumes the configuration exists
1803 only if either the same type or the same metric exists in the destination.
1805 Fixed the bug by checking both conditions simultaneously for each configuration.
1807 * public/admin/platforms.php:
1808 * tests/admin-platforms.js: Added a test.
1810 2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
1812 Perf dashboard's buildbot sync config JSON duplicates too much information
1813 https://bugs.webkit.org/show_bug.cgi?id=152196
1815 Reviewed by Stephanie Lewis.
1817 Added shared, per-builder, and per-test (called type) configurations.
1819 * tools/sync-with-buildbot.py:
1821 (load_config.merge):
1823 2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
1825 Perf dashboard should avoid overflow during geometric mean computation
1826 https://bugs.webkit.org/show_bug.cgi?id=151773
1828 Reviewed by Chris Dumez.
1830 * public/include/report-processor.php:
1832 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
1834 Perf dashboard should extend baseline and target to the future
1835 https://bugs.webkit.org/show_bug.cgi?id=151511
1837 Reviewed by Darin Adler.
1839 * public/v2/data.js:
1840 (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
1841 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
1842 (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
1843 (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
1844 * public/v2/manifest.js:
1845 (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
1847 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
1849 Perf dashboard should always show comparison to baseline and target even if one is missing
1850 https://bugs.webkit.org/show_bug.cgi?id=151510
1852 Reviewed by Darin Adler.
1854 Show the comparison status against the baseline when baseline is present but target is missing.
1856 To make the code more readable, this patch splits the logic into three cases:
1857 1. Both baseline and target are present
1858 2. Only baseline is present
1859 3. Only target is present
1861 Also extracted a helper function to construct the label.
1864 (.labelForDiff): Added.
1865 (App.Pane.computeStatus):
1867 2015-11-23 Commit Queue <commit-queue@webkit.org>
1869 Unreviewed, rolling out r192716 and r192717.
1870 https://bugs.webkit.org/show_bug.cgi?id=151582
1872 The patch was incorrect. We always need at least one data
1873 point in each configuration (Requested by rniwa on #webkit).
1875 Reverted changesets:
1877 "Perf dashboard's should not include results more than 366
1879 https://bugs.webkit.org/show_bug.cgi?id=151529
1880 http://trac.webkit.org/changeset/192716
1882 "Build fix for old version of PHP."
1883 http://trac.webkit.org/changeset/192717
1885 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1887 Build fix for old version of PHP.
1889 * public/api/runs.php:
1891 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1893 Perf dashboard's should not include results more than 366 days old in JSON
1894 https://bugs.webkit.org/show_bug.cgi?id=151529
1896 Reviewed by Timothy Hatcher.
1898 Don't return results more than 366 days old in /api/runs/ JSON API.
1899 This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.
1901 * public/api/runs.php:
1902 (main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
1903 Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
1904 of doing so will be included in elapsedTime.
1905 (RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
1906 (RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
1907 (RunsGenerator::parse_revisions_array): Compute the max of commit times.
1909 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1911 Remove chartPointRadius from interactive chart component
1912 https://bugs.webkit.org/show_bug.cgi?id=151480
1914 Reviewed by Darin Adler.
1916 Replaced the parameter by CSS rules.
1918 * public/v2/chart-pane.css:
1920 (.chart .dot.foreground):
1921 (.chart .highlight):
1923 * public/v2/index.html:
1924 * public/v2/interactive-chart.js:
1925 (App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
1926 (App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):
1928 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
1930 Perf dashboard's runs API uses more than 128MB of memory
1931 https://bugs.webkit.org/show_bug.cgi?id=151478
1933 Reviewed by Andreas Kling.
1935 Don't fetch all query results at once to avoid using twice as much memory as needed.
1936 Use iterative API to format each result at a time.
1938 This change is also a 5% runtime performance gain.
1940 * public/api/runs.php:
1941 (RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
1942 no longer needed as we pass in each configuration type explicitly to fetch_runs.
1943 (RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
1944 Also moved the logic to compute the last modified time here.
1945 (RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
1946 (RunsGeneratorForTestGroup):
1947 (RunsGeneratorForTestGroup::__construct):
1948 (RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.
1950 * public/include/db.php:
1951 (generate_data_file): Lock the file to avoid corruption.
1953 2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
1955 Perf dashboard always fetches charts JSON twice
1956 https://bugs.webkit.org/show_bug.cgi?id=151483
1958 Reviewed by Andreas Kling.
1960 Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
1961 obsolete (shouldRefetch is set true) or corrupt (the second closure).
1966 2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
1968 Internal perf dashboard takes forever to load
1969 https://bugs.webkit.org/show_bug.cgi?id=151430
1971 Rubber-stamped by Antti Koivisto.
1973 Fix a few performance problems with the perf dashboard v2 UI.
1976 (App.DashboardRow._createPane): Set "inDashboard" to true.
1977 (App.Pane._fetch): Immediately show the cached chart instead of waiting for the refetched data which invokes
1978 a PHP JSON API. Also don't fetch the analysis tasks when the chart is shown in the dashboard since we don't
1979 show annotate charts in the dashboard.
1981 2015-10-15 Ryosuke Niwa <rniwa@webkit.org>
1983 Unreviewed fix of a test after r190687.
1985 * tests/admin-regenerate-manifest.js:
1987 2015-10-12 Ryosuke Niwa <rniwa@webkit.org>
1989 Perf dashboard tools shouldn't require server credentials in multiple configuration files
1990 https://bugs.webkit.org/show_bug.cgi?id=149994
1992 Reviewed by Chris Dumez.
1994 Made detect-changes.js and pull-svn.py pull username and passwords from the server config JSON to reduce
1995 the number of JSON files that need to include credentials.
1997 Also made each script reload the server config after sleep to allow dynamic credential updates.
1999 In addition, change the server config JSON's format to include scheme, host, and port numbers separately
2000 instead of a url since detect-changes.js needs each value separately.
2002 This reduces the number of JSONs with credentials to two for our internal dashboard.
2004 * tools/detect-changes.js:
2005 (main): Added a property argument parsing. Now takes --server-config-json, --change-detection-config-json,
2006 and --seconds-to-sleep like other scripts.
2007 (parseArgument): Added.
2008 (fetchManifestAndAnalyzeData): Reload the server config JSON.
2009 (loadServerConfig): Added. Set settings.perfserver and settings.slave from the server config JSON. Also
2010 add settings.perfserver.host to match the old format.
2011 (configurationsForTesting): Fixed a bug that we throw an exception when a dashboard contains an empty cell.
2013 * tools/pull-os-versions.py:
2014 (main): Use load_server_config after each sleep.
2016 * tools/pull-svn.py:
2017 (main): Use load_server_config after each sleep.
2018 (fetch_commits_and_submit): Use the perf dashboard's auth as subversion credential when useServerAuth is set.
2020 * tools/sync-with-buildbot.py:
2021 (main): Use load_server_config after each sleep.
2024 (load_server_config): Extracted from python scripts. Computes server's url from scheme, host, and port number
2025 to match the old format python scripts except.
2027 2015-10-11 Ryosuke Niwa <rniwa@webkit.org>
2029 Build fix after r190817. Now that pull-os-versions store fake timestamps, we need to bypass timestamp
2030 checks for OS versions when bots try to report new results. Otherwise, we fail to process the reports
2031 with a MismatchingCommitTime error.
2033 * public/include/report-processor.php:
2034 (ReportProcessor::resolve_build_id):
2036 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2038 Perf dashboard erroneously shows an old OS build in A/B testing range
2039 https://bugs.webkit.org/show_bug.cgi?id=149942
2041 Reviewed by Darin Adler.
2043 Ordering OS builds lexicologically turned out be a bad idea since 15A25 falls between 15A242 and 15A251.
2044 Use a fake/synthetic timestamp to force the commonly understood total order instead.
2046 Refactored pull-os-versions.py to share the server config JSON with other scripts. Also made the script
2047 support pulling multiple sources; e.g. both OS X and iOS.
2049 Also removed superfluous feature to submit results in chunks. The perf dashboard can handle thousands of
2050 revisions being submitted at once just fine.
2052 * public/api/commits.php:
2053 (main): A partial revert of r185574 since we no longer need to order builds lexicologically.
2055 * tools/pull-os-versions.py:
2056 (main): Takes --os-config-json, --server-config-json, and --seconds-to-sleep as arguments instead of
2057 a single --config argument to share the server config JSON with other scripts.
2058 (OSBuildFetcher): Extracted out of main. This class is instantiated for each OS kind (e.g. OS X).
2059 (OSBuildFetcher.__init__): Added.
2060 (OSBuildFetcher._fetch_available_builds): Extracted out of main. Fetches available builds from a website
2062 (OSBuildFetcher.fetch_and_report_new_builds): Extracted out of main. Submits the fetched builds after
2063 filtering out the ones we've already reported.
2064 (OSBuildFetcher._assign_fake_timestamps): Creates a fake timestamp to establish a total order amongst each
2065 OS X / iOS style build number such as 12A3456b.
2067 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
2069 pull-svn.py fails to sync revisions when SVN credentials is not setup
2070 https://bugs.webkit.org/show_bug.cgi?id=149941
2072 Reviewed by Chris Dumez.
2074 Added the support for specifying subversion credentials.
2076 Also added the support for pulling from multiple subversion servers. Subversion servers are specified
2077 in a JSON configuration file specified by --svn-config formatted as follows:
2082 "url": "http://svn.webkit.org/repository/webkit",
2083 "username": "webkitten",
2084 "password": "webkitten's password",
2085 "trustCertificate": true,
2086 "accountNameFinderScript":
2087 ["python", "/Volumes/Data/WebKit/Tools/Scripts/webkit-patch", "find-users"]
2092 In addition, refactored it to use the shared server config JSON for the dashboard access.
2094 * tools/pull-svn.py:
2095 (main): Now takes --svn-config-json, --server-config-json, --seconds-to-sleep and --max-fetch-count
2096 as required options instead of seven unnamed arguments.
2097 (fetch_commits_and_submit): Extracted from main. Fetches at most max_fetch_count new revisions from
2098 the subversion server, and submits them in accordance with server_config.
2099 (fetch_commit_and_resolve_author): Now takes a single repository dictionary instead of two separate
2100 arguments for name and URL to pass down the repository's authentication info to fetch_commit.
2101 (fetch_commit): Ditto. Add appropriate arguments when username and passwords are specified.
2102 (resolve_author_name_from_account): Use a list argument instead of a single string argument now that
2103 the argument comes from a JSON instead of sys.argv.
2105 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2107 Unreviewed race condition fix. Exit early when xScale or yScale is not defined.
2109 * public/v2/interactive-chart.js:
2110 (App.InteractiveChartComponent._updateRangeBarRects):
2112 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2114 Add a page that cycles through v2 dashboards
2115 https://bugs.webkit.org/show_bug.cgi?id=149907
2117 Reviewed by Chris Dumez.
2119 Add cycler.html that goes through each dashboard on v2 UI.
2121 This allows the dashboards to be cycled through on a TV screen.
2123 * public/cycler.html: Added.
2124 (loadURLAt): Appends a new iframe to load the next URL (i is the index of the dashboard to be shown)
2125 at the end of body. We don't immediately show the new iframe since it might take a while to load.
2126 (showNewFrameIfLoaded): Remove the current iframe and show the next iframe if the next dashboard has
2127 finished loading. We can't rely on DOMContentLoaded or load events because we use asynchronous XHR to
2128 load each chart's data. Instead, wait until some chart becomes available or fails to load and none of
2129 charts are still in progress to be shown.
2131 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2133 Allow custom revisions to be specified in A/B testing
2134 https://bugs.webkit.org/show_bug.cgi?id=149905
2136 Reviewed by Chris Dumez.
2138 Allow custom revision number on each "repository" when creating a test group.
2140 * public/v2/app.css:
2141 (form .analysis-group [name=customValue]): Added.
2144 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
2145 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
2146 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
2147 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
2148 revision option is selected.
2150 * public/v2/index.html: Added a text field for specifying a custom revision number.
2152 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2154 Make the site name configurable in perf dashboard
2155 https://bugs.webkit.org/show_bug.cgi?id=149894
2157 Reviewed by Chris Dumez.
2159 Added "siteTitle" as a new configuration key to specify the site name.
2161 * public/include/db.php:
2162 (config): Now takes the default value as an argument.
2163 * public/include/manifest.php:
2164 (ManifestGenerator::generate): Include siteTitle in the manifest.
2165 * public/index.html: Update the title and the heading when the manifest is loaded.
2166 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
2167 * public/v2/manifest.js:
2168 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
2170 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2172 Perf dashboard doesn't show analysis tasks anchored at outliers
2173 https://bugs.webkit.org/show_bug.cgi?id=149870
2175 Reviewed by Chris Dumez.
2177 The bug was caused by the computation of start and end times of analysis tasks being dependent on
2178 time series provided to the interactive chart component even though they are already filtered.
2180 Since the interactive chart component shouldn't be messing with the underlying data models, moved
2181 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
2182 the unfiltered time series newly exposed on ChartData.
2184 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
2186 * public/admin/fetch-from-remote.php:
2187 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
2188 and Ember can start hanging browsers (took me three hours to debug this).
2191 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
2192 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
2193 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
2194 Filter the results manually instead.
2195 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
2196 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
2197 need to call a private method on it.
2198 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
2199 This will cause chartData to be modified so just exit early and wait for getting called again.
2201 * public/v2/interactive-chart.js:
2202 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
2205 * public/v2/manifest.js:
2206 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
2207 to compute the end points of analysis tasks when their end points are outliers.
2209 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
2211 Unreviewed. Fix a typo in r190645.
2213 * public/include/db.php:
2215 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2217 V2 UI shouldn't sort dashboards lexicologically
2218 https://bugs.webkit.org/show_bug.cgi?id=149856
2220 Reviewed by Chris Dumez.
2222 Don't sort the dashboards by name in App.Manifest.
2225 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
2226 * public/v2/manifest.js:
2227 (App.Manifest.._fetchedManifest):
2229 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2231 V2 UI fails to show the data for the very first point in charts
2232 https://bugs.webkit.org/show_bug.cgi?id=149857
2234 Reviewed by Chris Dumez.
2236 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
2237 Explicitly check the type of this property instead.
2239 * public/v2/data.js:
2240 (TimeSeries.prototype.seriesBetweenPoints):
2242 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
2244 Perf dashboard should have the capability to test local UI with production data
2245 https://bugs.webkit.org/show_bug.cgi?id=149834
2247 Reviewed by Chris Dumez.
2249 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
2251 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
2253 * config.json: Added remote server configurations.
2254 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
2255 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
2258 * public/include/db.php:
2259 (config_path): Extracted from generate_data_file.
2260 (generate_data_file):
2261 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
2262 run-with-remote-server.py.
2263 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
2265 (abspath_from_root):
2267 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
2271 * public/js/helper-classes.js:
2273 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
2275 build-requests should use conform to JSON API format
2276 https://bugs.webkit.org/show_bug.cgi?id=146375
2278 Reviewed by Stephanie Lewis.
2280 Instead of returning single dictionary that maps root set id to a dictionary of repository names
2281 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
2282 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
2283 matches what we do in /api/test-groups.
2285 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
2286 This is useful for debugging purposes.
2288 * public/api/build-requests.php:
2289 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
2290 (update_builds): Extracted from main.
2292 * public/include/build-requests-fetcher.php:
2293 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
2294 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
2295 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
2296 Moved the logic to exit early when the root set had already been fetched here.
2298 * public/v2/analysis.js:
2299 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
2302 * tools/pull-os-versions.py:
2304 (setup_auth): Moved to util.py
2306 * tools/sync-with-buildbot.py:
2307 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
2308 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
2310 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
2311 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
2312 (config_for_request): Fixed a bug that the script blows up when the build request is missing
2313 the repository specified in the configuration. This tolerance is necessary when a new repository
2314 dependency is added but we want to run A/B tests for old builds without the dependency.
2315 (fetch_json): No longer takes auth.
2318 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
2320 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
2322 Build fix. A/B testing is broken when continuous builders report revisions out of order.
2325 (App.AnalysisTaskController.Ember.Controller.extend.):
2327 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
2329 A/B testing results should be shown even if they were submitted to different platforms
2330 https://bugs.webkit.org/show_bug.cgi?id=146219
2332 Reviewed by Andreas Kling.
2334 Fetch A/B testing results regardless of the platform to which results are submitted
2335 by providing the platform ID to which the results were submitted for each test group.
2337 * public/api/test-groups.php:
2338 (main): Include the platform id in the test groups.
2339 * public/v2/analysis.js:
2340 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
2342 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
2344 Remove unnecessary svn:executable flags
2345 https://bugs.webkit.org/show_bug.cgi?id=146107
2347 Reviewed by Alexey Proskuryakov.
2349 * public/js/helper-classes.js: Removed property svn:executable.
2350 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
2351 * public/v2/app.css: Removed property svn:executable.
2352 * public/v2/app.js: Removed property svn:executable.
2353 * public/v2/chart-pane.css: Removed property svn:executable.
2354 * public/v2/data.js: Removed property svn:executable.
2355 * public/v2/index.html: Removed property svn:executable.
2356 * public/v2/js/d3/LICENSE: Removed property svn:executable.
2357 * public/v2/js/d3/d3.js: Removed property svn:executable.
2358 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
2359 * public/v2/js/ember-data.js: Removed property svn:executable.
2360 * public/v2/js/ember.js: Removed property svn:executable.
2361 * public/v2/js/handlebars.js: Removed property svn:executable.
2362 * public/v2/js/jquery.min.js: Removed property svn:executable.
2363 * public/v2/js/statistics.js: Removed property svn:executable.
2364 * public/v2/manifest.js: Removed property svn:executable.
2365 * public/v2/popup.js: Removed property svn:executable.
2367 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2369 Reading the list of analysis tasks is extremely slow
2370 https://bugs.webkit.org/show_bug.cgi?id=146086
2372 Reviewed by Darin Adler.
2374 The bug was caused by Ember data requesting manifest.js hundreds of times.
2375 Fetch it ahead of time in each route instead.
2378 (App.AnalysisRoute.model):
2379 (App.AnalysisTaskRoute.model):
2381 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2383 Update ReadMe.md and Install.md per database changes
2384 https://bugs.webkit.org/show_bug.cgi?id=146076
2386 Reviewed by Darin Adler.
2393 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
2395 Increase the popup dismissal time from 100ms to 500ms
2396 https://bugs.webkit.org/show_bug.cgi?id=146077
2398 Rubber-stamped by Andreas Kling.
2400 * public/v2/popup.js:
2401 (App.PopupView.scheduleHiding):
2403 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
2405 v2 UI should have buttons to breakdown a test
2406 https://bugs.webkit.org/show_bug.cgi?id=146010
2408 Reviewed by Chris Dumez.
2410 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
2411 as well as "Breakdown" to add all subtests' metrics.
2413 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
2414 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
2417 (App.ChartsController.addAlternativePanes): Added.
2418 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
2419 (App.TestProxyForPopup.actionName): Added.
2420 (App.TestProxyForPopup.actionArgument): Added.
2421 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
2422 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
2423 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
2424 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
2425 that are already present in the list of panes.
2426 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
2427 * public/v2/index.html:
2428 * public/v2/manifest.js:
2429 (App.Metric.childMetrics): Added.
2431 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2433 Build fix after r185574.
2436 (set get App.Pane.Ember.Object.extend.):
2438 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2442 * tools/pull-os-versions.py:
2445 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2447 Perf dashboard should be able to list iOS versions as well as OS X versions
2448 https://bugs.webkit.org/show_bug.cgi?id=146003
2450 Reviewed by Stephanie Lewis.
2452 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
2453 information specified in config.json.
2455 * tools/pull-os-versions.py: Renamed from pull-osx.py.
2456 (main): Use available_builds_from_command when 'customCommands' is specified.
2457 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
2458 (fetch_available_builds): Now takes the repository name.
2460 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2462 Removed a superfluous console.log per Chris's comment.
2466 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
2468 Analysis task should show all possible revisions for A/B testing
2469 https://bugs.webkit.org/show_bug.cgi?id=145996
2471 Reviewed by Chris Dumez.
2473 * public/api/commits.php:
2474 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
2475 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
2476 have a "commit time".
2479 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
2480 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
2481 the fetched list of commits if available.
2482 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
2483 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
2484 of points shown in the A/B testing configurations become too long.
2486 * public/v2/commits-viewer.js:
2487 (App.CommitsViewerComponent.commitsChanged):
2489 * public/v2/data.js:
2490 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
2492 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
2494 Add a script to post new OS X builds to perf dashboard
2495 https://bugs.webkit.org/show_bug.cgi?id=145955
2497 Reviewed by Darin Adler.
2499 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
2501 * public/api/report-commits.php:
2502 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
2503 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
2505 * tools/pull-osx.py: Added.
2506 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
2507 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
2508 (setup_auth): Sets up basic or digest auth to access the dashboard.
2509 (fetch_available_builds): Fetches and parses the XML document from an internal website.
2510 (textContent): A helper function to get the text content out of a XML node.
2511 (submit_commits): Submits commits to the perf dashboard.
2513 * tools/pull-svn.py:
2516 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
2518 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
2520 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
2521 https://bugs.webkit.org/show_bug.cgi?id=145940
2523 Reviewed by Darin Adler.
2525 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
2526 Also deleted the code to mark points outside the envelop as outliers.
2530 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
2532 Unreviewed build fix for merging platforms.
2534 * public/admin/platforms.php:
2536 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
2538 Unreviewed build fix. Some builder names are really long.
2540 * init-database.sql:
2542 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
2544 Show results and status before revisions for A/B testing results
2545 https://bugs.webkit.org/show_bug.cgi?id=145327
2547 Reviewed by Chris Dumez.
2549 Place the results and the status columns before the columns for revisions.
2550 Also show the absolute difference as well as the relative difference between the averages of A and B.
2553 (App.TestGroupPane._populate):
2554 (App.TestGroupPane._computeStatisticalSignificance):
2555 * public/v2/index.html:
2557 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2559 Build fix after r184591.
2561 * public/v2/manifest.js:
2563 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2565 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
2567 * public/include/build-requests-fetcher.php:
2569 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2571 UI to associate bugs with an analysis task is crappy
2572 https://bugs.webkit.org/show_bug.cgi?id=145198
2574 Reviewed by Andreas Kling.
2576 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
2577 a bug and a separate select view with a text field to associate a new bug instead of implicitly
2578 updating or deleting the existing record based on what the user had typed.
2580 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
2581 a given analysis task since it's perfectly reasonable for a given task to be associated with
2582 multiple WebKit bugs.
2584 * public/privileged-api/associate-bug.php:
2585 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
2586 one that matches the analysis task and the bug tracker when the bug number is falsey.
2588 * public/v2/analysis.js:
2589 (App.Bug.url): Added.
2590 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
2592 * public/v2/app.css:
2595 (App.AnalysisTaskController.actions.addBug): Added.
2596 (App.AnalysisTaskController.actions.deleteBug): Added.
2597 (App.AnalysisTaskController.associateBug): Deleted.
2599 * public/v2/index.html: Updated the templates.
2601 * public/v2/manifest.js:
2602 (App.BugTracker.urlFromBugNumber): Added.
2604 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
2606 A/B testing rootSets should provide commit times as well as revisions
2607 https://bugs.webkit.org/show_bug.cgi?id=145207
2609 Reviewed by Andreas Kling.
2611 Some continuous build systems need the commit time as well as the revision number / hash so provide one
2612 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
2614 * public/include/build-requests-fetcher.php:
2615 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
2616 the revision number as well as the commit time.
2617 * tools/sync-with-buildbot.py:
2618 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
2619 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
2620 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
2622 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
2624 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
2626 * public/v2/manifest.js:
2627 (App.Manifest.Ember.Controller.extend.):
2628 (App.Manifest.Ember.Controller.extend):
2630 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
2632 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
2633 https://bugs.webkit.org/show_bug.cgi?id=145181
2635 Rubber-stamped by Chris Dumez.
2637 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
2638 for clarity. This change also reduces the code complexity.
2640 * public/index.html:
2642 (App.AnalysisTaskController._chartDataChanged):
2643 (App.TestGroupPane._createConfigurationSummary):
2644 * public/v2/data.js:
2645 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
2647 * public/v2/interactive-chart.js: Removed the support for showing units separately.
2648 (App.InteractiveChartComponent._constructGraphIfPossible):
2649 (App.InteractiveChartComponent._relayoutDataAndAxes)
2651 * public/v2/manifest.js:
2652 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
2653 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
2654 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
2655 automatically include unit.
2657 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
2659 REGRESSION: v2 UI reports a higher memory usage
2660 https://bugs.webkit.org/show_bug.cgi?id=145151
2662 Reviewed by Chris Dumez.
2664 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
2665 Fixed the bug by manually implementing the formatter as done in v1.
2667 * public/v2/manifest.js:
2668 (App.Manfiest._formatBytes): Added.
2669 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
2671 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
2673 Unreviewed build fix. Add "Duration" as a time metric.
2675 * public/js/helper-classes.js:
2676 * public/v2/data.js:
2677 (RunsData.unitFromMetricName):
2679 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
2681 Perf dashboard treats Speedometer and JetStream as smaller is better
2682 https://bugs.webkit.org/show_bug.cgi?id=144711
2684 Reviewed by Chris Dumez.
2686 Added the support for "Score" metric.
2688 * public/js/helper-classes.js:
2690 * public/v2/data.js:
2691 (RunsData.unitFromMetricName):
2692 (RunsData.isSmallerBetter):
2694 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
2696 Build fix after r183232.
2698 * public/include/json-header.php:
2700 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
2702 Perf dashboard should automatically detect regressions
2703 https://bugs.webkit.org/show_bug.cgi?id=141443
2705 Reviewed by Anders Carlsson.
2707 Added a node.js script detect-changes.js to detect potential regressions and progressions
2708 on the graphs tracked on v2 dashboards.
2710 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
2711 columns to analysis_tasks to keep the segmentation and test range selection strategies used
2712 to create an analysis task.
2714 * public/api/analysis-tasks.php:
2715 (format_task): Include task_segmentation and analysis_tasks in the results.
2717 * public/include/json-header.php:
2718 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
2719 of a CSRF prevention token.
2720 (should_authenticate_as_slave): Added.
2721 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
2722 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
2723 to a CSRF attack, we don't need to check a CSRF token.
2725 * public/privileged-api/create-analysis-task.php:
2726 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
2727 analysis task. Also add or find segmentation and test range selection strategies if specified.
2729 * public/privileged-api/create-test-group.php:
2730 (main): Use ensure_privileged_api_data_and_token_or_slave.
2732 * public/privileged-api/generate-csrf-token.php:
2735 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
2737 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
2738 (Array.prototype.find): Added a polyfill to be used in node.js.
2739 (RunsData.fetchRuns):
2740 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
2741 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
2742 in detect-changes.js.
2743 (RunsData.unitFromMetricName): Ditto.
2744 (RunsData.isSmallerBetter): Ditto.
2745 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
2746 times are identical.
2747 (TimeSeries): When commit times are identical, order points based on build time. This is needed
2748 for when we trigger two builds at two different OS versions with the same WebKit revision since
2749 OS versions don't change the commit times.
2750 (TimeSeries.prototype.findPointByIndex): Added.
2751 (TimeSeries.prototype.rawValues): Added.
2753 * public/v2/js/statistics.js:
2754 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
2755 description of this strategy instead of the default probability. Also fixed a bug that debugging
2756 code was referring to non-existent variables.
2757 (Statistics.executeStrategy): Moved from App.Pane (app.js).
2759 * public/v2/manifest.js:
2760 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
2761 used in detect-changes.js.
2763 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
2764 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
2765 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
2766 (main): Loads the settings JSON specified in the argument.
2767 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
2768 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
2769 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
2770 and computes various values for when statistically significant changes are detected later.
2771 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
2772 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
2773 in chronological order and create a new analysis task for the very last change we detected. We'll
2774 eventually create an analysis task for all detected changes since we're repeating the analysis in
2775 fetchManifestAndAnalyzeData after some time.
2776 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
2777 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
2778 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
2779 tasks for the same range (e.g. humans may create one before the script gets to do it).
2780 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
2781 testing if available, and notify another server with a HTML message as specified.
2782 (findStrategyByLabel):
2783 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
2784 test or values are getting smaller in a larger-is-better test and vice versa.
2785 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
2786 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
2790 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
2791 (instantiateNotificationTemplate):
2794 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
2796 Perf dashboard should have UI to set status on analysis tasks
2797 https://bugs.webkit.org/show_bug.cgi?id=143977
2799 Reviewed by Chris Dumez.
2801 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
2802 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
2803 The latter will be a useful metric once we start automatically creating analysis tasks.
2805 * init-database.sql: Added two columns to analysis_tasks table.
2806 * public/api/analysis-tasks.php: Include the added columns in the JSON.
2807 * public/include/db.php:
2808 (Database::to_database_boolean): Added.
2809 * public/include/json-header.php:
2810 (require_match_one_of_values): Added.
2811 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
2813 * public/v2/analysis.js:
2814 (App.AnalysisTask.result): Added.
2815 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
2816 and we want to differentiate null from false in order to differentiate the null-ness of the value.
2817 (App.AnalysisTask.saveStatus): Added.
2818 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
2819 * public/v2/app.css:
2821 (App.AnalysisTaskController.analysisResultOptions): Added.
2822 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
2823 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
2824 been created if 'no change' is selected.
2825 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
2826 (App.AnalysisTaskController.actions.saveStatus): Added.
2827 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
2828 'result' and 'needed' values of the analysis task.
2830 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
2832 Unreviewed build fix. Updated config.json after recent changes.
2836 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
2838 Make the analysis page more useful
2839 https://bugs.webkit.org/show_bug.cgi?id=143617
2841 Reviewed by Chris Dumez.
2843 * public/api/analysis-tasks.php:
2844 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
2845 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
2846 * public/v2/analysis.js:
2847 (App.AnalysisTask.formattedCreatedAt): Added.
2848 (App.AnalysisTask._addLeadingZero): Added.
2849 (App.AnalysisTask.buildRequestCount): Added.
2850 (App.AnalysisTask.finishedBuildRequestCount): Added.
2851 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
2852 (App.AnalysisTask.testGroups):
2853 (App.AnalysisTask.triggerable):
2854 (App.AnalysisTask.label):
2856 * public/v2/app.css: Tweaked style rules for the analysis page.
2859 (App.buildPopup): Sort the list of platforms by name.
2860 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
2861 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
2862 such as "Bugzilla" with the corresponding text field.
2864 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
2865 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
2866 for the accompanying graph.
2868 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
2870 Perf dashboard should automatically select ranges for A/B testing
2871 https://bugs.webkit.org/show_bug.cgi?id=143580
2873 Reviewed by Chris Dumez.
2875 Added a new statistics option for picking a A/B test range selection strategy.
2876 The selected ranges are shown in the graph using the same UI to show analysis tasks.
2879 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
2880 charts page used by the dashboard since we've added a new parameter at the end.
2881 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
2882 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
2883 (App.Pane._cloneStrategy): Copy isSegmentation.
2884 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
2885 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
2886 selection strategy is picked by the user.
2887 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
2888 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
2889 the return value from the moving average time series to a dictionary that contains the moving
2890 average time series, a dictionary of anomalies, and an array of test ranges.
2891 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
2892 (App.ChartsController._serializePaneList): Ditto for serialization.
2893 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
2894 test range selection strategy.
2896 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
2898 * public/v2/index.html: Added UI for selecting a test range selection strategy.
2900 * public/v2/interactive-chart.js:
2901 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
2903 * public/v2/js/statistics.js:
2904 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
2905 (Statistics.TestRangeSelectionStrategies): Added.
2907 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
2909 The results of A/B testing should state statistical significance
2910 https://bugs.webkit.org/show_bug.cgi?id=143552
2912 Reviewed by Chris Dumez.
2914 Added statistical comparisons between results for each configuration on analysis task page using
2915 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
2918 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
2919 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
2921 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
2922 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
2923 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
2924 Also renamed "items" to "requests" for clarity.
2926 * public/v2/index.html: Added the template for showing statistical comparisons.
2928 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
2929 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
2930 probability and vice versa.
2931 (Statistics.supportedConfidenceIntervalProbabilities):
2932 (Statistics.confidenceIntervalDelta):
2933 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
2934 the probability that two values are sampled from distinct distributions using Welch's t-test.
2935 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
2936 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
2937 (.oneSidedToTwoSidedProbability): Extracted.
2938 (.twoSidedToOneSidedProbability): Extracted.
2939 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
2940 now that computeWelchsT takes two-sided probability.
2942 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
2944 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
2948 (App.Pane.refetchRuns):
2950 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
2952 Perf dashboard should have a way of marking outliers
2953 https://bugs.webkit.org/show_bug.cgi?id=143466
2955 Reviewed by Chris Dumez.
2957 Address kling's in-person comment to notify users when the new run status is saved in the database.
2960 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
2961 * public/v2/chart-pane.css: Fixed a typo.
2963 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
2965 Perf dashboard should have a way of marking outliers
2966 https://bugs.webkit.org/show_bug.cgi?id=143466
2968 Reviewed by Chris Dumez.
2970 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
2971 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
2973 * init-database.sql: Added run_marked_outlier column to test_runs table.
2975 * public/admin/tests.php:
2977 * public/api/runs.php:
2978 (main): Only emit Cache-Control and Expires headers in v1 UI.
2979 (RunsGenerator::format_run): Emit markedOutlier.
2981 * public/include/admin-header.php:
2983 * public/include/db.php:
2984 (Database::is_true): Made it static.
2986 * public/include/manifest.php:
2987 (Manifest::platforms):
2989 * public/index.html: Call into /api/runs/ with ?cache=true.
2991 * public/privileged-api/update-run-status.php: Added.
2992 (main): Updates the newly added column in test_runs table.
2996 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
2997 (App.Pane._didFetchRuns): Renamed from _updateChartData.
2998 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
2999 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
3000 the interactive chart component only observes changes to chartData and not individual properties of it.
3001 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
3002 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
3003 clone chartData here.
3005 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
3006 invoking App.Pane._setNewChartData.
3007 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
3008 opening the pane for marking points as outliers would be annoying.
3009 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
3010 (App.PaneController.selectedMeasurement): Added.
3011 (App.PaneController.showOutlierTitle): Added.
3012 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
3013 mark the selected point as an outlier via the newly added privileged API.
3015 * public/v2/chart-pane.css: Updated styles.
3017 * public/v2/data.js:
3018 (PrivilegedAPI._post): Report the semantic errors.
3019 (Measurement.prototype.markedOutlier): Added.
3020 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
3021 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
3022 whether the time series should include measurements marked as outliers or not.
3023 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
3024 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
3025 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
3027 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
3028 mark individual points as outliers.
3030 * public/v2/interactive-chart.js:
3031 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
3032 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
3033 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
3034 with the arrow key navigation support, this is no longer an issue.
3036 * public/v2/manifest.js:
3037 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
3038 updates the time series in this chart data in order to include or exclude outliers.
3040 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
3042 Perf dashboard should be able to trigger A/B testing jobs for iOS
3043 https://bugs.webkit.org/show_bug.cgi?id=143398
3045 Reviewed by Chris Dumez.
3047 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
3049 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
3051 * public/api/triggerables.php:
3052 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
3053 * public/v2/analysis.js:
3054 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
3056 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
3057 some of the data points. This will happen when we modify the list of projects we build for iOS.
3058 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
3059 attempts to create an invalid test group; when there is already another test group of the same or when
3060 only either configuration specifies the revision for some repository.
3061 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
3062 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
3063 * tools/sync-with-buildbot.py:
3064 (find_request_updates):
3065 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
3066 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
3067 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
3068 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
3070 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
3072 Add time series segmentation algorithms as moving averages
3073 https://bugs.webkit.org/show_bug.cgi?id=143362
3075 Reviewed by Chris Dumez.
3077 This patch implements two preliminary time series segmentation algorithms as moving averages.
3079 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
3080 If Welch's t-test implicates a statistically significance difference, then split the segment into two
3081 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
3082 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
3083 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
3085 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
3086 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
3087 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
3088 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
3089 through i = n. However, we also don't want to split every data point into a separate segment so we need
3090 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
3091 models discussed in [2] for simplicity. We will tune this cost function further in the future.
3093 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
3094 space is exponential with respect to the size of the time series since we could split at each data point.
3095 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
3096 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
3097 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
3098 exploring much of the problem space.
3100 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
3101 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
3102 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
3103 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
3104 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
3105 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
3106 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
3108 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
3109 a nonstationary time series", Physical Review E 69, 021108 (2004)
3111 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
3112 Lithuanian Mathematical Journal, vol 46, 2006
3114 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
3115 * public/v2/js/statistics.js:
3116 (Statistics.testWelchsT):
3117 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
3118 of each value array between which Welch's t-statistic is computed. This generalization helps the
3119 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
3120 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
3121 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
3122 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
3123 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
3125 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
3126 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
3128 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
3130 REGRESSION: Perf dashboard sometimes fails to update zooming level
3131 https://bugs.webkit.org/show_bug.cgi?id=143359
3133 Reviewed by Darin Adler.
3135 The bug was caused by various bugs that ended up in an exception.
3138 (App.Pane._handleFetchErrors): Removed superfluous console.log.
3139 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
3140 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
3141 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
3142 to # when Ember.js fails to attach event listeners on time.
3143 * public/v2/interactive-chart.js:
3144 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
3145 the containing element's size is 0.
3146 (App.InteractiveChartComponent._updateBrush): Ditto.
3148 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
3150 Perf dashboard should have UI to test out anomaly detection strategies
3151 https://bugs.webkit.org/show_bug.cgi?id=143290
3153 Reviewed by Benjamin Poulain.
3155 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
3157 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
3158 as well as Welch's t-test that compares the last five points to the prior twenty points.
3160 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
3161 performance tests although they compare medians instead of means.
3163 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
3166 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
3167 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
3168 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
3169 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
3170 Only report the first data point when multiple consecutive data points are detected as anomalies.
3171 * public/v2/chart-pane.css: Updated styles.
3172 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
3173 * public/v2/js/statistics.js:
3174 (Statistics.testWelchsT): Added. Implements Welch's t-test.
3175 (.sampleMeanAndVarianceForValues): Added.
3176 (.createWesternElectricRule): Added.
3177 (.countValuesOnSameSide): Added.
3178 (Statistics.AnomalyDetectionStrategy): Added.
3180 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
3182 REGRESSION: Searching commits can highlight wrong data points
3183 https://bugs.webkit.org/show_bug.cgi?id=143272
3185 Reviewed by Antti Koivisto.
3187 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
3188 return commit times with only second precision. This resulted in the frontend code to match a commit
3189 with the data point that included the next commit when the millisecond component of commit's timestamp
3190 wasn't identically 0.
3192 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
3193 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
3194 so miliseconds component was only preserved in /api/commits.
3196 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
3197 it returns time in milisecond precision.
3199 * public/api/commits.php:
3200 (fetch_commits_between): Use Database::to_js_time for format commit times.
3201 (format_commit): Ditto.
3202 * public/include/db.php:
3203 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
3204 * public/v2/data.js:
3205 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
3207 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
3209 Perf dashboard should show relative change in values
3210 https://bugs.webkit.org/show_bug.cgi?id=143252
3212 Reviewed by Antti Koivisto.
3214 When a range of values are selected, show the percentage difference between the start and the end
3215 in addition to the absolute value difference. When a single point is selected, show the relative