1 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
3 v3 UI's time range slider is harder to use than that of v2 UI
4 https://bugs.webkit.org/show_bug.cgi?id=152780
6 Reviewed by Antti Koivisto.
8 Improved the time range slider by using a cubic mapping to time range and providing a text field
9 to directly edit the number of days to show.
11 Now an user can enter the text mode to directly edit the number of days to show by clicking on
12 the number of days (text field is always there with opacity=0).
14 * public/v3/pages/charts-toolbar.js:
15 (ChartsToolbar): Store the minimum and maximum number of days allowed. Also rename _inputElement
16 to _slider and added a new type=number text field as _editor.
17 (ChartsToolbar.prototype.render):
18 (ChartsToolbar.prototype.setStartTime): Exit the text mode when the number of days is changed by
19 an URL state transition (i.e. back/forward navigation).
20 (ChartsToolbar.prototype._setInputElementValue): Added. Updates the values of _slider and _editor.
21 (ChartsToolbar.prototype._enterTextMode): Added. Hide the elements used by the slider mode and
23 (ChartsToolbar.prototype._exitTextMode): Added. Does the opposite.
24 (ChartsToolbar.prototype._sliderValueMayHaveChanged): Renamed from _inputValueMayHaveChanged.
25 (ChartsToolbar.prototype._editorValueMayHaveChanged): Added. Similar to _sliderValueMayHaveChanged
26 but also corrects the value of _editor if needed.
27 (ChartsToolbar.prototype._callNumberOfDaysCallback): Extracted from _inputValueMayHaveChanged.
28 Also fixed a bug that we didn't update the URL state when the change event was fired without
29 modifying the effective number of days.
30 (ChartsToolbar.cssTemplate): Tweaked the style to support the new mode. Also set a fixed width on
31 the span showing the number of days in the slider mode.
33 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
35 Zooming button is broken on v3 UI
36 https://bugs.webkit.org/show_bug.cgi?id=152777
38 Reviewed by Chris Dumez.
40 Bring up the zoom button in z-index so that users can click it.
42 * public/v3/components/interactive-time-series-chart.js:
43 (InteractiveTimeSeriesChart.cssTemplate):
45 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
47 v3 UI doesn't preserve the time range when charts page is opened from a dashboard
48 https://bugs.webkit.org/show_bug.cgi?id=152776
50 Reviewed by Chris Dumez.
52 Fixed the bug by moving the construction of charts URL from DashboardPage.prototype.open to
53 DashboardPage.prototype.render and re-rendering the entire page upon an URL state transition.
55 * public/v3/pages/charts-page.js:
56 (ChartsPage.createStateForDashboardItem): Takes the start time for the charts page.
58 * public/v3/pages/dashboard-page.js:
59 (DashboardPage.prototype.updateFromSerializedState): Merged _numberOfDaysDidChange and
60 _updateChartsDomainFromToolbar into this function since they're not used elsewhere. Also re-render
61 the entire page when transition between different number of days to show.
62 (DashboardPage.prototype._numberOfDaysDidChange): Deleted.
63 (DashboardPage.prototype._updateChartsDomainFromToolbar): Deleted.
64 (DashboardPage.prototype.render): Construct URL for each charts here.
65 (DashboardPage.prototype._createChartForCell): Don't construct URL here since this function is
66 called once when the dashboard page is opened, and not when the time range is changed.
68 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
70 Build fix for an old version of PHP after r194618.
72 * public/api/measurement-set.php:
74 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
76 A/B testing results should be visualized intuitively on v3 UI
77 https://bugs.webkit.org/show_bug.cgi?id=152496
79 Rubber-stamped by Chris Dumez.
81 Add the "stacking block" view of A/B testing results to the analysis task page on v3 UI.
83 The patch enhances JSON APIs at /api/analysis-task /api/measurement-set/ to reduce the number of
84 HTTP requests, and adds two UI components: TestGroupResultsTable and AnalysisResultsViewer both
85 of which inherits from an abstract superclass: ResultsTable.
87 ResultsTable provides a tabular presentation of measured values in regular measurement sets and
88 A/B testing results using groups of bar graphs created by BarGraphGroup. TestGroupResultsTable
89 inherits from this class to display A/B testing configurations and the averaged results for each
90 configuration, and AnalysisResultsViewer inherits from it to provide an intuitive visualization
91 of the outcomes of all A/B testing results associated with a given analysis task.
93 * public/api/analysis-tasks.php:
94 (main): Add the capability to find the analysis task based on its build request.
95 This allows /v3/#/analysis/task/?buildRequest=<id> to be hyperlinked on buildbot page.
97 * public/api/measurement-set.php:
98 (main): Removed the unused startTime and endTime, and added "analysisTask" to query parameters.
99 (AnalysisResultsFetcher): Added. Used to fetch measured data associated with every build request
101 (AnalysisResultsFetcher::__construct):
102 (AnalysisResultsFetcher::fetch): Unlike MeasurementSetFetcher, we fetch the list of commits and
103 list of measurements separately since there will be a lot less builds and commits than measured
104 data (since we're fetching measured values for all tests and their metrics).
105 (AnalysisResultsFetcher::fetch_commits): Fetches commits.
106 (AnalysisResultsFetcher::format_measurement): Like MeasurementSetFetcher::format_measurement but
107 with config_type and config_metric since we're returning measured data for all metrics and test
109 (AnalysisResultsFetcher::format_map): Similar to MeasurementSetFetcher::format_map.
111 * public/v3/components/analysis-results-viewer.js: Added.
112 (AnalysisResultsViewer): Added.
113 (AnalysisResultsViewer.prototype.didUpdateResults): This callback is called by AnalysisTaskPage
114 when A/B testing results become available.
115 (AnalysisResultsViewer.prototype.render): Overrides ResultsTable's render to highlight the block
116 representing the currently selected test group.
118 (AnalysisResultsViewer.prototype.buildRowGroups): Creates a list of rows with "stacking blocks"
119 that visualizes A/B testing results. The algorithm works as follows: 1. Create all table rows.
120 2. Find which row is associated with each set in each test group. 3. Layout "blocks".
122 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Collects root sets from all data
123 in the measurement set as well as A/B testing **requests** (results may contain more repositories
124 than requested but they aren't interesting for the purpose of visualizing results for the entire
127 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Create table rows. First,
128 create table rows for measurement set points that have a matching test group (i.e. either set A
129 or set B of an A/B testing uses the same root set as a point). Second, insert a new row for each
130 root set in each test group which didn't find a matching measurement set point. There is a little
131 subtlety that some A/B testing may specify revisions for a subset of repositories and/or some A/B
132 testing results may appear as if it goes back in time with respect to other A/B testing results.
133 For example, consider creating two A/B test groups for WebKit changes and OS changes separately.
134 There could be no coherent linearization of those two A/B testing in which both WebKit and OS
135 versions move forward.
137 (AnalysisResultsViewer.RootSetInTestGroup): Added. Represents a pair (test group, root set) since
138 a root set could be shared by multiple test groups.
139 (AnalysisResultsViewer.TestGroupStackingBlock): Added. A stacked block representing a test group.
140 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex): Associates a row number with
141 either set A or set B.
142 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Creates a table cell
144 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Returns true if this test group
145 has failed and this block should look "thin" without any label.
146 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus): Computes the
147 status for this test group.
149 (AnalysisResultsViewer.TestGroupStackingGrid): Added. AnalysisResultsViewer uses this class to
150 layout blocks representing test groups.
151 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.insertBlockToColumn): Inserts a new block
152 to layout. We keep all test groups doing the same A/B test next to each other.
153 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.layout): Layouts each block / test group
154 in the order they are created.
155 (AnalysisResultsViewer.TestGroupStackingGrid.prototype._layoutBlock): Places the block in the
156 left-most column that can accommodate it while avoiding columns of a different thin-ness. A column
157 is thin if its A/B testing has failed, and not thin otherwise.
158 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.createCellsForRow): Creates table cells for
159 a given row. For each column, generate a table cell if we're in the first row and the first block
160 starts in a later row, a block starts in the current row, or the last block ended in the previous
161 row and the next block or the last row appears later.
163 * public/v3/components/bar-graph-group.js: Added. A component for showing a group of bar graphs.
164 (BarGraphGroup): Added. Creates a group of bar graphs with the same value range. It's used by
165 AnalysisResultsViewer and ResultsTable to show bar graphs to compare values.
166 (SingleBarGraph): A component created and collectively controlled by BarGraphGroup.
168 * public/v3/components/results-table.js: Added.
169 (ResultsTable): An abstract superclass for TestGroupResultsTable and AnalysisResultsViewer.
171 (ResultsTable.prototype.render): Renders the table. 1. Call "buildRowGroups()" implemented by
172 a subclass to obtain the list of rows. 2. Compute the list of repositories to show. 3. For each
173 cell in the table, compute the number of rows to show the same value (for rowspan). 4. Render the
174 table with an extra list of repositories if exists.
176 (ResultsTable.prototype._computeRepositoryList): Compute the list of repositories to list
177 revisions in the table. Omit repositories not present in any row or for which all rows have the
178 same revision. In the latter case, include it in the extra repositories listed below the table.
179 This minimizes the amount of redundant information presented to the user.
181 (ResultsTableRow): Added. Represents a single row in the table. ResultsTable constructs necessary
182 table cells to tabulate the associated root sets, and shows the associated result using a grouped
183 bar graph. Additional columns are used by AnalysisResultsViewer to show stacked blocks for A/B
186 * public/v3/components/test-group-results-table.js: Added.
187 (TestGroupResultsTable):
188 (TestGroupResultsTable.prototype.didUpdateResults):
189 (TestGroupResultsTable.prototype.setTestGroup):
190 (TestGroupResultsTable.prototype.heading):
191 (TestGroupResultsTable.prototype.render):
192 (TestGroupResultsTable.prototype.buildRowGroups):
194 * public/v3/index.html:
195 * public/v3/models/analysis-results.js: Added.
196 (AnalysisResults): Added. Like MeasurementSet, this class represents a set of measured values
197 associated with a given analysis task.
198 (AnalysisResults.prototype.find): Returns a measured valued for a given build and metric.
199 (AnalysisResults.prototype.add): Adds a new measured value. Used by AnalysisResults.fetch.
200 (AnalysisResults.fetch): Fetches data and creates AnalysisResults for a given analysis task.
202 * public/v3/models/analysis-task.js:
203 (AnalysisTask.prototype.startMeasurementId): Added.
204 (AnalysisTask.prototype.endMeasurementId): Added.
205 (AnalysisTask.fetchByBuildRequestId): Added.
206 (AnalysisTask._fetchSubset): Uses DataModelObject.cachedFetch.
208 * public/v3/models/build-request.js: Added.
209 (BuildRequest): Added. Represents a single A/B testing request associated with a test group.
211 * public/v3/models/builder.js:
212 (Build): Added. Represents a build associated with a given A/B testing result.
214 * public/v3/models/commit-log.js:
215 (CommitLog): Made this class inherit from DataModelObject.
216 (CommitLog.ensureSingleton): Added. Finds the singleton object created for a given revision
217 in the specified repository. This helps RootSet and other classes compare commits fast.
218 (CommitLog.prototype.repository): Added.
219 (CommitLog.fetchBetweenRevisions): Uses CommitLog.ensureSingleton.
221 * public/v3/models/data-model.js:
223 (DataModelObject.namedStaticMap): Added.
224 (DataModelObject.ensureNamedStaticMap): Renamed from namedStaticMap instead of implicitly
225 assuming that the non-static version always creates the map.
226 (DataModelObject.prototype.namedStaticMap): Added.
227 (DataModelObject.cachedFetch): Extracted from AnalysisTask._fetchSubset so that TestGroup's
228 fetchByTask could also use it.
231 * public/v3/models/measurement-adaptor.js: Added.
232 (MeasurementAdaptor): Extracted from MeasurementCluster. This class is responsible for
233 re-formatting the data received via /api/measurement-set JSON API inside the v3 UI.
234 (MeasurementAdaptor.prototype.extractId): Added.
235 (MeasurementAdaptor.prototype.adoptToAnalysisResults): Added. Used by AnalysisResults.
236 (MeasurementAdaptor.aggregateAnalysisResults): Added. Used by TestGroupResultsTable to
237 aggregate results for each test configuration; e.g. computing the average for set A.
238 (MeasurementAdaptor.prototype.adoptToSeries): Extracted from MeasurementCluster.addToSeries.
239 Added rootSet() to each point. This allows AnalysisResultsViewer to compare them against root
240 sets associated with A/B testing results.
241 (MeasurementAdaptor.computeConfidenceInterval): Moved from MeasurementCluster.
243 * public/v3/models/measurement-cluster.js:
244 (MeasurementCluster):
245 (MeasurementCluster.prototype.addToSeries):
247 * public/v3/models/repository.js:
248 (Repository.prototype.hasUrlForRevision): Added.
250 * public/v3/models/root-set.js: Added.
251 (RootSet): Added. Represents a set of commits in measured results.
252 (MeasurementRootSet): Added. Ditto for results associated with A/B testing.
254 * public/v3/models/test-group.js: Added.
255 (TestGroup): Added. Represents a A/B testing on analysis task.
256 (TestGroup.prototype.createdAt): Added.
257 (TestGroup.prototype.buildRequests): Returns the list of build requests associated with this
259 (TestGroup.prototype.addBuildRequest): Added. Used by BuildRequest's constructor to associate
260 itself with this group.
261 (TestGroup.prototype.didSetResult): Added. Called by BuildRequest.setResult when measured
262 values are fetched and associated with a build request in this group.
264 * public/v3/models/test.js:
267 * public/v3/pages/analysis-task-page.js:
269 (AnalysisTaskPage.prototype.updateFromSerializedState): Fetch the analysis task, test groups
270 associated with it, and all A/B testing results based on the task id or the build request id
271 specified in the URL.
272 (AnalysisTaskPage.prototype._didFetchTask): Added. Start fetching the measured data. This is
273 the data on charts page for which this analysis task was created, not results of A/B testing.
274 (AnalysisTaskPage.prototype._didFetchMeasurement): Added. Display the fetched data in a table
275 inside AnalysisResultsViewer.
276 (AnalysisTaskPage.prototype._didFetchTestGroups): Added. Display the list of A/B test groups
277 as well as the results of the first A/B testing.
278 (AnalysisTaskPage.prototype._didFetchAnalysisResults): Added.
279 (AnalysisTaskPage.prototype._assignTestResultsIfPossible): Added. Once both the analysis task,
280 A/B test groups as well as their results are fetched, update build requests in each test group
282 (AnalysisTaskPage.prototype.render): Show the list of test groups and highlight the currently
284 (AnalysisTaskPage.prototype._showTestGroup): Added. A callback used by AnalysisResultsViewer
285 and TestGroupResultsTable to notify this class when the user selects a new test group.
286 (AnalysisTaskPage.htmlTemplate): Updated the template.
287 (AnalysisTaskPage.cssTemplate): Ditto.
289 * public/v3/pages/charts-page.js:
290 (ChartsPage.createStateForAnalysisTask): Added. Creates a URL state object for opening a chart
291 associated with an analysis task.
293 2015-12-22 Ryosuke Niwa <rniwa@webkit.org>
295 Analysis task page is slow to load
296 https://bugs.webkit.org/show_bug.cgi?id=152517
298 Reviewed by Andreas Kling.
300 The slowness comes from r194130 which made the JSON API at /api/analysis-tasks to report the start
301 and the end of each analysis task. This query was adding ~2s to the total JSON generation time.
303 Cache these values on analysis_task table since they never change once an analysis task is created.
305 * init-database.sql: Added columns task_start_run_time and task_end_run_time to analysis_task table.
306 Also added the missing drop statements at the top.
308 * public/api/analysis-tasks.php:
309 (fetch_and_push_bugs_to_tasks): Don't fetch the latest commit time of the start and the end.
310 (format_task): Report task_start_run_time and task_end_run_time as startRunTime and endRunTime.
312 * public/privileged-api/create-analysis-task.php:
313 (main): Set start_run_time and end_run_time when creating an analysis task.
314 (time_for_run): Added.
316 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
318 v3 UI shouldn't open/close pane selector by mouseenter/leave
319 https://bugs.webkit.org/show_bug.cgi?id=152399
321 Reviewed by Andreas Kling.
323 Removed the code to open and close the pane selector by mouseenter and mouseleave
324 since multiple people have complained about the behavior.
326 * public/v3/pages/charts-toolbar.js:
327 (ChartsToolbar): Removed the event listeners.
328 (ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
329 to better support the use case of adding multiple panes.
330 (ChartsToolbar.cssTemplate): Tweaked CSS.
332 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
334 Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
335 https://bugs.webkit.org/show_bug.cgi?id=152389
337 Reviewed by Darin Adler.
339 Compute the x coordinate of the popover from the center of each annotation bar.
341 Also adjust the x coordinate to keep the popover within the charts.
343 * public/v3/components/interactive-time-series-chart.js:
344 (InteractiveTimeSeriesChart.prototype._renderChartContent):
346 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
348 Dashboard charts should have uniform widths on v3 UI
349 https://bugs.webkit.org/show_bug.cgi?id=152395
351 Reviewed by Chris Dumez.
353 Fix the bug by applying table-layout: fixed on the dashboard table.
355 * public/v3/pages/dashboard-page.js:
356 (DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
357 (DashboardPage.cssTemplate): Adjusted CSS accordingly.
359 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
361 Closing a pane on v3 UI always closes the last pane
362 https://bugs.webkit.org/show_bug.cgi?id=152388
364 Reviewed by Chris Dumez.
366 The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
367 Fixed it by passing in "this" pane object to the first argument.
369 * public/v3/pages/chart-pane.js:
372 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
374 Perf Dashboard v3 UI doesn't show recent data points on v2 UI
375 https://bugs.webkit.org/show_bug.cgi?id=152368
377 Reviewed by Chris Dumez.
379 The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
380 which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
381 to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
383 !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
385 Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
387 * public/api/measurement-set.php:
388 (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
389 * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
390 of the last modified date depends on when tests run, we can't assert it to be a certain value.
392 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
394 v3 UI should show and link the build number on charts page
395 https://bugs.webkit.org/show_bug.cgi?id=152359
397 Reviewed by Chris Dumez.
399 Show the hyperlinked build number in the v3 UI.
401 * public/v3/models/builder.js:
402 (Builder): Renamed _buildURL to _buildUrlTemplate.
403 (Builder.prototype.urlForBuild): Added.
404 * public/v3/pages/chart-pane-status-view.js:
405 (ChartPaneStatusView):
406 (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
407 (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
408 if the current point is set by an indicator (not by a selection).
410 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
412 v3 dashboard doesn't stretch charts to fill the screen
413 https://bugs.webkit.org/show_bug.cgi?id=152354
415 Reviewed by Chris Dumez.
417 The bug was caused by a workaround to avoid canvas stretching table cell too much.
419 Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
420 so that it does not contribute to the intrinsic/natural width of the cell.
422 * public/v3/components/time-series-chart.js:
423 (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
424 (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
425 the canvas does not resize with it.
426 * public/v3/pages/dashboard-page.js:
427 (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
429 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
431 The chart status on v3 UI sometimes show wrong revision ranges
432 https://bugs.webkit.org/show_bug.cgi?id=152331
434 Reviewed by Chris Dumez.
436 The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
437 when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
438 finds the sampled data point immediately preceding the current point (at which the indicator is shown).
440 * public/v3/components/chart-status-view.js:
441 (ChartStatusView.prototype.updateStatusIfNeeded):
443 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
445 Perf dashboard's cycler page should use v3 UI
446 https://bugs.webkit.org/show_bug.cgi?id=152324
448 Reviewed by Chris Dumez.
450 Use the v3 UI in cycler.html after r194130.
452 * public/cycler.html:
453 * public/v3/index.html: Removed the reference to a non-existent platform-selector.js.
455 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
457 Add v3 UI to perf dashboard
458 https://bugs.webkit.org/show_bug.cgi?id=152311
460 Reviewed by Chris Dumez.
462 Add the third iteration of the perf dashboard UI. UI for viewing and modifying analysis tasks is coming soon.
463 The v3 UI is focused on speed, and removes all third-party script dependencies including jQuery, d3, and Ember.
464 Both the DOM-based UI and graphing are implemented manually.
467 The entire app is structured using new component library implemented in components/base.js. Each component is
468 an instance of a subclass of ComponentBase which owns a single DOM element. Each subclass may supply static
469 methods named htmlTemplate and cssTemplate as the template for a component instance. ComponentBase automatically
470 clones the templates inside the associated element (or its shadow root on the supported browsers). Each subclass
471 must supply a method called "render()" which constructs and updates the DOM as needed.
473 There is a special component called Page, which represents an entire page. Each Page is opened by PageRouter's
474 "route()" function. Each subclass of Page supplies "open()" for initialization and "updateFromSerializedState()"
475 for a hash URL transition.
478 The key feature of the v3 UI is the split of time series into chunks called clusters (see r194120). On an internal
479 instance of the dashboard, the v2 UI downloads 27MB of data whereas the same page loads only 3MB of data in the v3.
480 The key logic for fetching time series in chunks is implemented by MeasurementSet in /v3/models/measurement-set.js.
481 We first fetch the cached primary cluster (the cluster that contains the newest data) at:
482 /data/measurement-set-<platform-id>-<metric-id>.json
484 If that's outdated according to lastModified in manifest.json, then we immediately re-fetch the primary cluster at:
485 /api/measurement-set/?platform=<platform-id>&metric=<metric-id>
487 Once the up-to-date primary cluster is fetched, we fetch all "secondary" clusters. For each cluster being fetched,
488 including the primary, we invoke registered callbacks.
491 In addition, the v3 UI reduces the initial page load time by loading a single bundled JS file generated by
492 tools/bundle-v3-scripts.py. index.html has a fallback to load all 44 JS files individually during development.
494 * public/api/analysis-tasks.php:
495 (fetch_and_push_bugs_to_tasks): Added the code to fetch start and end run times. This is necessary in V3 UI
496 because no longer fetch the entire time series. See r194120 for the new measurement set JSON API.
497 (format_task): Compute the category of an analysis task based on "result" value. This will be re-vamped once
498 I add the UI for the analysis task page in v3.
500 * public/include/json-header.php:
501 (require_format): CamelCase the name.
502 (require_match_one_of_values): Ditto.
503 (validate_arguments): Renamed from require_existence_of and used in measurement-set.php landed in r194120.
506 * public/v3/components: Added.
508 * public/v3/components/base.js: Added.
509 (ComponentBase): The base component class.
510 (ComponentBase.prototype.element): Returns the DOM element associated with the DOM element.
511 (ComponentBase.prototype.content): Returns the shadow root if one exists and the associated element otherwise.
512 (ComponentBase.prototype.render): To be implemented by a subclass.
513 (ComponentBase.prototype.renderReplace): A helper function to "render" DOM contents.
514 (ComponentBase.prototype._constructShadowTree): Called inside the constructor to instantiate the templates.
515 (ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Instantiates components referred by
516 its element name inside the instantiated content.
517 (ComponentBase.isElementInViewport): A helper function. Returns true if the element is in the viewport and it has
518 non-zero width and height.
519 (ComponentBase.defineElement): Defines a custom element that can be automatically instantiated from htmlTemplate.
520 (ComponentBase.createElement): A helper function to create DOM tree to be used in "render()" method.
521 (ComponentBase._addContentToElement): A helper for "createElement".
522 (ComponentBase.createLink): A helper function to create a hyperlink or another clickable element (via callback).
523 (ComponentBase.createActionHandler): A helper function to create an event listener that prevents the default action
524 and stops the event propagation.
526 * public/v3/components/button-base.js: Added.
528 * public/v3/components/chart-status-view.js: Added.
529 (ChartStatusView): A component that reports the current status of time-series-chart. It's subclasses by
530 ChartPaneStatusView to provide additional information in the charts page's panes.
532 * public/v3/components/close-button.js: Added.
534 * public/v3/components/commit-log-viewer.js: Added.
535 (CommitLogViewer): A component that lists commit revisions along with commit messages for a range of data points.
537 * public/v3/components/interactive-time-series-chart.js: Added.
538 (InteractiveTimeSeriesChart): A subclass of InteractiveTimeSeriesChart with interactivity (selection & indicator).
539 Selection and indicator are mutually exclusive.
541 * public/v3/components/pane-selector.js: Added.
542 (PaneSelector): A component for selecting (platform, metric) pair to add in the charts page.
544 * public/v3/components/spinner-icon.js: Added.
546 * public/v3/components/time-series-chart.js: Added.
547 (TimeSeriesChart): A canvas-based chart component without interactivity. It takes a source list and options as
548 the constructor arguments. A source list is a list of measurement sets (measurement-set.js) with drawing options.
549 This component fetches data via MeasurementSet.fetchBetween inside TimeSeriesChart.prototype.setDomain and
550 progressively updates the charts as more data arrives. The canvas is updated on animation frame via rAF and all
551 layout and rendering metrics are lazily computed in _layout. In addition, this component samples data before
552 rendering the chart when there are more data points per pixel in _ensureSampledTimeSeries.
554 * public/v3/index.html: Added. Loads bundled-scripts.js if it exists, or individual script files otherwise.
556 * public/v3/instrumentation.js: Added. This class is used to gather runtime statistics of v3 UI. (It measures
557 the performance of the perf dashboard UI).
559 * public/v3/main.js: Added. Bootstraps the app.
563 * public/v3/models: Added.
564 * public/v3/models/analysis-task.js: Added.
565 * public/v3/models/bug-tracker.js: Added.
566 * public/v3/models/bug.js: Added.
567 * public/v3/models/builder.js: Added.
568 * public/v3/models/commit-log.js: Added.
569 * public/v3/models/data-model.js: Added.
570 (DataModelObject): The base class for various data objects that correspond to database tables. It supplies static
571 hash map to find entries by id as well as other keys.
572 (LabeledObject): A subclass of DataModelObject with the capability to find an object via its name.
574 * public/v3/models/measurement-cluster.js: Added.
575 (MeasurementCluster): Represents a single cluster or a chunk of data in a measurement set.
577 * public/v3/models/measurement-set.js: Added.
578 (MeasurementSet): Represents a measurement set.
579 (MeasurementSet.findSet): Returns the singleton set given (metric, platform). We use singleton to avoid issuing
580 multiple HTTP requests for the same JSON when there are multiple TimeSeriesChart that show the same graph (e.g. on
581 charts page with overview and main charts).
582 (MeasurementSet.prototype.findClusters): Finds the list of clusters to fetch in a given time range.
583 (MeasurementSet.prototype.fetchBetween): Fetch clusters for a given time range and calls callback whenever new data
584 arrives. The number of callbacks depends on the how many clusters need to be newly fetched.
585 (MeasurementSet.prototype._fetchSecondaryClusters): Fetches non-primary (non-latest) clusters.
586 (MeasurementSet.prototype._fetch): Issues a HTTP request to fetch a cluster.
587 (MeasurementSet.prototype._didFetchJSON): Called when a cluster is fetched.
588 (MeasurementSet.prototype._failedToFetchJSON): Called when the fetching of a cluster has failed.
589 (MeasurementSet.prototype._invokeCallbacks): Invokes callbacks upon an approval of a new cluster.
590 (MeasurementSet.prototype._addFetchedCluster): Adds the newly fetched cluster in the order.
591 (MeasurementSet.prototype.fetchedTimeSeries): Returns a time series that contains data from all clusters that have
593 (TimeSeries.prototype.findById): Additions to TimeSeries defined in /v2/data.js.
594 (TimeSeries.prototype.dataBetweenPoints): Ditto.
595 (TimeSeries.prototype.firstPoint): Ditto.
597 * public/v3/models/metric.js: Added.
598 * public/v3/models/platform.js: Added.
599 * public/v3/models/repository.js: Added.
600 * public/v3/models/test.js: Added.
602 * public/v3/pages: Added.
603 * public/v3/pages/analysis-category-page.js: Added. The "Analysis" page that lists the analysis tasks.
604 * public/v3/pages/analysis-category-toolbar.js: Added. The toolbar to filter analysis tasks based on its category
605 (unconfirmed, bisecting, identified, closed) and a keyword.
607 * public/v3/pages/analysis-task-page.js: Added. Not implemented yet. It just has the hyperlink to the v2 UI.
609 * public/v3/pages/chart-pane-status-view.js: Added.
610 (ChartPaneStatusView): A subclass of ChartStatusView used in the charts page. In addition to the current value,
611 comparison to baseline/target, it shows the list of repository revisions (e.g. WebKit revision, OS version).
613 * public/v3/pages/chart-pane.js: Added.
614 (ChartPane): A component a pane in the charts page. Each pane has the overview chart and the main chart. The zooming
615 is synced across all panes in the charts page.
617 * public/v3/pages/charts-page.js: Added. Charts page.
618 * public/v3/pages/charts-toolbar.js: Added. The toolbar to set the number of days to show. This affects the overview
619 chart's domain in each pane.
621 * public/v3/pages/create-analysis-task-page.js: Added.
622 (CreateAnalysisTaskPage): A page that gets shown momentarily while creating a new analysis task.
624 * public/v3/pages/dashboard-page.js: Added. A dashboard page.
625 * public/v3/pages/dashboard-toolbar.js: Added. Its toolbar with buttons to select the number of days to show.
626 * public/v3/pages/domain-control-toolbar.js: Added. An abstract superclass of charts and dashboard toolbars.
628 * public/v3/pages/heading.js: Added. A component for displaying the header and toolbar, if exists, on each page.
629 * public/v3/pages/page-router.js: Added. This class is responsible for updating the URL hashes as well as opening
630 and updating each page when the hash changes (via back/forward navigation).
631 * public/v3/pages/page-with-charts.js: Added. An abstract subclass of page used by dashboards and charts page.
632 Supplies helper functions for creating TimeSeriesChart options.
633 * public/v3/pages/page-with-heading.js: Added. An abstract subclass of page that uses the heading component.
634 * public/v3/pages/page.js: Added. The Page component.
635 * public/v3/pages/toolbar.js: Added. An abstract toolbar component.
637 * public/v3/remote.js: Added.
638 (getJSON): Fetches JSON from the remote server.
639 (getJSONWithStatus): Ditto. Rejects the response if the status is not "OK".
640 (PrivilegedAPI.sendRequest): Posts a HTTP request to a privileged API in /privileged-api/.
641 (PrivilegedAPI.requestCSRFToken): Creates a new CSRF token to request a privileged API post.
643 * tools/bundle-v3-scripts.py: Added.
644 (main): Bundles js files together and minifies them by jsmin.py for the v3 UI. Without this script, we're forced to
645 download 44 JS files or making each JS file contain multiple classes.
647 * tools/jsmin.py: Copied from WebInspector / JavaScriptCore code.
649 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
651 Fix v2 UI after r194093.
655 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
657 Add /api/measurement-set for v3 UI
658 https://bugs.webkit.org/show_bug.cgi?id=152312
660 Rubber-stamped by Chris Dumez.
662 The new API JSON allows the front end to fetch measured data in chunks called a "cluster" as specified
663 in config.json for each measurement set specified by the pair of a platform and a metric.
665 When the front end needs measured data in a given time range (t_0, t_1) for a measurement set, it first
666 fetches the primary cluster by /api/measurement-set/?platform=<platform-id>&metric=<metric-id>.
667 The primary cluster is the last cluster in the set (returning the first cluster here is not useful
668 since we don't typically show very old data), and provides the information needed to fetch other clusters.
670 Fetching the primary cluster also creates JSON files at:
671 /data/measurement-set-<platform-id>-<metric-id>-<cluster-end-time>.json
672 to allow latency free access for secondary clusters. The front end code can also fetch the cache of
673 the primary cluster at: /data/measurement-set-<platform-id>-<metric-id>.json.
675 Because the front end code has to behave as if all data is fetched, each cluster contains one data point
676 immediately before the first data point and one immediately after the last data point. This avoids having
677 to fetch multiple empty clusters for manually specified baseline data. To support this behavior, we generate
678 all clusters for a given measurement set at once when the primary cluster is requested.
680 Furthermore, all measurement sets are divided at the same time into clusters so that the boundary of clusters
681 won't shift as more data are reported to the server.
683 * config.json: Added clusterStart and clusterSize as options.
684 * public/api/measurement-set.php: Added.
686 (MeasurementSetFetcher::__construct):
687 (MeasurementSetFetcher::fetch_config_list): Finds configurations that belongs to this (platform, metric) pair.
688 (MeasurementSetFetcher::at_end): Returns true if we've reached the end of all clusters for this set.
689 (MeasurementSetFetcher::fetch_next_cluster): Generates the JSON data for the next cluster. We generate clusters
690 in increasing chronological order (the oldest first and the newest last).
691 (MeasurementSetFetcher::execute_query): Executes the main query.
692 (MeasurementSetFetcher::format_map): Returns the mapping of a measurement field to an array index. This removes
693 the need to have key names for each measurement and reduces the JSON size by ~10%.
694 (MeasurementSetFetcher::format_run): Creates an array that contains data for a single measurement. The order
695 matches that of keys in format_map.
696 (MeasurementSetFetcher::parse_revisions_array): Added. Copied from runs.php.
697 * tests/api-measurement-set.js: Added. Added tests for /api/measurement-set.
699 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
701 Using fake timestamp in OS version make some results invisible
702 https://bugs.webkit.org/show_bug.cgi?id=152289
704 Reviewed by Stephanie Lewis.
706 Fix various bugs after r194088.
708 * public/api/commits.php:
709 (format_commit): Include the commit order.
711 (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
712 * tools/pull-os-versions.py:
713 (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
714 (available_builds_from_command): Exit early when an exception is thrown.
716 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
718 Fix a typo in the previous commit.
720 * public/include/report-processor.php:
722 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
724 Build fix after r192965. Suppress a warning about log being referred to as a closure variable.
726 * public/include/report-processor.php:
728 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
730 Using fake timestamp in OS version make some results invisible
731 https://bugs.webkit.org/show_bug.cgi?id=152289
733 Reviewed by Stephanie Lewis.
735 Added commit_order column to explicitly order OS versions. This fixes the bug whereby which
736 baseline results reported with only OS versions are shown with x coordinate set to 10 years ago.
738 To migrate the existing database, run:
739 ALTER TABLE commits ADD COLUMN commit_order integer;
740 CREATE INDEX commit_order_index ON commits(commit_order);
742 Then for each repository $1,
743 UPDATE commits SET (commit_time, commit_order) = (NULL, CAST(EXTRACT(epoch from commit_time) as integer))
744 WHERE commit_repository = $1;
747 * init-database.sql: Added the column.
748 * public/api/commits.php:
749 (fetch_commits_between): Use commit_order to order commits when commit_time is missing.
750 * public/api/report-commits.php:
751 (main): Set commit_order.
752 * tools/pull-os-versions.py:
753 (OSBuildFetcher.fetch_and_report_new_builds):
754 (OSBuildFetcher._assign_order): Renamed from _assign_fake_timestamps. Set the order instead of a fake timestmap.
756 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
758 Perf dashboard can't merge when the destination platform is missing baseline/target
759 https://bugs.webkit.org/show_bug.cgi?id=152286
761 Reviewed by Stephanie Lewis.
763 The bug was caused by the query to migrate test configurations to new platform checking
764 configuration type and metric separately; that is, it assumes the configuration exists
765 only if either the same type or the same metric exists in the destination.
767 Fixed the bug by checking both conditions simultaneously for each configuration.
769 * public/admin/platforms.php:
770 * tests/admin-platforms.js: Added a test.
772 2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
774 Perf dashboard's buildbot sync config JSON duplicates too much information
775 https://bugs.webkit.org/show_bug.cgi?id=152196
777 Reviewed by Stephanie Lewis.
779 Added shared, per-builder, and per-test (called type) configurations.
781 * tools/sync-with-buildbot.py:
785 2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
787 Perf dashboard should avoid overflow during geometric mean computation
788 https://bugs.webkit.org/show_bug.cgi?id=151773
790 Reviewed by Chris Dumez.
792 * public/include/report-processor.php:
794 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
796 Perf dashboard should extend baseline and target to the future
797 https://bugs.webkit.org/show_bug.cgi?id=151511
799 Reviewed by Darin Adler.
802 (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
803 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
804 (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
805 (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
806 * public/v2/manifest.js:
807 (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
809 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
811 Perf dashboard should always show comparison to baseline and target even if one is missing
812 https://bugs.webkit.org/show_bug.cgi?id=151510
814 Reviewed by Darin Adler.
816 Show the comparison status against the baseline when baseline is present but target is missing.
818 To make the code more readable, this patch splits the logic into three cases:
819 1. Both baseline and target are present
820 2. Only baseline is present
821 3. Only target is present
823 Also extracted a helper function to construct the label.
826 (.labelForDiff): Added.
827 (App.Pane.computeStatus):
829 2015-11-23 Commit Queue <commit-queue@webkit.org>
831 Unreviewed, rolling out r192716 and r192717.
832 https://bugs.webkit.org/show_bug.cgi?id=151582
834 The patch was incorrect. We always need at least one data
835 point in each configuration (Requested by rniwa on #webkit).
839 "Perf dashboard's should not include results more than 366
841 https://bugs.webkit.org/show_bug.cgi?id=151529
842 http://trac.webkit.org/changeset/192716
844 "Build fix for old version of PHP."
845 http://trac.webkit.org/changeset/192717
847 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
849 Build fix for old version of PHP.
851 * public/api/runs.php:
853 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
855 Perf dashboard's should not include results more than 366 days old in JSON
856 https://bugs.webkit.org/show_bug.cgi?id=151529
858 Reviewed by Timothy Hatcher.
860 Don't return results more than 366 days old in /api/runs/ JSON API.
861 This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.
863 * public/api/runs.php:
864 (main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
865 Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
866 of doing so will be included in elapsedTime.
867 (RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
868 (RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
869 (RunsGenerator::parse_revisions_array): Compute the max of commit times.
871 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
873 Remove chartPointRadius from interactive chart component
874 https://bugs.webkit.org/show_bug.cgi?id=151480
876 Reviewed by Darin Adler.
878 Replaced the parameter by CSS rules.
880 * public/v2/chart-pane.css:
882 (.chart .dot.foreground):
885 * public/v2/index.html:
886 * public/v2/interactive-chart.js:
887 (App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
888 (App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):
890 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
892 Perf dashboard's runs API uses more than 128MB of memory
893 https://bugs.webkit.org/show_bug.cgi?id=151478
895 Reviewed by Andreas Kling.
897 Don't fetch all query results at once to avoid using twice as much memory as needed.
898 Use iterative API to format each result at a time.
900 This change is also a 5% runtime performance gain.
902 * public/api/runs.php:
903 (RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
904 no longer needed as we pass in each configuration type explicitly to fetch_runs.
905 (RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
906 Also moved the logic to compute the last modified time here.
907 (RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
908 (RunsGeneratorForTestGroup):
909 (RunsGeneratorForTestGroup::__construct):
910 (RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.
912 * public/include/db.php:
913 (generate_data_file): Lock the file to avoid corruption.
915 2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
917 Perf dashboard always fetches charts JSON twice
918 https://bugs.webkit.org/show_bug.cgi?id=151483
920 Reviewed by Andreas Kling.
922 Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
923 obsolete (shouldRefetch is set true) or corrupt (the second closure).
928 2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
930 Internal perf dashboard takes forever to load
931 https://bugs.webkit.org/show_bug.cgi?id=151430
933 Rubber-stamped by Antti Koivisto.
935 Fix a few performance problems with the perf dashboard v2 UI.
938 (App.DashboardRow._createPane): Set "inDashboard" to true.
939 (App.Pane._fetch): Immediately show the cached chart instead of waiting for the refetched data which invokes
940 a PHP JSON API. Also don't fetch the analysis tasks when the chart is shown in the dashboard since we don't
941 show annotate charts in the dashboard.
943 2015-10-15 Ryosuke Niwa <rniwa@webkit.org>
945 Unreviewed fix of a test after r190687.
947 * tests/admin-regenerate-manifest.js:
949 2015-10-12 Ryosuke Niwa <rniwa@webkit.org>
951 Perf dashboard tools shouldn't require server credentials in multiple configuration files
952 https://bugs.webkit.org/show_bug.cgi?id=149994
954 Reviewed by Chris Dumez.
956 Made detect-changes.js and pull-svn.py pull username and passwords from the server config JSON to reduce
957 the number of JSON files that need to include credentials.
959 Also made each script reload the server config after sleep to allow dynamic credential updates.
961 In addition, change the server config JSON's format to include scheme, host, and port numbers separately
962 instead of a url since detect-changes.js needs each value separately.
964 This reduces the number of JSONs with credentials to two for our internal dashboard.
966 * tools/detect-changes.js:
967 (main): Added a property argument parsing. Now takes --server-config-json, --change-detection-config-json,
968 and --seconds-to-sleep like other scripts.
969 (parseArgument): Added.
970 (fetchManifestAndAnalyzeData): Reload the server config JSON.
971 (loadServerConfig): Added. Set settings.perfserver and settings.slave from the server config JSON. Also
972 add settings.perfserver.host to match the old format.
973 (configurationsForTesting): Fixed a bug that we throw an exception when a dashboard contains an empty cell.
975 * tools/pull-os-versions.py:
976 (main): Use load_server_config after each sleep.
979 (main): Use load_server_config after each sleep.
980 (fetch_commits_and_submit): Use the perf dashboard's auth as subversion credential when useServerAuth is set.
982 * tools/sync-with-buildbot.py:
983 (main): Use load_server_config after each sleep.
986 (load_server_config): Extracted from python scripts. Computes server's url from scheme, host, and port number
987 to match the old format python scripts except.
989 2015-10-11 Ryosuke Niwa <rniwa@webkit.org>
991 Build fix after r190817. Now that pull-os-versions store fake timestamps, we need to bypass timestamp
992 checks for OS versions when bots try to report new results. Otherwise, we fail to process the reports
993 with a MismatchingCommitTime error.
995 * public/include/report-processor.php:
996 (ReportProcessor::resolve_build_id):
998 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
1000 Perf dashboard erroneously shows an old OS build in A/B testing range
1001 https://bugs.webkit.org/show_bug.cgi?id=149942
1003 Reviewed by Darin Adler.
1005 Ordering OS builds lexicologically turned out be a bad idea since 15A25 falls between 15A242 and 15A251.
1006 Use a fake/synthetic timestamp to force the commonly understood total order instead.
1008 Refactored pull-os-versions.py to share the server config JSON with other scripts. Also made the script
1009 support pulling multiple sources; e.g. both OS X and iOS.
1011 Also removed superfluous feature to submit results in chunks. The perf dashboard can handle thousands of
1012 revisions being submitted at once just fine.
1014 * public/api/commits.php:
1015 (main): A partial revert of r185574 since we no longer need to order builds lexicologically.
1017 * tools/pull-os-versions.py:
1018 (main): Takes --os-config-json, --server-config-json, and --seconds-to-sleep as arguments instead of
1019 a single --config argument to share the server config JSON with other scripts.
1020 (OSBuildFetcher): Extracted out of main. This class is instantiated for each OS kind (e.g. OS X).
1021 (OSBuildFetcher.__init__): Added.
1022 (OSBuildFetcher._fetch_available_builds): Extracted out of main. Fetches available builds from a website
1024 (OSBuildFetcher.fetch_and_report_new_builds): Extracted out of main. Submits the fetched builds after
1025 filtering out the ones we've already reported.
1026 (OSBuildFetcher._assign_fake_timestamps): Creates a fake timestamp to establish a total order amongst each
1027 OS X / iOS style build number such as 12A3456b.
1029 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
1031 pull-svn.py fails to sync revisions when SVN credentials is not setup
1032 https://bugs.webkit.org/show_bug.cgi?id=149941
1034 Reviewed by Chris Dumez.
1036 Added the support for specifying subversion credentials.
1038 Also added the support for pulling from multiple subversion servers. Subversion servers are specified
1039 in a JSON configuration file specified by --svn-config formatted as follows:
1044 "url": "http://svn.webkit.org/repository/webkit",
1045 "username": "webkitten",
1046 "password": "webkitten's password",
1047 "trustCertificate": true,
1048 "accountNameFinderScript":
1049 ["python", "/Volumes/Data/WebKit/Tools/Scripts/webkit-patch", "find-users"]
1054 In addition, refactored it to use the shared server config JSON for the dashboard access.
1056 * tools/pull-svn.py:
1057 (main): Now takes --svn-config-json, --server-config-json, --seconds-to-sleep and --max-fetch-count
1058 as required options instead of seven unnamed arguments.
1059 (fetch_commits_and_submit): Extracted from main. Fetches at most max_fetch_count new revisions from
1060 the subversion server, and submits them in accordance with server_config.
1061 (fetch_commit_and_resolve_author): Now takes a single repository dictionary instead of two separate
1062 arguments for name and URL to pass down the repository's authentication info to fetch_commit.
1063 (fetch_commit): Ditto. Add appropriate arguments when username and passwords are specified.
1064 (resolve_author_name_from_account): Use a list argument instead of a single string argument now that
1065 the argument comes from a JSON instead of sys.argv.
1067 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1069 Unreviewed race condition fix. Exit early when xScale or yScale is not defined.
1071 * public/v2/interactive-chart.js:
1072 (App.InteractiveChartComponent._updateRangeBarRects):
1074 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1076 Add a page that cycles through v2 dashboards
1077 https://bugs.webkit.org/show_bug.cgi?id=149907
1079 Reviewed by Chris Dumez.
1081 Add cycler.html that goes through each dashboard on v2 UI.
1083 This allows the dashboards to be cycled through on a TV screen.
1085 * public/cycler.html: Added.
1086 (loadURLAt): Appends a new iframe to load the next URL (i is the index of the dashboard to be shown)
1087 at the end of body. We don't immediately show the new iframe since it might take a while to load.
1088 (showNewFrameIfLoaded): Remove the current iframe and show the next iframe if the next dashboard has
1089 finished loading. We can't rely on DOMContentLoaded or load events because we use asynchronous XHR to
1090 load each chart's data. Instead, wait until some chart becomes available or fails to load and none of
1091 charts are still in progress to be shown.
1093 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1095 Allow custom revisions to be specified in A/B testing
1096 https://bugs.webkit.org/show_bug.cgi?id=149905
1098 Reviewed by Chris Dumez.
1100 Allow custom revision number on each "repository" when creating a test group.
1102 * public/v2/app.css:
1103 (form .analysis-group [name=customValue]): Added.
1106 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
1107 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
1108 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
1109 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
1110 revision option is selected.
1112 * public/v2/index.html: Added a text field for specifying a custom revision number.
1114 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1116 Make the site name configurable in perf dashboard
1117 https://bugs.webkit.org/show_bug.cgi?id=149894
1119 Reviewed by Chris Dumez.
1121 Added "siteTitle" as a new configuration key to specify the site name.
1123 * public/include/db.php:
1124 (config): Now takes the default value as an argument.
1125 * public/include/manifest.php:
1126 (ManifestGenerator::generate): Include siteTitle in the manifest.
1127 * public/index.html: Update the title and the heading when the manifest is loaded.
1128 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
1129 * public/v2/manifest.js:
1130 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
1132 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1134 Perf dashboard doesn't show analysis tasks anchored at outliers
1135 https://bugs.webkit.org/show_bug.cgi?id=149870
1137 Reviewed by Chris Dumez.
1139 The bug was caused by the computation of start and end times of analysis tasks being dependent on
1140 time series provided to the interactive chart component even though they are already filtered.
1142 Since the interactive chart component shouldn't be messing with the underlying data models, moved
1143 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
1144 the unfiltered time series newly exposed on ChartData.
1146 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
1148 * public/admin/fetch-from-remote.php:
1149 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
1150 and Ember can start hanging browsers (took me three hours to debug this).
1153 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
1154 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
1155 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
1156 Filter the results manually instead.
1157 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
1158 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
1159 need to call a private method on it.
1160 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
1161 This will cause chartData to be modified so just exit early and wait for getting called again.
1163 * public/v2/interactive-chart.js:
1164 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
1167 * public/v2/manifest.js:
1168 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
1169 to compute the end points of analysis tasks when their end points are outliers.
1171 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1173 Unreviewed. Fix a typo in r190645.
1175 * public/include/db.php:
1177 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1179 V2 UI shouldn't sort dashboards lexicologically
1180 https://bugs.webkit.org/show_bug.cgi?id=149856
1182 Reviewed by Chris Dumez.
1184 Don't sort the dashboards by name in App.Manifest.
1187 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
1188 * public/v2/manifest.js:
1189 (App.Manifest.._fetchedManifest):
1191 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1193 V2 UI fails to show the data for the very first point in charts
1194 https://bugs.webkit.org/show_bug.cgi?id=149857
1196 Reviewed by Chris Dumez.
1198 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
1199 Explicitly check the type of this property instead.
1201 * public/v2/data.js:
1202 (TimeSeries.prototype.seriesBetweenPoints):
1204 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1206 Perf dashboard should have the capability to test local UI with production data
1207 https://bugs.webkit.org/show_bug.cgi?id=149834
1209 Reviewed by Chris Dumez.
1211 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
1213 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
1215 * config.json: Added remote server configurations.
1216 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
1217 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
1220 * public/include/db.php:
1221 (config_path): Extracted from generate_data_file.
1222 (generate_data_file):
1223 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
1224 run-with-remote-server.py.
1225 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
1227 (abspath_from_root):
1229 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
1233 * public/js/helper-classes.js:
1235 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
1237 build-requests should use conform to JSON API format
1238 https://bugs.webkit.org/show_bug.cgi?id=146375
1240 Reviewed by Stephanie Lewis.
1242 Instead of returning single dictionary that maps root set id to a dictionary of repository names
1243 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
1244 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
1245 matches what we do in /api/test-groups.
1247 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
1248 This is useful for debugging purposes.
1250 * public/api/build-requests.php:
1251 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
1252 (update_builds): Extracted from main.
1254 * public/include/build-requests-fetcher.php:
1255 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
1256 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
1257 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
1258 Moved the logic to exit early when the root set had already been fetched here.
1260 * public/v2/analysis.js:
1261 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
1264 * tools/pull-os-versions.py:
1266 (setup_auth): Moved to util.py
1268 * tools/sync-with-buildbot.py:
1269 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
1270 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
1272 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
1273 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
1274 (config_for_request): Fixed a bug that the script blows up when the build request is missing
1275 the repository specified in the configuration. This tolerance is necessary when a new repository
1276 dependency is added but we want to run A/B tests for old builds without the dependency.
1277 (fetch_json): No longer takes auth.
1280 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
1282 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
1284 Build fix. A/B testing is broken when continuous builders report revisions out of order.
1287 (App.AnalysisTaskController.Ember.Controller.extend.):
1289 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
1291 A/B testing results should be shown even if they were submitted to different platforms
1292 https://bugs.webkit.org/show_bug.cgi?id=146219
1294 Reviewed by Andreas Kling.
1296 Fetch A/B testing results regardless of the platform to which results are submitted
1297 by providing the platform ID to which the results were submitted for each test group.
1299 * public/api/test-groups.php:
1300 (main): Include the platform id in the test groups.
1301 * public/v2/analysis.js:
1302 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
1304 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
1306 Remove unnecessary svn:executable flags
1307 https://bugs.webkit.org/show_bug.cgi?id=146107
1309 Reviewed by Alexey Proskuryakov.
1311 * public/js/helper-classes.js: Removed property svn:executable.
1312 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
1313 * public/v2/app.css: Removed property svn:executable.
1314 * public/v2/app.js: Removed property svn:executable.
1315 * public/v2/chart-pane.css: Removed property svn:executable.
1316 * public/v2/data.js: Removed property svn:executable.
1317 * public/v2/index.html: Removed property svn:executable.
1318 * public/v2/js/d3/LICENSE: Removed property svn:executable.
1319 * public/v2/js/d3/d3.js: Removed property svn:executable.
1320 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
1321 * public/v2/js/ember-data.js: Removed property svn:executable.
1322 * public/v2/js/ember.js: Removed property svn:executable.
1323 * public/v2/js/handlebars.js: Removed property svn:executable.
1324 * public/v2/js/jquery.min.js: Removed property svn:executable.
1325 * public/v2/js/statistics.js: Removed property svn:executable.
1326 * public/v2/manifest.js: Removed property svn:executable.
1327 * public/v2/popup.js: Removed property svn:executable.
1329 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1331 Reading the list of analysis tasks is extremely slow
1332 https://bugs.webkit.org/show_bug.cgi?id=146086
1334 Reviewed by Darin Adler.
1336 The bug was caused by Ember data requesting manifest.js hundreds of times.
1337 Fetch it ahead of time in each route instead.
1340 (App.AnalysisRoute.model):
1341 (App.AnalysisTaskRoute.model):
1343 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1345 Update ReadMe.md and Install.md per database changes
1346 https://bugs.webkit.org/show_bug.cgi?id=146076
1348 Reviewed by Darin Adler.
1355 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1357 Increase the popup dismissal time from 100ms to 500ms
1358 https://bugs.webkit.org/show_bug.cgi?id=146077
1360 Rubber-stamped by Andreas Kling.
1362 * public/v2/popup.js:
1363 (App.PopupView.scheduleHiding):
1365 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
1367 v2 UI should have buttons to breakdown a test
1368 https://bugs.webkit.org/show_bug.cgi?id=146010
1370 Reviewed by Chris Dumez.
1372 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
1373 as well as "Breakdown" to add all subtests' metrics.
1375 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
1376 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
1379 (App.ChartsController.addAlternativePanes): Added.
1380 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
1381 (App.TestProxyForPopup.actionName): Added.
1382 (App.TestProxyForPopup.actionArgument): Added.
1383 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
1384 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
1385 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
1386 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
1387 that are already present in the list of panes.
1388 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
1389 * public/v2/index.html:
1390 * public/v2/manifest.js:
1391 (App.Metric.childMetrics): Added.
1393 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1395 Build fix after r185574.
1398 (set get App.Pane.Ember.Object.extend.):
1400 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1404 * tools/pull-os-versions.py:
1407 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1409 Perf dashboard should be able to list iOS versions as well as OS X versions
1410 https://bugs.webkit.org/show_bug.cgi?id=146003
1412 Reviewed by Stephanie Lewis.
1414 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
1415 information specified in config.json.
1417 * tools/pull-os-versions.py: Renamed from pull-osx.py.
1418 (main): Use available_builds_from_command when 'customCommands' is specified.
1419 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
1420 (fetch_available_builds): Now takes the repository name.
1422 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1424 Removed a superfluous console.log per Chris's comment.
1428 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1430 Analysis task should show all possible revisions for A/B testing
1431 https://bugs.webkit.org/show_bug.cgi?id=145996
1433 Reviewed by Chris Dumez.
1435 * public/api/commits.php:
1436 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
1437 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
1438 have a "commit time".
1441 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
1442 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
1443 the fetched list of commits if available.
1444 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
1445 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
1446 of points shown in the A/B testing configurations become too long.
1448 * public/v2/commits-viewer.js:
1449 (App.CommitsViewerComponent.commitsChanged):
1451 * public/v2/data.js:
1452 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
1454 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
1456 Add a script to post new OS X builds to perf dashboard
1457 https://bugs.webkit.org/show_bug.cgi?id=145955
1459 Reviewed by Darin Adler.
1461 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
1463 * public/api/report-commits.php:
1464 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
1465 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
1467 * tools/pull-osx.py: Added.
1468 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
1469 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
1470 (setup_auth): Sets up basic or digest auth to access the dashboard.
1471 (fetch_available_builds): Fetches and parses the XML document from an internal website.
1472 (textContent): A helper function to get the text content out of a XML node.
1473 (submit_commits): Submits commits to the perf dashboard.
1475 * tools/pull-svn.py:
1478 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
1480 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
1482 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
1483 https://bugs.webkit.org/show_bug.cgi?id=145940
1485 Reviewed by Darin Adler.
1487 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
1488 Also deleted the code to mark points outside the envelop as outliers.
1492 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
1494 Unreviewed build fix for merging platforms.
1496 * public/admin/platforms.php:
1498 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
1500 Unreviewed build fix. Some builder names are really long.
1502 * init-database.sql:
1504 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
1506 Show results and status before revisions for A/B testing results
1507 https://bugs.webkit.org/show_bug.cgi?id=145327
1509 Reviewed by Chris Dumez.
1511 Place the results and the status columns before the columns for revisions.
1512 Also show the absolute difference as well as the relative difference between the averages of A and B.
1515 (App.TestGroupPane._populate):
1516 (App.TestGroupPane._computeStatisticalSignificance):
1517 * public/v2/index.html:
1519 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1521 Build fix after r184591.
1523 * public/v2/manifest.js:
1525 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1527 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
1529 * public/include/build-requests-fetcher.php:
1531 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1533 UI to associate bugs with an analysis task is crappy
1534 https://bugs.webkit.org/show_bug.cgi?id=145198
1536 Reviewed by Andreas Kling.
1538 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
1539 a bug and a separate select view with a text field to associate a new bug instead of implicitly
1540 updating or deleting the existing record based on what the user had typed.
1542 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
1543 a given analysis task since it's perfectly reasonable for a given task to be associated with
1544 multiple WebKit bugs.
1546 * public/privileged-api/associate-bug.php:
1547 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
1548 one that matches the analysis task and the bug tracker when the bug number is falsey.
1550 * public/v2/analysis.js:
1551 (App.Bug.url): Added.
1552 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
1554 * public/v2/app.css:
1557 (App.AnalysisTaskController.actions.addBug): Added.
1558 (App.AnalysisTaskController.actions.deleteBug): Added.
1559 (App.AnalysisTaskController.associateBug): Deleted.
1561 * public/v2/index.html: Updated the templates.
1563 * public/v2/manifest.js:
1564 (App.BugTracker.urlFromBugNumber): Added.
1566 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1568 A/B testing rootSets should provide commit times as well as revisions
1569 https://bugs.webkit.org/show_bug.cgi?id=145207
1571 Reviewed by Andreas Kling.
1573 Some continuous build systems need the commit time as well as the revision number / hash so provide one
1574 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
1576 * public/include/build-requests-fetcher.php:
1577 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
1578 the revision number as well as the commit time.
1579 * tools/sync-with-buildbot.py:
1580 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
1581 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
1582 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
1584 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
1586 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
1588 * public/v2/manifest.js:
1589 (App.Manifest.Ember.Controller.extend.):
1590 (App.Manifest.Ember.Controller.extend):
1592 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
1594 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
1595 https://bugs.webkit.org/show_bug.cgi?id=145181
1597 Rubber-stamped by Chris Dumez.
1599 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
1600 for clarity. This change also reduces the code complexity.
1602 * public/index.html:
1604 (App.AnalysisTaskController._chartDataChanged):
1605 (App.TestGroupPane._createConfigurationSummary):
1606 * public/v2/data.js:
1607 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
1609 * public/v2/interactive-chart.js: Removed the support for showing units separately.
1610 (App.InteractiveChartComponent._constructGraphIfPossible):
1611 (App.InteractiveChartComponent._relayoutDataAndAxes)
1613 * public/v2/manifest.js:
1614 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
1615 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
1616 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
1617 automatically include unit.
1619 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
1621 REGRESSION: v2 UI reports a higher memory usage
1622 https://bugs.webkit.org/show_bug.cgi?id=145151
1624 Reviewed by Chris Dumez.
1626 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
1627 Fixed the bug by manually implementing the formatter as done in v1.
1629 * public/v2/manifest.js:
1630 (App.Manfiest._formatBytes): Added.
1631 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
1633 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
1635 Unreviewed build fix. Add "Duration" as a time metric.
1637 * public/js/helper-classes.js:
1638 * public/v2/data.js:
1639 (RunsData.unitFromMetricName):
1641 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
1643 Perf dashboard treats Speedometer and JetStream as smaller is better
1644 https://bugs.webkit.org/show_bug.cgi?id=144711
1646 Reviewed by Chris Dumez.
1648 Added the support for "Score" metric.
1650 * public/js/helper-classes.js:
1652 * public/v2/data.js:
1653 (RunsData.unitFromMetricName):
1654 (RunsData.isSmallerBetter):
1656 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
1658 Build fix after r183232.
1660 * public/include/json-header.php:
1662 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
1664 Perf dashboard should automatically detect regressions
1665 https://bugs.webkit.org/show_bug.cgi?id=141443
1667 Reviewed by Anders Carlsson.
1669 Added a node.js script detect-changes.js to detect potential regressions and progressions
1670 on the graphs tracked on v2 dashboards.
1672 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
1673 columns to analysis_tasks to keep the segmentation and test range selection strategies used
1674 to create an analysis task.
1676 * public/api/analysis-tasks.php:
1677 (format_task): Include task_segmentation and analysis_tasks in the results.
1679 * public/include/json-header.php:
1680 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
1681 of a CSRF prevention token.
1682 (should_authenticate_as_slave): Added.
1683 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
1684 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
1685 to a CSRF attack, we don't need to check a CSRF token.
1687 * public/privileged-api/create-analysis-task.php:
1688 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
1689 analysis task. Also add or find segmentation and test range selection strategies if specified.
1691 * public/privileged-api/create-test-group.php:
1692 (main): Use ensure_privileged_api_data_and_token_or_slave.
1694 * public/privileged-api/generate-csrf-token.php:
1697 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
1699 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
1700 (Array.prototype.find): Added a polyfill to be used in node.js.
1701 (RunsData.fetchRuns):
1702 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
1703 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
1704 in detect-changes.js.
1705 (RunsData.unitFromMetricName): Ditto.
1706 (RunsData.isSmallerBetter): Ditto.
1707 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
1708 times are identical.
1709 (TimeSeries): When commit times are identical, order points based on build time. This is needed
1710 for when we trigger two builds at two different OS versions with the same WebKit revision since
1711 OS versions don't change the commit times.
1712 (TimeSeries.prototype.findPointByIndex): Added.
1713 (TimeSeries.prototype.rawValues): Added.
1715 * public/v2/js/statistics.js:
1716 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
1717 description of this strategy instead of the default probability. Also fixed a bug that debugging
1718 code was referring to non-existent variables.
1719 (Statistics.executeStrategy): Moved from App.Pane (app.js).
1721 * public/v2/manifest.js:
1722 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
1723 used in detect-changes.js.
1725 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
1726 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
1727 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
1728 (main): Loads the settings JSON specified in the argument.
1729 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
1730 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
1731 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
1732 and computes various values for when statistically significant changes are detected later.
1733 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
1734 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
1735 in chronological order and create a new analysis task for the very last change we detected. We'll
1736 eventually create an analysis task for all detected changes since we're repeating the analysis in
1737 fetchManifestAndAnalyzeData after some time.
1738 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
1739 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
1740 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
1741 tasks for the same range (e.g. humans may create one before the script gets to do it).
1742 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
1743 testing if available, and notify another server with a HTML message as specified.
1744 (findStrategyByLabel):
1745 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
1746 test or values are getting smaller in a larger-is-better test and vice versa.
1747 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
1748 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
1752 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
1753 (instantiateNotificationTemplate):
1756 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
1758 Perf dashboard should have UI to set status on analysis tasks
1759 https://bugs.webkit.org/show_bug.cgi?id=143977
1761 Reviewed by Chris Dumez.
1763 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
1764 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
1765 The latter will be a useful metric once we start automatically creating analysis tasks.
1767 * init-database.sql: Added two columns to analysis_tasks table.
1768 * public/api/analysis-tasks.php: Include the added columns in the JSON.
1769 * public/include/db.php:
1770 (Database::to_database_boolean): Added.
1771 * public/include/json-header.php:
1772 (require_match_one_of_values): Added.
1773 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
1775 * public/v2/analysis.js:
1776 (App.AnalysisTask.result): Added.
1777 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
1778 and we want to differentiate null from false in order to differentiate the null-ness of the value.
1779 (App.AnalysisTask.saveStatus): Added.
1780 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
1781 * public/v2/app.css:
1783 (App.AnalysisTaskController.analysisResultOptions): Added.
1784 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
1785 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
1786 been created if 'no change' is selected.
1787 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
1788 (App.AnalysisTaskController.actions.saveStatus): Added.
1789 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
1790 'result' and 'needed' values of the analysis task.
1792 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
1794 Unreviewed build fix. Updated config.json after recent changes.
1798 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
1800 Make the analysis page more useful
1801 https://bugs.webkit.org/show_bug.cgi?id=143617
1803 Reviewed by Chris Dumez.
1805 * public/api/analysis-tasks.php:
1806 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
1807 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
1808 * public/v2/analysis.js:
1809 (App.AnalysisTask.formattedCreatedAt): Added.
1810 (App.AnalysisTask._addLeadingZero): Added.
1811 (App.AnalysisTask.buildRequestCount): Added.
1812 (App.AnalysisTask.finishedBuildRequestCount): Added.
1813 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
1814 (App.AnalysisTask.testGroups):
1815 (App.AnalysisTask.triggerable):
1816 (App.AnalysisTask.label):
1818 * public/v2/app.css: Tweaked style rules for the analysis page.
1821 (App.buildPopup): Sort the list of platforms by name.
1822 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
1823 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
1824 such as "Bugzilla" with the corresponding text field.
1826 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
1827 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
1828 for the accompanying graph.
1830 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
1832 Perf dashboard should automatically select ranges for A/B testing
1833 https://bugs.webkit.org/show_bug.cgi?id=143580
1835 Reviewed by Chris Dumez.
1837 Added a new statistics option for picking a A/B test range selection strategy.
1838 The selected ranges are shown in the graph using the same UI to show analysis tasks.
1841 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
1842 charts page used by the dashboard since we've added a new parameter at the end.
1843 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
1844 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
1845 (App.Pane._cloneStrategy): Copy isSegmentation.
1846 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
1847 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
1848 selection strategy is picked by the user.
1849 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
1850 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
1851 the return value from the moving average time series to a dictionary that contains the moving
1852 average time series, a dictionary of anomalies, and an array of test ranges.
1853 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
1854 (App.ChartsController._serializePaneList): Ditto for serialization.
1855 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
1856 test range selection strategy.
1858 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
1860 * public/v2/index.html: Added UI for selecting a test range selection strategy.
1862 * public/v2/interactive-chart.js:
1863 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
1865 * public/v2/js/statistics.js:
1866 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
1867 (Statistics.TestRangeSelectionStrategies): Added.
1869 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
1871 The results of A/B testing should state statistical significance
1872 https://bugs.webkit.org/show_bug.cgi?id=143552
1874 Reviewed by Chris Dumez.
1876 Added statistical comparisons between results for each configuration on analysis task page using
1877 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
1880 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
1881 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
1883 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
1884 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
1885 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
1886 Also renamed "items" to "requests" for clarity.
1888 * public/v2/index.html: Added the template for showing statistical comparisons.
1890 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
1891 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
1892 probability and vice versa.
1893 (Statistics.supportedConfidenceIntervalProbabilities):
1894 (Statistics.confidenceIntervalDelta):
1895 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
1896 the probability that two values are sampled from distinct distributions using Welch's t-test.
1897 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
1898 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
1899 (.oneSidedToTwoSidedProbability): Extracted.
1900 (.twoSidedToOneSidedProbability): Extracted.
1901 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
1902 now that computeWelchsT takes two-sided probability.
1904 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
1906 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
1910 (App.Pane.refetchRuns):
1912 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
1914 Perf dashboard should have a way of marking outliers
1915 https://bugs.webkit.org/show_bug.cgi?id=143466
1917 Reviewed by Chris Dumez.
1919 Address kling's in-person comment to notify users when the new run status is saved in the database.
1922 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
1923 * public/v2/chart-pane.css: Fixed a typo.
1925 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
1927 Perf dashboard should have a way of marking outliers
1928 https://bugs.webkit.org/show_bug.cgi?id=143466
1930 Reviewed by Chris Dumez.
1932 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
1933 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
1935 * init-database.sql: Added run_marked_outlier column to test_runs table.
1937 * public/admin/tests.php:
1939 * public/api/runs.php:
1940 (main): Only emit Cache-Control and Expires headers in v1 UI.
1941 (RunsGenerator::format_run): Emit markedOutlier.
1943 * public/include/admin-header.php:
1945 * public/include/db.php:
1946 (Database::is_true): Made it static.
1948 * public/include/manifest.php:
1949 (Manifest::platforms):
1951 * public/index.html: Call into /api/runs/ with ?cache=true.
1953 * public/privileged-api/update-run-status.php: Added.
1954 (main): Updates the newly added column in test_runs table.
1958 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
1959 (App.Pane._didFetchRuns): Renamed from _updateChartData.
1960 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
1961 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
1962 the interactive chart component only observes changes to chartData and not individual properties of it.
1963 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
1964 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
1965 clone chartData here.
1967 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
1968 invoking App.Pane._setNewChartData.
1969 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
1970 opening the pane for marking points as outliers would be annoying.
1971 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
1972 (App.PaneController.selectedMeasurement): Added.
1973 (App.PaneController.showOutlierTitle): Added.
1974 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
1975 mark the selected point as an outlier via the newly added privileged API.
1977 * public/v2/chart-pane.css: Updated styles.
1979 * public/v2/data.js:
1980 (PrivilegedAPI._post): Report the semantic errors.
1981 (Measurement.prototype.markedOutlier): Added.
1982 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
1983 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
1984 whether the time series should include measurements marked as outliers or not.
1985 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
1986 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
1987 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
1989 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
1990 mark individual points as outliers.
1992 * public/v2/interactive-chart.js:
1993 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
1994 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
1995 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
1996 with the arrow key navigation support, this is no longer an issue.
1998 * public/v2/manifest.js:
1999 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
2000 updates the time series in this chart data in order to include or exclude outliers.
2002 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2004 Perf dashboard should be able to trigger A/B testing jobs for iOS
2005 https://bugs.webkit.org/show_bug.cgi?id=143398
2007 Reviewed by Chris Dumez.
2009 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
2011 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
2013 * public/api/triggerables.php:
2014 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
2015 * public/v2/analysis.js:
2016 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
2018 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
2019 some of the data points. This will happen when we modify the list of projects we build for iOS.
2020 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
2021 attempts to create an invalid test group; when there is already another test group of the same or when
2022 only either configuration specifies the revision for some repository.
2023 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
2024 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
2025 * tools/sync-with-buildbot.py:
2026 (find_request_updates):
2027 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
2028 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
2029 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
2030 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
2032 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2034 Add time series segmentation algorithms as moving averages
2035 https://bugs.webkit.org/show_bug.cgi?id=143362
2037 Reviewed by Chris Dumez.
2039 This patch implements two preliminary time series segmentation algorithms as moving averages.
2041 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
2042 If Welch's t-test implicates a statistically significance difference, then split the segment into two
2043 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
2044 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
2045 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
2047 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
2048 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
2049 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
2050 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
2051 through i = n. However, we also don't want to split every data point into a separate segment so we need
2052 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
2053 models discussed in [2] for simplicity. We will tune this cost function further in the future.
2055 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
2056 space is exponential with respect to the size of the time series since we could split at each data point.
2057 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
2058 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
2059 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
2060 exploring much of the problem space.
2062 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
2063 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
2064 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
2065 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
2066 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
2067 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
2068 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
2070 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
2071 a nonstationary time series", Physical Review E 69, 021108 (2004)
2073 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
2074 Lithuanian Mathematical Journal, vol 46, 2006
2076 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
2077 * public/v2/js/statistics.js:
2078 (Statistics.testWelchsT):
2079 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
2080 of each value array between which Welch's t-statistic is computed. This generalization helps the
2081 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
2082 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
2083 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
2084 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
2085 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
2087 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
2088 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
2090 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2092 REGRESSION: Perf dashboard sometimes fails to update zooming level
2093 https://bugs.webkit.org/show_bug.cgi?id=143359
2095 Reviewed by Darin Adler.
2097 The bug was caused by various bugs that ended up in an exception.
2100 (App.Pane._handleFetchErrors): Removed superfluous console.log.
2101 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
2102 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
2103 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
2104 to # when Ember.js fails to attach event listeners on time.
2105 * public/v2/interactive-chart.js:
2106 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
2107 the containing element's size is 0.
2108 (App.InteractiveChartComponent._updateBrush): Ditto.
2110 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
2112 Perf dashboard should have UI to test out anomaly detection strategies
2113 https://bugs.webkit.org/show_bug.cgi?id=143290
2115 Reviewed by Benjamin Poulain.
2117 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
2119 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
2120 as well as Welch's t-test that compares the last five points to the prior twenty points.
2122 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
2123 performance tests although they compare medians instead of means.
2125 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
2128 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
2129 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
2130 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
2131 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
2132 Only report the first data point when multiple consecutive data points are detected as anomalies.
2133 * public/v2/chart-pane.css: Updated styles.
2134 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
2135 * public/v2/js/statistics.js:
2136 (Statistics.testWelchsT): Added. Implements Welch's t-test.
2137 (.sampleMeanAndVarianceForValues): Added.
2138 (.createWesternElectricRule): Added.
2139 (.countValuesOnSameSide): Added.
2140 (Statistics.AnomalyDetectionStrategy): Added.
2142 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2144 REGRESSION: Searching commits can highlight wrong data points
2145 https://bugs.webkit.org/show_bug.cgi?id=143272
2147 Reviewed by Antti Koivisto.
2149 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
2150 return commit times with only second precision. This resulted in the frontend code to match a commit
2151 with the data point that included the next commit when the millisecond component of commit's timestamp
2152 wasn't identically 0.
2154 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
2155 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
2156 so miliseconds component was only preserved in /api/commits.
2158 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
2159 it returns time in milisecond precision.
2161 * public/api/commits.php:
2162 (fetch_commits_between): Use Database::to_js_time for format commit times.
2163 (format_commit): Ditto.
2164 * public/include/db.php:
2165 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
2166 * public/v2/data.js:
2167 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
2169 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2171 Perf dashboard should show relative change in values
2172 https://bugs.webkit.org/show_bug.cgi?id=143252
2174 Reviewed by Antti Koivisto.
2176 When a range of values are selected, show the percentage difference between the start and the end
2177 in addition to the absolute value difference. When a single point is selected, show the relative
2178 difference with respect to the previous point. Use two significant figures and always show plus sign
2179 when the difference is positive.
2181 * public/v2/app.js: Compute and format the relative difference.
2182 * public/v2/chart-pane.css: Don't let commits view shrink itself when they're all collapsed.
2183 * public/v2/index.html: Show the relative difference.
2185 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2187 REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
2188 https://bugs.webkit.org/show_bug.cgi?id=143254
2190 Reviewed by Antti Koivisto.
2192 The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
2193 or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
2194 so that the interactive chart component will observe a change to 'chartData'.
2197 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.
2199 2015-03-19 Ryosuke Niwa <rniwa@webkit.org>
2201 Unreviewed build fixes.
2203 * public/include/manifest.php:
2204 (Manifest::generate): These should be {} instead of [] when they're empty.
2205 * public/v2/data.js:
2206 (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
2207 * public/v2/manifest.js:
2208 (App.Metric.fullName): Fixed the typo.
2209 * tests/admin-regenerate-manifest.js: Fixed the test.
2211 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2213 Commit the erroneously reverted change.
2215 * public/api/runs.php:
2216 (RunsGenerator::results):
2218 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2220 Loading the perf dashboard takes multiple seconds
2221 https://bugs.webkit.org/show_bug.cgi?id=141860
2223 Reviewed by Andreas Kling.
2225 This patch introduces the caches of JSON files returned by /api/ in /data/ directory. It also records
2226 the last time test_runs rows associated with the requested platforms and metrics are inserted, updated,
2227 or removed in the caches as well as the manifest JSON files ("last modified time"). Because the manifest
2228 is regenerated each time a new test result is reported, the front end can compare last modified time in
2229 the manifest file with that in a /api/runs JSON cache to detect the stale-ness.
2231 More concretely, the front end first optimistically fetches the JSON in /data/. If the cache doesn't exit
2232 or the last modified time in the cache doesn't match with that in the manifest file, it would fetch it
2233 again via /api/runs. In the case the cache did exist, we render the charts based on the cache meanwhile.
2234 This dramatically reduces the perceived latency for the page load since charts are drawn immediately using
2235 the cache and we would only re-render the charts as new up-to-date JSON comes in.
2237 This patch also changes the format of runs JSONs by pushing the exiting properties into 'configurations'
2238 and adding 'lastModified' and 'elapsedTime' at the top level.
2240 * init-database.sql: Added config_runs_last_modified to test_configurations table as well as a trigger to
2241 auto-update this column upon changes to test_runs table.
2243 * public/admin/test-configurations.php:
2244 (add_run): Regenerate the manifest file to invalidate the /api/runs JSON cache.
2245 (delete_run): Ditto.
2247 * public/api/runs.php:
2248 (main): Fetch all columns of test_configurations table including config_runs_last_modified. Also generate
2249 the cache in /data/ directory.
2250 (RunsGenerator::__construct): Compute the last modified time for this (platform, metric) pair.
2251 (RunsGenerator::results): Put the old content in 'configurations' property and include 'lastModified' and
2252 'elapsedTime' properties. 'elapsedTime' is added for debugging purposes.
2253 (RunsGenerator::add_runs):
2254 (RunsGenerator::parse_revisions_array):
2256 * public/include/db.php:
2257 (CONFIG_DIR): Added.
2258 (generate_data_file): Added based on ManifestGenerator::store.
2259 (Database::to_js_time): Extracted from RunsGenerator::add_runs to share code.
2261 * public/include/json-header.php:
2262 (echo_success): Renamed from success_json. Return the serialized JSON instead of echo'ing it so that we can
2263 generate caches in /api/runs/.
2264 (exit_with_success):
2266 * public/include/manifest.php:
2267 (ManifestGenerator::generate): Added 'elapsedTime' property for the time taken to generate the manifest.
2268 It seems like we're generating it in 200-300ms for now so that's good.
2269 (ManifestGenerator::store): Uses generate_data_file.
2270 (ManifestGenerator::platforms): Added 'lastModified' array to each platform entry. This array contains the
2271 last modified time for each (platform, metric) pair.
2273 * public/index.html:
2274 (fetchTest): Updated per the format change in runs JSON.
2277 (App.Pane._fetch): Fetch the cached JSON first. Refetch the uncached version if instructed as such.
2278 (App.Pane._updateChartData): Extracted from App.Pane._fetch.
2279 (App.Pane._handleFetchErrors): Ditto.
2281 * public/v2/data.js:
2282 (RunsData.fetchRuns): Takes the fourth argument indicating whether we should fetch the cached version or not.
2283 The cached JSON is located in /data/ with the same filename. When fetching a cached JSON results in 404,
2284 fulfill the promise with null as the result instead of rejecting it. The only client of this function which
2285 sets useCache to true is App.Manifest.fetchRunsWithPlatformAndMetric, and it handles this special case.
2287 * public/v2/manifest.js:
2288 (App.DateArrayTransform): Added. Handles the array of last modified dates in platform objects.
2289 (App.Platform.lastModifiedTimeForMetric): Added. Returns the last modified date in the manifest JSON.
2290 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes "useCache" like RunsData.fetchRuns. Set shouldRefetch
2291 to true if response is null (the cache didn't exit) or the cache is out-of-date.
2292 (App.Manifest._formatFetchedData): Extracted from App.Manifest.fetchRunsWithPlatformAndMetric.
2295 (initializeDatabase): Avoid splitting function definitions in the middle.
2297 * tests/api-report.js: Added tests to verify that reporting new test results updates the last modified time
2298 in test_configurations.
2300 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2302 REGRESSION(r180333): Analysis tasks can't be associated with bugs
2303 https://bugs.webkit.org/show_bug.cgi?id=141858
2305 Reviewed by Andreas Kling.
2307 Added back the erroneously removed table to associate bugs. Also moved "details-table-container" div outside
2308 of the chart-details partial template as it needs to wrap associate bugs in analysis task pages.
2310 * public/v2/chart-pane.css:
2311 * public/v2/index.html:
2313 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2315 Selecting revisions for A/B testing is hard
2316 https://bugs.webkit.org/show_bug.cgi?id=141824
2318 Reviewed by Andreas Kling.
2320 Update the revisions used in A/B testing based on the selection in the overview chart. This allows users to
2321 intuitively select revisions based on points shown in the chart. Removed the old select elements used to
2322 select A/B testing points manually.
2324 Also renamed 'testSets' to 'configurations', 'roots' to 'rootConfigurations', and 'revisions' in each root's
2325 sets to 'options' for clarity.
2327 * public/v2/app.css: Reorganized style rules.
2330 (App.AnalysisTaskController):
2331 (App.AnalysisTaskController._taskUpdated): Merged updateTestGroupPanes.
2332 (App.AnalysisTaskController._chartDataChanged): Renamed from paneDomain. It's now an observer instead of
2333 a property, which sets 'overviewDomain' property as well as other properties.
2334 (App.AnalysisTaskController.updateRootConfigurations): Renamed from updateRoots.
2335 (App.AnalysisTaskController._updateRootsBySelectedPoints): Added. Select roots based on the selected points
2336 in the overview chart.
2338 * public/v2/chart-pane.css: Added arrows next to the configuration names (e.g. 'A') to indicate whether
2339 individual build requests / test results are shown or not.
2341 * public/v2/index.html: Removed the select element per configuration column. Also moved the select element
2342 for the number of runs as it doesn't belong in the same table as the one that lists repositories and roots.
2344 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2346 Unreviewed test fixes after r179037, r179591, and r179763.
2348 * tests/admin-regenerate-manifest.js:
2349 * tests/admin-reprocess-report.js:
2351 2015-02-19 Ryosuke Niwa <rniwa@webkit.org>
2353 Relationship between A/B testing results are unclear
2354 https://bugs.webkit.org/show_bug.cgi?id=141810
2356 Reviewed by Andreas Kling.
2358 Show a "reference chart" indicating which two points have been tested in each test group pane.
2360 Now the chart shown at the top of an analysis task page is called the "overview pane", and we use the pane
2361 and the domain used in this chart to show charts in each test group.
2363 Also renamed an array of revisions used in the A/B test results tables from 'revisions' to 'revisionList'.
2365 * public/v2/analysis.js:
2366 (App.TestGroup._fetchTestResults): Renamed from _fetchChartData. Set 'testResults' instead of 'chartData'
2367 since this is the results of A/B testing results, not the data for charts shown next to them.
2369 * public/v2/app.css: Added CSS rules for reference charts.
2372 (App.AnalysisTaskController.paneDomain): Set 'overviewPane' and 'overviewDomain' on each test group pane.
2373 (App.TestGroupPane._populate): Updated per 'chartData' to 'testResults' rename.
2374 (App.TestGroupPane._updateReferenceChart): Get the chart data via the overview pane and find points that
2375 identically matches root sets. If one of configuration used a set of revisions for which no measurement
2376 was made in the original chart, don't show the reference chart as that would be misleading / confusing.
2377 (App.TestGroupPane._computeRepositoryList): Updated per 'chartData' to 'testResults' rename.
2378 (App.TestGroupPane._createConfigurationSummary): Ditto. Also renamed 'revisions' to 'revisionList'.
2379 In addition, renamed 'buildNumber' to 'buildLabel' and prefixed it with "Build ".
2381 * public/v2/data.js:
2382 (Measurement.prototype.revisionForRepository): Added.
2383 (Measurement.prototype.commitTimeForRepository): Cleanup.
2384 (TimeSeries.prototype.findPointByRevisions): Added. Finds a point based on a set of revisions.
2386 * public/v2/index.html: Added the reference chart. Streamlined the status label for each build request
2387 by including the build number in the title attribute instead of in the markup.
2389 * public/v2/interactive-chart.js:
2390 (App.InteractiveChartComponent._updateDomain): Fixed a typo introduced as a consequence of r179913.
2391 (App.InteractiveChartComponent._computeYAxisDomain): Expand the y-axis to show the highlighted points.
2392 (App.InteractiveChartComponent._highlightedItemsChanged): Adjust the y-axis as needed.
2394 2015-02-18 Ryosuke Niwa <rniwa@webkit.org>
2396 Analysis task pages are unusable
2397 https://bugs.webkit.org/show_bug.cgi?id=141786
2399 Reviewed by Andreas Kling.
2401 This patch makes following improvements to analysis task pages:
2402 1. Making the main chart interactive. This change required the use of App.Pane as well as moving the code to
2403 compute the data for the details pane from PaneController.
2404 2. Moving the form to add a new test group to the top of test groups instead of the bottom of them.
2405 3. Grouping the build requests in each test group by root sets instead of the order by which they were ran.
2406 This change required the creation of App.TestGroupPane as well as its methods.
2407 4. Show a box plot for each root set configuration as well as each build request. This change required
2408 App.BoxPlotComponent.
2409 5. Show revisions of each repository (e.g. WebKit) for each root set and build request.
2411 * public/api/build-requests.php:
2412 (main): Update per the rename of BuildRequestsFetcher::root_sets to BuildRequestsFetcher::root_sets_by_id.
2414 * public/api/test-groups.php:
2415 (main): Include root sets and roots in the response.
2416 (format_test_group):
2418 * public/include/build-requests-fetcher.php:
2419 (BuildRequestsFetcher::root_sets_by_id): Renamed from root_sets.
2420 (BuildRequestsFetcher::root_sets): Added.
2421 (BuildRequestsFetcher::roots): Added.
2422 (BuildRequestsFetcher::fetch_roots_for_set): Takes a boolean argument $resolve_ids. This flag is only set to
2423 true in /api/build-requests/ (as done prior to this patch) to use repository names as identifiers since
2424 tools/sync-with-buildbot.py can't convert repository names to their ids.
2426 * public/v2/analysis.js:
2428 (App.RootSet): Added.
2429 (App.RootSet.revisionForRepository): Added.
2430 (App.TestGroup.rootSets): Deleted the code to compute root set ids from build requests now that the JSON
2431 response at /api/test-groups will include them.
2432 (App.BuildRequest): Ditto. Also deleted 'configLetter' property, which has been moved to a proxy created by
2433 _createConfigurationSummary.
2434 (App.BuildRequest.statusLabel): Use 'Completed' as the human readable label for 'completed' status.
2435 (App.BuildRequest.aggregateStatuses): Added. Generates a human readable status for a set of build requests.
2437 * public/v2/app.css: Updated style rules for analysis task pages.
2440 (App.Pane): This class is now used in analysis task pages to make the main chart interactive.
2441 (App.Pane._updateDetails): Moved from App.PaneController.
2443 (App.PaneController._updateCanAnalyze): Updated the code per the move of selectedPoints.
2445 (App.AnalysisTaskController): Added 'details'.
2446 (App.AnalysisTaskController._taskUpdated):
2447 (App.AnalysisTaskController.paneDomain):Renamed from _fetchedRuns.
2448 (App.AnalysisTaskController.updateTestGroupPanes): Added. Creates App.TestGroupPane for each test group.
2449 (App.AnalysisTaskController.actions.toggleShowRequestList): Added.
2451 (App.TestGroupPane): Added.
2452 (App.TestGroupPane._populate): Added. Group build requests by root sets and create a summary for each group.
2453 (App.TestGroupPane._computeRepositoryList): Added. Returns a sorted list of repositories which is the union
2454 of all repositories appearing in root sets and builds associated with A/B testing results.
2455 (App.TestGroupPane._groupRequestsByConfigurations): Added. Groups build requests by root sets.
2456 (App.TestGroupPane._createConfigurationSummary): Added. Creates a summary for a group of build requests that
2457 use the same root set. We start by wrapping "raw" build requests in a proxy with formatted values,
2458 build numbers, etc... obtained from the fetched chart data. The list of revisions shown in the group summary
2459 is a union of revisions in the root set and the first build request in the group. We null-out revision info
2460 for a build request if it is identical to the one in the summary. The range of values is expanded as needed
2461 by the values in the group as well as 95% percentile confidence interval.
2463 (App.BoxPlotComponent): Added. Controls a box plot shown for each test group summary and build request.
2464 (App.BoxPlotComponent.didInsertElement): Added. Inserts a SVG element as well as two indicator rects to show
2465 the mean and the confidence interval.
2466 (App.BoxPlotComponent._updateBars): Added. Updates the dimensions of the indicator rects.
2467 (App.BoxPlotComponent.valueChanged): Added. Computes the relative dimensions of the indicator rects and
2468 calls _updateBars to update the rects.
2470 * public/v2/chart-pane.css: Added some style rules to be used in the details pane in analysis task pages.
2472 * public/v2/data.js:
2473 (Measurement.prototype.formattedRevisions):
2474 (Measurement.formatRevisionRange): Renamed from Measurement.prototype._formatRevisionRange so that it can be
2475 called in _createConfigurationSummary.
2477 * public/v2/index.html: Updated the templates for analysis task pages. Moved the form to create a new test
2478 group above all test groups, and replaced the list of data points by "details" pane used in the charts page.
2479 Also made the fetching of chartData no longer block showing of test groups.
2481 * public/v2/interactive-chart.js:
2482 (App.InteractiveChartComponent._updateDomain): Added an early exit to fix a newly revealed race condition.
2483 (App.InteractiveChartComponent._domainChanged): Ditto.
2484 (App.InteractiveChartComponent._updateSelectionToolbar): Made it respect 'zoomable' boolean property.
2486 * public/v2/js/statistics.js:
2487 (Statistics.min): Added.
2488 (Statistics.max): Added.
2490 * public/v2/manifest.js:
2491 (App.Manifest.fetchRunsWithPlatformAndMetric): Added formatWithDeltaAndUnit to be used in _createConfigurationSummary.
2493 2015-02-14 Ryosuke Niwa <rniwa@webkit.org>
2495 Build URL on new perf dashboard doesn't resolve $builderName
2496 https://bugs.webkit.org/show_bug.cgi?id=141583
2498 Reviewed by Darin Adler.
2500 Support $builderName in the build URL template.
2502 * public/js/helper-classes.js:
2503 (TestBuild.buildUrl): Replaced $builderName with the builder name.
2505 * public/v2/manifest.js:
2506 (App.Metric.fullName): Fixed the typo. We need &ni, not &in.
2507 (App.BuilderurlFromBuildNumber): Replaced $builderName with the builder name.
2509 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
2511 Unreviewed build fix after r179591.
2513 * public/api/commits.php:
2515 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
2517 The status of a A/B testing request always eventually becomes "Failed"
2518 https://bugs.webkit.org/show_bug.cgi?id=141523
2520 Reviewed by Andreas Kling.
2522 The bug was caused by /api/build-requests always setting the status of a build request to 'failed' when
2523 'failedIfNotCompleted' was sent by the buildbot sync'er.
2525 Fixed the bug by only setting the status to 'failed' if it wasn't set to 'completed'.
2527 * public/api/build-requests.php:
2530 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
2532 Unreviewed, remove empty directories.
2534 * public/data: Removed.
2536 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
2538 Perf dashboard should show the results of A/B testing
2539 https://bugs.webkit.org/show_bug.cgi?id=141500
2541 Reviewed by Chris Dumez.
2543 Added the support for fetching test_runs for a specific test group in /api/runs/, and used it in the
2544 analysis task page to fetch results for each test group.
2546 Merged App.createChartData into App.Manifest.fetchRunsWithPlatformAndMetric so that App.BuildRequest
2547 can use the formatter.
2549 * public/api/runs.php:
2550 (fetch_runs_for_config_and_test_group): Added.
2551 (fetch_runs_for_config): Just return the fetched rows since main will format them with RunsGenerator.
2552 (main): Use fetch_runs_for_config_and_test_group to fetch rows when a test group id is specified. Also
2553 use RunsGenerator to format results.
2554 (RunsGenerator): Added.
2555 (RunsGenerator::__construct): Added.
2556 (RunsGenerator::add_runs): Added.
2557 (RunsGenerator::format_run): Moved.
2558 (RunsGenerator::parse_revisions_array): Moved.
2560 * public/v2/analysis.js:
2561 (App.TestGroup): Fixed a typo. The property on a test group that refers to an analysis task is "task".
2562 (App.TestGroup._fetchChartData): Added. Fetches all A/B testing results for this group.
2563 (App.BuildRequest.configLetter): Renamed from config since this returns a letter that identifies the
2564 configuration associated with this build request such as "A" and "B".
2565 (App.BuildRequest.statusLabel): Added the missing label for failed build requests.
2566 (App.BuildRequest.url): Added. Returns the URL associated with this build request.
2567 (App.BuildRequest._meanFetched): Added. Retrieve the mean and the build number for this request via
2571 (App.Pane._fetch): Set chartData directly here.
2572 (App.Pane._updateMovingAverageAndEnvelope): Renamed from _computeChartData. No longer sets chartData
2573 now that it's done in App.Pane._fetch.
2574 (App.AnalysisTaskController._fetchedRuns): Updated per createChartData merge.
2576 * public/v2/data.js:
2577 (Measurement.prototype.buildId): Added.
2578 (TimeSeries.prototype.findPointByBuild): Added.
2580 * public/v2/index.html: Fixed a bug that build status URL was broken. We can't use link-to helper since
2581 url is not an Ember routed path.
2583 * public/v2/manifest.js:
2584 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes testGroupId as the third argument. Merged
2585 App.createChartData here so that App.BuildRequest can use the formatter
2587 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
2589 v2 UI should adjust the number of ticks on dashboards based on screen size
2590 https://bugs.webkit.org/show_bug.cgi?id=141502
2592 Reviewed by Chris Dumez.
2594 * public/v2/interactive-chart.js:
2595 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Compute the number of ticks based on the
2598 2015-02-11 Ryosuke Niwa <rniwa@webkit.org>
2600 New perf dashboard shows too much space around interesting data points
2601 https://bugs.webkit.org/show_bug.cgi?id=141487
2603 Reviewed by Chris Dumez.
2605 Revise the y-axis range adjustment algorithm in r179913. Instead of showing the entire moving average,
2606 show the current time series excluding points in the series outside the moving average envelope.
2609 (App.Pane._computeChartData): Don't deal with missing moving average or enveloping strategy here.
2610 (App.Pane._computeMovingAverageAndOutliers): Set isOutliner to true on all data points in the current
2611 time series if the point lies outside the moving average envelope. Don't expose the moving average or
2612 the envelope computed for this purpose if they're not set by the user.
2614 * public/v2/data.js:
2615 (TimeSeries.prototype.minMaxForTimeRange): Takes a boolean argument, ignoreOutlier. When the flag is set
2616 to true, min/max computation will ignore any point in the series with non-falsy "isOutliner" property.
2618 * public/v2/interactive-chart.js:
2619 (App.InteractiveChartComponent._constructGraphIfPossible): Unsupport hideMovingAverage and hideEnvelope.
2620 (App.InteractiveChartComponent._computeYAxisDomain): Removed the commented out code. Also moved the code
2621 to deal with showFullYAxis here.
2622 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Rewrote the code. Takes ignoreOutliners as an
2623 argument instead of directly inspecting showFullYAxis.
2625 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
2627 New perf dashboard shouldn't always show outliners
2628 https://bugs.webkit.org/show_bug.cgi?id=141445
2630 Reviewed by Chris Dumez.
2632 Use the simple moving average with an average difference envelope to compute the y-axis range to show
2633 to avoid expanding it spuriously to show one off outlier.
2636 (App.Pane): Don't show the full y-axis range by default.
2637 (App.Pane._computeChartData): Use the first strategies for the moving average and the enveloping if
2638 one is not specified by the user but without showing them in the charts.
2639 (App.Pane._computeMovingAverage): Takes moving average and enveloping strategies as arguments instead
2640 of retrieving via chosenMovingAverageStrategy and chosenEnvelopingStrategy.
2642 (App.ChartsController._parsePaneList): Added showFullYAxis as a query string argument to each pane.
2643 (App.ChartsController._serializePaneList): Ditto.
2645 * public/v2/chart-pane.css: Added a CSS rule for when y-axis is clickable.
2647 * public/v2/index.html: Pass in showFullYAxis as an argument to the main interactive chart.
2649 * public/v2/interactive-chart.js:
2650 (App.InteractiveChartComponent._constructGraphIfPossible): Add an event listener on y-axis labels when
2651 the chart is interactive so that toggle showFullYAxis. Also hide the moving average and/or the envelope
2652 if they are not specified by the user (i.e. only used to adjust y-axis range).
2653 (App.InteractiveChartComponent._updateDomain): Don't exit early if y-axis domains are different even if
2654 x-axis domain remained the same. Without this change, the charts would never redraw.
2655 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Use the moving average instead of the current
2656 time series to compute the y-axis range if showFullYAxis is false. When showFullYAxis is true, expand
2657 y-axis all the way down to 0 or the minimum value in the current time series whichever is smaller.
2659 * public/v2/js/statistics.js:
2660 (Statistics.MovingAverageStrategies): Use a wider window in Simple Moving Average by default.
2662 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
2664 Unreviewed build fix.
2667 (set get App.Pane.Ember.Object.extend):
2669 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
2671 New perf dashboard should have the ability to overlay moving average with an envelope
2672 https://bugs.webkit.org/show_bug.cgi?id=141438
2674 Reviewed by Andreas Kling.
2676 This patch adds three kinds of moving average strategies and two kinds of enveloping strategies:
2678 Simple Moving Average - The moving average x̄_i of x_i is computed as the arithmetic mean of values
2679 from x_(i - n) though x_(i + m) where n is a non-negative integer and m is a positive integer. It takes
2680 n, backward window size, and m, forward window size, as an argument.
2682 Cumulative Moving Average - x̄_i is computed as the arithmetic mean of all values x_0 though x_i.
2683 That is, x̄_1 = x_1 and x̄_i = ((i - 1) * M_(i - 1) + x_i) / i for all i > 1.
2685 Exponential Moving Average - x̄_i is computed as the weighted average of x_i and x̄_(i - 1) with α as
2686 an argument specifying x_i's weight. To be precise, x̄_1 = x_1 and x̄_i = α * x_i + (α - 1) x̄_(i-1).
2689 Average Difference - The enveloping delta d is computed as the arithmetic mean of the difference
2690 between each x_i and x̄_i.
2692 Moving Average Standard Deviation - d is computed like the standard deviation except the deviation
2693 for each term is measured from the moving average instead of the sample arithmetic mean. i.e. it uses
2694 the average of (x_i - x̄_i)^2 as the "sample variance" instead of the conventional (x_i - x̄)^2 where
2695 x̄ is the sample mean of all x_i's. This change was necessary since our time series is non-stationary.
2698 Each strategy is cloned for an App.Pane instance so that its parameterList can be configured per pane.
2699 The configuration of the currently chosen strategies is saved in the query string for convenience.
2701 Also added the "stat pane" to choose a moving average strategy and a enveloping strategy in each pane.
2703 * public/v2/app.css: Specify the fill color for all SVG groups in the pane toolbar icons.
2706 (App.Pane._fetch): Delegate the creation of 'chartData' to _computeChartData.
2707 (App.Pane.updateStatisticsTools): Added. Clones moving average and enveloping strategies for this pane.
2708 (App.Pane._cloneStrategy): Added. Clones a strategy for a new pane.
2709 (App.Pane._configureStrategy): Added. Finds and configures a strategy from the configuration retrieved
2710 from the query string via ChartsController.
2711 (App.Pane._computeChartData): Added. Creates chartData from fetchedData.
2712 (App.Pane._computeMovingAverage): Added. Computes the moving average and the envelope.
2713 (App.Pane._executeStrategy): Added.
2714 (App.Pane._updateStrategyConfigIfNeeded): Pushes the strategy configurations to the query string via
2716 (App.ChartsController._parsePaneList): Merged the query string arguments for the range and point
2717 selections, and added two new arguments for the moving average and the enveloping configurations.
2718 (App.ChartsController._serializePaneList): Ditto.
2719 (App.ChartsController._scheduleQueryStringUpdate): Observes strategy configurations.
2720 (App.PaneController.actions.toggleBugsPane): Hides the stat pane.
2721 (App.PaneController.actions.toggleSearchPane): Hides the stat pane.
2722 (App.PaneController.actions.toggleStatPane): Added.
2724 * public/v2/chart-pane.css: Added CSS rules for the new stat pane. Also added .foreground class for the
2725 current (as opposed to baseline and target) time series for when it's the most foreground graph without
2726 moving average and its envelope overlapping on top of it.
2728 * public/v2/index.html: Added the templates for the stat pane and the corresponding icon (Σ).
2730 * public/v2/interactive-chart.js:
2731 (App.InteractiveChartComponent.chartDataDidChange): Unset _totalWidth and _totalHeight to avoid exiting
2732 early inside _updateDimensionsIfNeeded when chartData changes after the initial layout.
2733 (App.InteractiveChartComponent.didInsertElement): Attach event listeners here instead of inside
2734 _constructGraphIfPossible since that could be called multiple times on the same SVG element.
2735 (App.InteractiveChartComponent._constructGraphIfPossible): Clear down the old SVG element we created
2736 but don't bother removing individual paths and circles. Added the code to show the moving average time
2737 series when there is one. Also add "foreground" class on SVG elements for the current time series when
2738 we're not showing the moving average. chart-pane.css has been updated to "dim down" the current time
2739 series when "foreground" is not set.
2740 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Take the moving average time series into
2741 account when computing the y-axis range.
2742 (App.InteractiveChartComponent._brushChanged): Removed 'selectionIsLocked' argument as it's useless.
2744 * public/v2/js/statistics.js:
2745 (Statistics.MovingAverageStrategies): Added.
2746 (Statistics.EnvelopingStrategies): Added.
2748 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2750 The delta value in the chart pane sometimes doens't show '+' for a positive delta
2751 https://bugs.webkit.org/show_bug.cgi?id=141340
2753 Reviewed by Andreas Kling.
2755 The bug was caused by computeStatus prefixing the value delta with '+' if it's greater than 0 after
2756 it had already been formatted. Fixed the bug by using a formatter that always emits a sign symbol.
2759 (App.Pane.computeStatus):
2760 (App.createChartData):
2762 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2764 Unreviewed build fix. currentPoint wasn't defined when selectedPoints was used to find points.
2767 (App.PaneController._updateDetails):
2769 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2771 Unreviewed. Commit the forgotten change.
2773 * public/include/manifest.php:
2775 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2777 New perf dashboard should have multiple dashboard pages
2778 https://bugs.webkit.org/show_bug.cgi?id=141339
2780 Reviewed by Chris Dumez.
2782 Added the support for multiple dashboard pages. Also added the status of the latest data point.
2783 e.g. "5% better than target"
2785 * public/v2/app.css: Tweaked the styles to work around the fact Ember.js creates empty script elements.
2786 Also hid the border lines around charts on the dashboard page for a cleaner look.
2789 (App.IndexRoute): Added. Navigate to /dashboard/<defaultDashboardName> once the manifest.json is loaded.
2790 (App.IndexRoute.beforeModel): Added.
2791 (App.DashboardRoute): Added.
2792 (App.DashboardRoute.model): Added. Return the dashboard specified by the name.
2793 (App.CustomDashboardRoute): Added. This route is used for a customized dashboard specified by "grid".
2794 (App.CustomDashboardRoute.model): Create a dashboard model from "grid" query parameter.
2795 (App.CustomDashboardRoute.renderTemplate): Use the dashboard template.
2796 (App.DashboardController): Renamed from App.IndexController.
2797 (App.DashboardController.modelChanged): Renamed from gridChanged. Removed the code to deal with "grid"
2798 and "defaultDashboard" as these are taken care of by newly added routers.
2799 (App.DashboardController.computeGrid): Renamed from updateGrid. No longer updates "grid" since this is
2800 now done in actions.toggleEditMode.
2801 (App.DashboardController.actions.toggleEditMode): Navigate to CustomDashboardRoute when start editing
2802 an existing dashboard.
2804 (App.Pane.computeStatus): Moved from App.PaneController so that to be called in App.Pane.latestStatus.
2805 Also moved the code to compute the delta with respect to the previous data point from _updateDetails.
2806 (App.Pane._relativeDifferentToLaterPointInTimeSeries): Ditto.
2807 (App.Pane.latestStatus): Added. Used by the dashboard template to show the status of the latest result.
2809 (App.createChartData): Added deltaFormatter to show less significant digits for differences.
2811 (App.PaneController._updateDetails): Updated per changes to computeStatus.
2813 * public/v2/chart-pane.css: Added style rules for the status labels on the dashboard.
2815 * public/v2/data.js:
2816 (TimeSeries.prototype.lastPoint): Added.
2818 * public/v2/index.html: Prefetch manifest.json as soon as possible, show the latest data points' status
2819 on the dashboard, and enumerate all predefined dashboards.
2821 * public/v2/interactive-chart.js:
2822 (App.InteractiveChartComponent._relayoutDataAndAxes): Slightly adjust the offset at which we show unit
2823 for the dashboard page.
2825 * public/v2/manifest.js:
2826 (App.Dashboard): Inherit from App.NameLabelModel now that each predefined dashboard has a name.
2827 (App.MetricSerializer.normalizePayload): Parse all predefined dashboards instead of a single dashboard.
2828 IDs are generated for each dashboard for forward compatibility.
2830 (App.Manifest.dashboardByName): Added.
2831 (App.Manifest.defaultDashboardName): Added.
2832 (App.Manifest._fetchedManifest): Create dashboard model objects for all predefined ones.
2834 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2836 Move commits viewer to the end of details view
2837 https://bugs.webkit.org/show_bug.cgi?id=141315
2839 Rubber-stamped by Andreas Kling.
2841 Show the difference instead of the old value per kling's request.
2844 (App.PaneController._updateDetails):
2845 * public/v2/index.html:
2847 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2849 Move commits viewer to the end of details view
2850 https://bugs.webkit.org/show_bug.cgi?id=141315
2852 Reviewed by Andreas Kling.
2854 Improved the way list of commits are shown per kling's request.
2857 (App.PaneController._updateDetails): Always show the old value even when a single point is selected.
2859 * public/v2/chart-pane.css: Updated the style for the commits viewer.
2861 * public/v2/commits-viewer.js:
2862 (App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
2863 (App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.
2865 * public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
2866 moved the commits viewers out of the details tables so that they don't interleave revision data.
2868 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2870 New perf dashboard should compare results to baseline and target
2871 https://bugs.webkit.org/show_bug.cgi?id=141286
2873 Reviewed by Chris Dumez.
2875 Compare the selected value against baseline and target values as done in v1. e.g. "5% below target"
2876 Also use d3.format to format the selected value to show four significant figures.
2879 (App.Pane.searchCommit):
2880 (App.Pane._fetch): Create time series here via createChartData so that _computeStatus can use them
2881 to compute the status text without having to recreate them.
2882 (App.createChartData): Added.
2883 (App.PaneController._updateDetails): Use 3d.format on current and old values.
2884 (App.PaneController._computeStatus): Added. Computes the status text.
2885 (App.PaneController._relativeDifferentToLaterPointInTimeSeries): Added.
2886 (App.AnalysisTaskController._fetchedManifest): Use createChartData as done in App.Pane._fetch. Also
2887 format the values using chartData.formatter.
2889 * public/v2/chart-pane.css: Enlarge the status text. Show the status text in red if it's worse than
2890 the baseline and in blue if it's better than the target.
2892 * public/v2/data.js:
2893 (TimeSeries.prototype.findPointAfterTime): Added.
2895 * public/v2/index.html: Added a new tbody for the status text and the selected value. Also fixed
2896 the bug that we were not showing the old value's unit.
2898 * public/v2/interactive-chart.js:
2899 (App.InteractiveChartComponent._constructGraphIfPossible): Use chartData.formatter. Also cleaned up
2900 the code to show the baseline and the target lines.
2902 * public/v2/manifest.js:
2903 (App.Manifest.fetchRunsWithPlatformAndMetric): Added smallerIsBetter.
2905 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2907 Unreviewed build fix.
2910 (App.IndexController.gridChanged): Use store.createRecord to create a custom dashboard as required by Ember.js
2912 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2914 New perf dashboard doesn't preserve the number of days when clicking on a dashboard chart
2915 https://bugs.webkit.org/show_bug.cgi?id=141280
2917 Reviewed by Chris Dumez.
2919 Fixed the bug by passing in "since" as a query parameter to the charts page.
2921 Also fixed the styling issue that manifests when a JSON fetching fails on "Dashboard" page.
2923 * public/v2/app.css: Fixed CSS rules for error messages shown in the place of charts.
2925 (App.IndexController): Changed the default number of days from one month to one week.
2926 (App.IndexController._sharedDomainChanged): Set "since" property on the controller.
2927 * public/v2/index.html: Pass in "since" property on the controller as a query parameter.
2929 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2931 New perf dashboard erroneously clears zoom when poping history items
2932 https://bugs.webkit.org/show_bug.cgi?id=141278
2934 Reviewed by Chris Dumez.
2936 The bug was caused by _sharedZoomChanged updating overviewSelection without updating mainPlotDomain.
2938 Updating overviewSelection resulted in _overviewSelectionChanged, which observes changes to overviewSelection,
2939 to schedule a call to propagateZoom, which in turn overrode "sharedZoom" we just parsed from the query string.
2942 (App.PaneController._overviewSelectionChanged): Don't schedule propagateZoom if the selected domain is already
2943 shown in the main plot.
2944 (App.PaneController._sharedZoomChanged): Set both overviewSelection and mainPlotDomain to avoid overriding
2945 "sharedZoom" via propagateZoom inside _overviewSelectionChanged.
2947 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2949 New perf dashboard shows null as the aggregator name if no aggregation is done
2950 https://bugs.webkit.org/show_bug.cgi?id=141256
2952 Reviewed by Chris Dumez.
2954 Don't show the aggregator name if there isn't one.
2956 * public/v2/manifest.js:
2959 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2961 Unreviewed build fix after r179611.
2963 * public/v2/interactive-chart.js:
2965 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2967 Perf dashboard doesn’t show the right unit for Safari UI tests
2968 https://bugs.webkit.org/show_bug.cgi?id=141238
2970 Reviewed by Darin Adler.
2972 Safari UI tests use custom metrics that end with "Time". This patch teaches the perf dashboard how to
2973 get the unit for a given metric based on the suffix of the metric name instead of hard-coding the mapping
2974 between metrics and their units.
2976 * public/js/helper-classes.js:
2977 (PerfTestRuns): Use the suffix of the metric name to compute the unit.
2978 * public/v2/manifest.js:
2979 (App.Manifest.fetchRunsWithPlatformAndMetric): Ditto. Also set "useSI" property iff for "bytes".
2980 * public/v2/interactive-chart.js:
2981 (App.InteractiveChartComponent._constructGraphIfPossible): Respect useSI. Use toPrecision(3) otherwise.
2982 (App.InteractiveChartComponent._relayoutDataAndAxes): Place the unit vertically on the left of ticks.
2984 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2986 Interactive chart component provides two duplicate API for highlighting points
2987 https://bugs.webkit.org/show_bug.cgi?id=141234
2989 Reviewed by Chris Dumez.
2991 Prior to this patch, the interactive chart component supported highlightedItems for finding commits
2992 on the main charts page and markedPoints to show the two end points in the analysis task page.
2994 This patch merges markedPoints into highlightedItems.
2997 (App.AnalysisTaskController._fetchedRuns): Use highlightedItems.
2998 * public/v2/chart-pane.css:
2999 * public/v2/index.html: Ditto.
3000 * public/v2/interactive-chart.js:
3001 (App.InteractiveChartComponent._constructGraphIfPossible): Make this._highlights an array instead of
3002 array of arrays. Also call _highlightedItemsChanged at the end to fix the bug that we never highlight
3003 items if highlightedItems was set before the initial layout.
3004 (App.InteractiveChartComponent._relayoutDataAndAxes):
3005 (App.InteractiveChartComponent._updateHighlightPositions): Now that highlights are circles instead of
3006 vertical lines, just set cx and cy as done for other "dots".
3007 (App.InteractiveChartComponent._highlightedItemsChanged): Exit early only if _clippedContainer wasn't
3008 already set; i.e. _constructGraphIfPossible hasn't been called. Also updated the logic to accommodate
3009 the fact this._highlights is an array of elements instead of an array of arrays of elements. Finally,
3010 set the radius of highlight circles here.
3012 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
3014 Don’t use repository names as id’s.
3015 https://bugs.webkit.org/show_bug.cgi?id=141226
3017 Reviewed by Chris Dumez.
3019 Not using repository names as their id's reduces the need to fetch the entire repositories table.
3020 Since names of repositories are available in manifest.json, we can resolve their names in the front end.
3022 * Websites/perf.webkit.org/public/api/runs.php:
3023 (parse_revisions_array): No longer uses $repository_id_to_name.
3024 (main): No longer populates $repository_id_to_name.
3026 * Websites/perf.webkit.org/public/api/triggerables.php:
3027 (main): Don't resolve repository names.
3029 * Websites/perf.webkit.org/public/include/manifest.php:
3030 (ManifestGenerator::repositories): Use repositories ids as keys in the result and include their names.
3031 (ManifestGenerator::bug_trackers): Don't resolve repository names.
3033 * Websites/perf.webkit.org/public/js/helper-classes.js:
3034 (TestBuild): Renamed repositoryName to repositoryId.
3035 (TestBuild.revision): Ditto.
3036 (TestBuild.formattedRevisions): Ditto. Continue to use the repository name in the formatted result
3037 since this is the text shown to human.
3039 * Websites/perf.webkit.org/public/v2/app.js:
3040 (App.pane.searchCommit): Renamed repositoryName to repositoryId.
3041 (App.PaneController._updateDetails): Ditto.
3042 (App.AnalysisTaskController.updateRoots): Ditto.
3044 * Websites/perf.webkit.org/public/v2/data.js:
3045 (Measurement): Ditto.
3046 (Measurement.prototype.commitTimeForRepository): Ditto.
3047 (Measurement.prototype.formattedRevisions): Ditto.
3049 * Websites/perf.webkit.org/public/v2/index.html: Use the repository name and the repository id as
3050 select element's label and value respectively.
3052 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
3054 Unreviewed build fix. Declare $repository_id_to_name in the global scope.
3056 * public/api/runs.php:
3058 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
3060 /api/runs.php should have main function
3061 https://bugs.webkit.org/show_bug.cgi?id=141220
3063 Reviewed by Benjamin Poulain.
3065 Wrapped the code inside main function for clarity.
3067 * public/api/runs.php:
3069 2015-01-27 Ryosuke Niwa <rniwa@webkit.org>
3071 Unreviewed build fix. "eta" isn't set on a in-progress build on a newly added builder.
3073 * tools/sync-with-buildbot.py:
3074 (find_request_updates):
3076 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
3078 Perf dashboard always assigns the result of A/B testing with build request 1
3079 https://bugs.webkit.org/show_bug.cgi?id=140382
3081 Reviewed by Darin Adler.
3083 The bug was caused by the expression array_get($report, 'jobId') or array_get($report, 'buildRequest')
3084 which always evaluated to 1 when the report contained jobId. Fixed the bug by cascading array_get instead.
3086 Also fixed a typo as well as a bug that reports were never associated with builds.
3088 * public/include/report-processor.php:
3089 (ReportProcessor::process): Don't use "or" to find the non-null value since that always evaluates to 1
3090 instead of the first non-null value.
3091 (ReportProcessor::resolve_build_id): Fixed the typo by adding the missing "$this->".
3092 (ReportProcessor::commit): Associate the report with the corresponding build as intended.
3094 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
3096 Unreviewed typo fix. The prefix in triggerable_configurations is "trigconfig", not "trigrepo".
3098 * public/admin/tests.php:
3100 2015-01-10 Ryosuke Niwa <rniwa@webkit.org>
3102 Unreviewed build fix. Removed the stale code.
3104 * public/admin/triggerables.php:
3106 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
3108 Perf dashboard should have the ability to post A/B testing builds
3109 https://bugs.webkit.org/show_bug.cgi?id=140317
3111 Rubber-stamped by Simon Fraser.
3113 This patch adds the support for triggering A/B testing from the perf dashboard.
3115 We add a few new tables to the database. "build_triggerables", which represents a set of builders
3116 that accept A/B testing. "triggerable_repositories" associates each "triggerable" with a fixed set
3117 of repositories for which an arbitrary revision can be specified for A/B testing.
3118 "triggerable_configurations" specifies a triggerable available on a given test on a given platform.
3119 "roots" table which specifies the revision used in a given root set in each repository.
3121 * init-database.sql: Added "build_triggerables", "triggerable_repositories",
3122 "triggerable_configurations", and "roots" tables. Added references to "build_triggerables",
3123 "platforms", and "tests" tables as well as columns to store status, status url, and creation time
3124 to build_requests table. Also made each test group's name unique in a given analysis task as it
3125 would be confusing to have multiple test groups of the same name.
3127 * public/admin/tests.php: Added the UI and the code to associate a test with a triggerable.
3129 * public/admin/triggerables.php: Added. Manages the list of triggerables as well as repositories
3130 for which a specific revision can be set in an A/B testing on a given triggerable.
3132 * public/api/build-requests.php: Added. Returns the list of open build requests on a specified
3133 triggerable. Also updates the status' and the status urls of specified build requests when
3134 buildRequestUpdates is provided in the raw POST data.
3137 * public/api/runs.php:
3138 (fetch_runs_for_config): Don't include results associated with a build request, meaning they are
3139 results of an A/B testing.
3141 * public/api/test-groups.php:
3142 (main): Use the newly added BuildRequestsFetcher. Also merged fetch_test_groups_for_task back.
3144 * public/api/triggerables.php: Added.
3145 (main): Returns a list of triggerables or a triggerable associated with a given analysis task.
3147 * public/include/admin-header.php:
3149 * public/include/build-requests-fetcher.php: Added. Extracted from public/api/test-groups.php.
3150 (BuildRequestsFetcher): This class abstracts the process of fetching a list of builds requests
3151 and root sets used in those requests.D
3152 (BuildRequestsFetcher::__construct):
3153 (BuildRequestsFetcher::fetch_for_task):
3154 (BuildRequestsFetcher::fetch_for_group):
3155 (BuildRequestsFetcher::fetch_incomplete_requests_for_triggerable):
3156 (BuildRequestsFetcher::has_results):
3157 (BuildRequestsFetcher::results):
3158 (BuildRequestsFetcher::results_with_resolved_ids):
3159 (BuildRequestsFetcher::results_internal):
3160 (BuildRequestsFetcher::root_sets):
3161 (BuildRequestsFetcher::fetch_roots_for_set):
3163 * public/include/db.php:
3164 (Database::prefixed_column_names): Don't return "$prefix_" when there are no columns.
3165 (Database::insert_row): Support taking an empty array for values. This is useful in "root_sets"
3166 table since it only has the primary key, id, column.
3167 (Database::select_or_insert_row):
3168 (Database::update_or_insert_row):
3169 (Database::update_row): Added.
3170 (Database::_select_update_or_insert_row): Takes an extra argument specifying whether a new row
3171 should be inserted when no row matches the specified criteria. This is used while updating
3172 build_requests' status and url in public/api/build-requests.php since we shouldn't be inserting
3173 new build requests in that API.
3174 (Database::select_rows): Also use "1 == 1" in the select query when the query criteria is empty.
3175 This is used in public/api/triggerables.php when no analysis task is specified.
3177 * public/include/json-header.php:
3178 (find_triggerable_for_task): Added. Finds a triggerable available on a given test. We return the
3179 triggerable associated with the closest ancestor of the test. Since issuing a new query for each
3180 ancestor test is expensive, we retrieve triggerable for all ancestor tests at once and manually
3181 find the closest ancestor with a triggerable.
3183 * public/include/report-processor.php:
3184 (ReportProcessor::process):
3185 (ReportProcessor::resolve_build_id): Associate a build request with the newly created build
3186 if jobId or buildRequest is specified.
3188 * public/include/test-name-resolver.php:
3189 (TestNameResolver::map_metrics_to_tests): Store the entire metric row instead of its name so that
3190 test_exists_on_platform can use it. The last diff in public/admin/tests.php adopts this change.
3191 (TestNameResolver::test_exists_on_platform): Added. Returns true iff the test has ever run on
3194 * public/include/test-path-resolver.php: Added.
3195 (TestPathResolver): This class abstracts the ancestor chains of a test. It retrieves the entire
3196 "tests" table to do this since there could be arbitrary number of ancestors for a given test.
3197 This class is a lot more lightweight than TestNameResolver, which retrieves a whole bunch of tables
3198 in order to compute full test metric names.
3199 (TestPathResolver::__construct):
3200 (TestPathResolver::ancestors_for_test): Returns the ordered list of ancestors from the closest to
3201 the highest (a test without a parent).
3202 (TestPathResolver::path_for_test): Returns a test "path", the ordered list of test names from
3203 the highest ancestor to the test itself.
3204 (TestPathResolver::ensure_id_to_test_map): Fetches "tests" table to construct id_to_test_map.
3206 * public/privileged-api/create-test-group.php: Added. An API to create A/B testing groups.
3208 (commit_sets_from_root_sets): Given a dictionary of repository names to a pair of revisions
3209 for sets A and B respectively, returns a pair of arrays, each of which contains the corresponding
3210 set of "commits" for sets A and B respectively. e.g. {"WebKit": [1, 2], "Safari": [3, 4]} will
3211 result in [[WebKit commit at r1, Safari commit at r3], [WebKit commit at r2, Safari commit at r4]].
3213 * public/v2/analysis.js:
3214 (App.AnalysisTask.testGroups): Takes arguments so that set('testGroups') will invalidate the cache.
3215 (App.AnalysisTask.triggerable): Added. Retrieves the triggerable associated with the task lazily.
3216 (App.TestGroup.rootSets): Added. Returns the list of root set ids used in this A/B testing group.
3217 (App.TestGroup.create): Added. Creates a new A/B testing group.
3218 (App.Triggerable): Added.
3219 (App.TriggerableAdapter): Added.
3220 (App.TriggerableAdapter.buildURL): Added.
3221 (App.BuildRequest.testGroup): Renamed from group.
3222 (App.BuildRequest.orderLabel): Added. One-based index to be used in labels.
3223 (App.BuildRequest.config): Added. Returns either 'A' or 'B' depending on the configuration used
3224 in this build request.