1 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
3 v3 UI should use four sig-figs to label y-axis of the main charts
4 https://bugs.webkit.org/show_bug.cgi?id=152779
6 Reviewed by Antti Koivisto.
8 Increase the number of significant figures used in the main charts to four as done in v2 UI.
10 * public/v3/pages/chart-pane.js:
11 (ChartPane.constructor): Create a formatter with four significant figures.
12 * public/v3/pages/page-with-charts.js:
13 (PageWithCharts.mainChartOptions): Increase the width of y-axis labels.
15 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
17 v3 UI's time range slider is harder to use than that of v2 UI
18 https://bugs.webkit.org/show_bug.cgi?id=152780
20 Reviewed by Antti Koivisto.
22 Improved the time range slider by using a cubic mapping to time range and providing a text field
23 to directly edit the number of days to show.
25 Now an user can enter the text mode to directly edit the number of days to show by clicking on
26 the number of days (text field is always there with opacity=0).
28 * public/v3/pages/charts-toolbar.js:
29 (ChartsToolbar): Store the minimum and maximum number of days allowed. Also rename _inputElement
30 to _slider and added a new type=number text field as _editor.
31 (ChartsToolbar.prototype.render):
32 (ChartsToolbar.prototype.setStartTime): Exit the text mode when the number of days is changed by
33 an URL state transition (i.e. back/forward navigation).
34 (ChartsToolbar.prototype._setInputElementValue): Added. Updates the values of _slider and _editor.
35 (ChartsToolbar.prototype._enterTextMode): Added. Hide the elements used by the slider mode and
37 (ChartsToolbar.prototype._exitTextMode): Added. Does the opposite.
38 (ChartsToolbar.prototype._sliderValueMayHaveChanged): Renamed from _inputValueMayHaveChanged.
39 (ChartsToolbar.prototype._editorValueMayHaveChanged): Added. Similar to _sliderValueMayHaveChanged
40 but also corrects the value of _editor if needed.
41 (ChartsToolbar.prototype._callNumberOfDaysCallback): Extracted from _inputValueMayHaveChanged.
42 Also fixed a bug that we didn't update the URL state when the change event was fired without
43 modifying the effective number of days.
44 (ChartsToolbar.cssTemplate): Tweaked the style to support the new mode. Also set a fixed width on
45 the span showing the number of days in the slider mode.
47 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
49 Zooming button is broken on v3 UI
50 https://bugs.webkit.org/show_bug.cgi?id=152777
52 Reviewed by Chris Dumez.
54 Bring up the zoom button in z-index so that users can click it.
56 * public/v3/components/interactive-time-series-chart.js:
57 (InteractiveTimeSeriesChart.cssTemplate):
59 2016-01-06 Ryosuke Niwa <rniwa@webkit.org>
61 v3 UI doesn't preserve the time range when charts page is opened from a dashboard
62 https://bugs.webkit.org/show_bug.cgi?id=152776
64 Reviewed by Chris Dumez.
66 Fixed the bug by moving the construction of charts URL from DashboardPage.prototype.open to
67 DashboardPage.prototype.render and re-rendering the entire page upon an URL state transition.
69 * public/v3/pages/charts-page.js:
70 (ChartsPage.createStateForDashboardItem): Takes the start time for the charts page.
72 * public/v3/pages/dashboard-page.js:
73 (DashboardPage.prototype.updateFromSerializedState): Merged _numberOfDaysDidChange and
74 _updateChartsDomainFromToolbar into this function since they're not used elsewhere. Also re-render
75 the entire page when transition between different number of days to show.
76 (DashboardPage.prototype._numberOfDaysDidChange): Deleted.
77 (DashboardPage.prototype._updateChartsDomainFromToolbar): Deleted.
78 (DashboardPage.prototype.render): Construct URL for each charts here.
79 (DashboardPage.prototype._createChartForCell): Don't construct URL here since this function is
80 called once when the dashboard page is opened, and not when the time range is changed.
82 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
84 Build fix for an old version of PHP after r194618.
86 * public/api/measurement-set.php:
88 2016-01-05 Ryosuke Niwa <rniwa@webkit.org>
90 A/B testing results should be visualized intuitively on v3 UI
91 https://bugs.webkit.org/show_bug.cgi?id=152496
93 Rubber-stamped by Chris Dumez.
95 Add the "stacking block" view of A/B testing results to the analysis task page on v3 UI.
97 The patch enhances JSON APIs at /api/analysis-task /api/measurement-set/ to reduce the number of
98 HTTP requests, and adds two UI components: TestGroupResultsTable and AnalysisResultsViewer both
99 of which inherits from an abstract superclass: ResultsTable.
101 ResultsTable provides a tabular presentation of measured values in regular measurement sets and
102 A/B testing results using groups of bar graphs created by BarGraphGroup. TestGroupResultsTable
103 inherits from this class to display A/B testing configurations and the averaged results for each
104 configuration, and AnalysisResultsViewer inherits from it to provide an intuitive visualization
105 of the outcomes of all A/B testing results associated with a given analysis task.
107 * public/api/analysis-tasks.php:
108 (main): Add the capability to find the analysis task based on its build request.
109 This allows /v3/#/analysis/task/?buildRequest=<id> to be hyperlinked on buildbot page.
111 * public/api/measurement-set.php:
112 (main): Removed the unused startTime and endTime, and added "analysisTask" to query parameters.
113 (AnalysisResultsFetcher): Added. Used to fetch measured data associated with every build request
115 (AnalysisResultsFetcher::__construct):
116 (AnalysisResultsFetcher::fetch): Unlike MeasurementSetFetcher, we fetch the list of commits and
117 list of measurements separately since there will be a lot less builds and commits than measured
118 data (since we're fetching measured values for all tests and their metrics).
119 (AnalysisResultsFetcher::fetch_commits): Fetches commits.
120 (AnalysisResultsFetcher::format_measurement): Like MeasurementSetFetcher::format_measurement but
121 with config_type and config_metric since we're returning measured data for all metrics and test
123 (AnalysisResultsFetcher::format_map): Similar to MeasurementSetFetcher::format_map.
125 * public/v3/components/analysis-results-viewer.js: Added.
126 (AnalysisResultsViewer): Added.
127 (AnalysisResultsViewer.prototype.didUpdateResults): This callback is called by AnalysisTaskPage
128 when A/B testing results become available.
129 (AnalysisResultsViewer.prototype.render): Overrides ResultsTable's render to highlight the block
130 representing the currently selected test group.
132 (AnalysisResultsViewer.prototype.buildRowGroups): Creates a list of rows with "stacking blocks"
133 that visualizes A/B testing results. The algorithm works as follows: 1. Create all table rows.
134 2. Find which row is associated with each set in each test group. 3. Layout "blocks".
136 (AnalysisResultsViewer.prototype._collectRootSetsInTestGroups): Collects root sets from all data
137 in the measurement set as well as A/B testing **requests** (results may contain more repositories
138 than requested but they aren't interesting for the purpose of visualizing results for the entire
141 (AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Create table rows. First,
142 create table rows for measurement set points that have a matching test group (i.e. either set A
143 or set B of an A/B testing uses the same root set as a point). Second, insert a new row for each
144 root set in each test group which didn't find a matching measurement set point. There is a little
145 subtlety that some A/B testing may specify revisions for a subset of repositories and/or some A/B
146 testing results may appear as if it goes back in time with respect to other A/B testing results.
147 For example, consider creating two A/B test groups for WebKit changes and OS changes separately.
148 There could be no coherent linearization of those two A/B testing in which both WebKit and OS
149 versions move forward.
151 (AnalysisResultsViewer.RootSetInTestGroup): Added. Represents a pair (test group, root set) since
152 a root set could be shared by multiple test groups.
153 (AnalysisResultsViewer.TestGroupStackingBlock): Added. A stacked block representing a test group.
154 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex): Associates a row number with
155 either set A or set B.
156 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Creates a table cell
158 (AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Returns true if this test group
159 has failed and this block should look "thin" without any label.
160 (AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus): Computes the
161 status for this test group.
163 (AnalysisResultsViewer.TestGroupStackingGrid): Added. AnalysisResultsViewer uses this class to
164 layout blocks representing test groups.
165 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.insertBlockToColumn): Inserts a new block
166 to layout. We keep all test groups doing the same A/B test next to each other.
167 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.layout): Layouts each block / test group
168 in the order they are created.
169 (AnalysisResultsViewer.TestGroupStackingGrid.prototype._layoutBlock): Places the block in the
170 left-most column that can accommodate it while avoiding columns of a different thin-ness. A column
171 is thin if its A/B testing has failed, and not thin otherwise.
172 (AnalysisResultsViewer.TestGroupStackingGrid.prototype.createCellsForRow): Creates table cells for
173 a given row. For each column, generate a table cell if we're in the first row and the first block
174 starts in a later row, a block starts in the current row, or the last block ended in the previous
175 row and the next block or the last row appears later.
177 * public/v3/components/bar-graph-group.js: Added. A component for showing a group of bar graphs.
178 (BarGraphGroup): Added. Creates a group of bar graphs with the same value range. It's used by
179 AnalysisResultsViewer and ResultsTable to show bar graphs to compare values.
180 (SingleBarGraph): A component created and collectively controlled by BarGraphGroup.
182 * public/v3/components/results-table.js: Added.
183 (ResultsTable): An abstract superclass for TestGroupResultsTable and AnalysisResultsViewer.
185 (ResultsTable.prototype.render): Renders the table. 1. Call "buildRowGroups()" implemented by
186 a subclass to obtain the list of rows. 2. Compute the list of repositories to show. 3. For each
187 cell in the table, compute the number of rows to show the same value (for rowspan). 4. Render the
188 table with an extra list of repositories if exists.
190 (ResultsTable.prototype._computeRepositoryList): Compute the list of repositories to list
191 revisions in the table. Omit repositories not present in any row or for which all rows have the
192 same revision. In the latter case, include it in the extra repositories listed below the table.
193 This minimizes the amount of redundant information presented to the user.
195 (ResultsTableRow): Added. Represents a single row in the table. ResultsTable constructs necessary
196 table cells to tabulate the associated root sets, and shows the associated result using a grouped
197 bar graph. Additional columns are used by AnalysisResultsViewer to show stacked blocks for A/B
200 * public/v3/components/test-group-results-table.js: Added.
201 (TestGroupResultsTable):
202 (TestGroupResultsTable.prototype.didUpdateResults):
203 (TestGroupResultsTable.prototype.setTestGroup):
204 (TestGroupResultsTable.prototype.heading):
205 (TestGroupResultsTable.prototype.render):
206 (TestGroupResultsTable.prototype.buildRowGroups):
208 * public/v3/index.html:
209 * public/v3/models/analysis-results.js: Added.
210 (AnalysisResults): Added. Like MeasurementSet, this class represents a set of measured values
211 associated with a given analysis task.
212 (AnalysisResults.prototype.find): Returns a measured valued for a given build and metric.
213 (AnalysisResults.prototype.add): Adds a new measured value. Used by AnalysisResults.fetch.
214 (AnalysisResults.fetch): Fetches data and creates AnalysisResults for a given analysis task.
216 * public/v3/models/analysis-task.js:
217 (AnalysisTask.prototype.startMeasurementId): Added.
218 (AnalysisTask.prototype.endMeasurementId): Added.
219 (AnalysisTask.fetchByBuildRequestId): Added.
220 (AnalysisTask._fetchSubset): Uses DataModelObject.cachedFetch.
222 * public/v3/models/build-request.js: Added.
223 (BuildRequest): Added. Represents a single A/B testing request associated with a test group.
225 * public/v3/models/builder.js:
226 (Build): Added. Represents a build associated with a given A/B testing result.
228 * public/v3/models/commit-log.js:
229 (CommitLog): Made this class inherit from DataModelObject.
230 (CommitLog.ensureSingleton): Added. Finds the singleton object created for a given revision
231 in the specified repository. This helps RootSet and other classes compare commits fast.
232 (CommitLog.prototype.repository): Added.
233 (CommitLog.fetchBetweenRevisions): Uses CommitLog.ensureSingleton.
235 * public/v3/models/data-model.js:
237 (DataModelObject.namedStaticMap): Added.
238 (DataModelObject.ensureNamedStaticMap): Renamed from namedStaticMap instead of implicitly
239 assuming that the non-static version always creates the map.
240 (DataModelObject.prototype.namedStaticMap): Added.
241 (DataModelObject.cachedFetch): Extracted from AnalysisTask._fetchSubset so that TestGroup's
242 fetchByTask could also use it.
245 * public/v3/models/measurement-adaptor.js: Added.
246 (MeasurementAdaptor): Extracted from MeasurementCluster. This class is responsible for
247 re-formatting the data received via /api/measurement-set JSON API inside the v3 UI.
248 (MeasurementAdaptor.prototype.extractId): Added.
249 (MeasurementAdaptor.prototype.adoptToAnalysisResults): Added. Used by AnalysisResults.
250 (MeasurementAdaptor.aggregateAnalysisResults): Added. Used by TestGroupResultsTable to
251 aggregate results for each test configuration; e.g. computing the average for set A.
252 (MeasurementAdaptor.prototype.adoptToSeries): Extracted from MeasurementCluster.addToSeries.
253 Added rootSet() to each point. This allows AnalysisResultsViewer to compare them against root
254 sets associated with A/B testing results.
255 (MeasurementAdaptor.computeConfidenceInterval): Moved from MeasurementCluster.
257 * public/v3/models/measurement-cluster.js:
258 (MeasurementCluster):
259 (MeasurementCluster.prototype.addToSeries):
261 * public/v3/models/repository.js:
262 (Repository.prototype.hasUrlForRevision): Added.
264 * public/v3/models/root-set.js: Added.
265 (RootSet): Added. Represents a set of commits in measured results.
266 (MeasurementRootSet): Added. Ditto for results associated with A/B testing.
268 * public/v3/models/test-group.js: Added.
269 (TestGroup): Added. Represents a A/B testing on analysis task.
270 (TestGroup.prototype.createdAt): Added.
271 (TestGroup.prototype.buildRequests): Returns the list of build requests associated with this
273 (TestGroup.prototype.addBuildRequest): Added. Used by BuildRequest's constructor to associate
274 itself with this group.
275 (TestGroup.prototype.didSetResult): Added. Called by BuildRequest.setResult when measured
276 values are fetched and associated with a build request in this group.
278 * public/v3/models/test.js:
281 * public/v3/pages/analysis-task-page.js:
283 (AnalysisTaskPage.prototype.updateFromSerializedState): Fetch the analysis task, test groups
284 associated with it, and all A/B testing results based on the task id or the build request id
285 specified in the URL.
286 (AnalysisTaskPage.prototype._didFetchTask): Added. Start fetching the measured data. This is
287 the data on charts page for which this analysis task was created, not results of A/B testing.
288 (AnalysisTaskPage.prototype._didFetchMeasurement): Added. Display the fetched data in a table
289 inside AnalysisResultsViewer.
290 (AnalysisTaskPage.prototype._didFetchTestGroups): Added. Display the list of A/B test groups
291 as well as the results of the first A/B testing.
292 (AnalysisTaskPage.prototype._didFetchAnalysisResults): Added.
293 (AnalysisTaskPage.prototype._assignTestResultsIfPossible): Added. Once both the analysis task,
294 A/B test groups as well as their results are fetched, update build requests in each test group
296 (AnalysisTaskPage.prototype.render): Show the list of test groups and highlight the currently
298 (AnalysisTaskPage.prototype._showTestGroup): Added. A callback used by AnalysisResultsViewer
299 and TestGroupResultsTable to notify this class when the user selects a new test group.
300 (AnalysisTaskPage.htmlTemplate): Updated the template.
301 (AnalysisTaskPage.cssTemplate): Ditto.
303 * public/v3/pages/charts-page.js:
304 (ChartsPage.createStateForAnalysisTask): Added. Creates a URL state object for opening a chart
305 associated with an analysis task.
307 2015-12-22 Ryosuke Niwa <rniwa@webkit.org>
309 Analysis task page is slow to load
310 https://bugs.webkit.org/show_bug.cgi?id=152517
312 Reviewed by Andreas Kling.
314 The slowness comes from r194130 which made the JSON API at /api/analysis-tasks to report the start
315 and the end of each analysis task. This query was adding ~2s to the total JSON generation time.
317 Cache these values on analysis_task table since they never change once an analysis task is created.
319 * init-database.sql: Added columns task_start_run_time and task_end_run_time to analysis_task table.
320 Also added the missing drop statements at the top.
322 * public/api/analysis-tasks.php:
323 (fetch_and_push_bugs_to_tasks): Don't fetch the latest commit time of the start and the end.
324 (format_task): Report task_start_run_time and task_end_run_time as startRunTime and endRunTime.
326 * public/privileged-api/create-analysis-task.php:
327 (main): Set start_run_time and end_run_time when creating an analysis task.
328 (time_for_run): Added.
330 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
332 v3 UI shouldn't open/close pane selector by mouseenter/leave
333 https://bugs.webkit.org/show_bug.cgi?id=152399
335 Reviewed by Andreas Kling.
337 Removed the code to open and close the pane selector by mouseenter and mouseleave
338 since multiple people have complained about the behavior.
340 * public/v3/pages/charts-toolbar.js:
341 (ChartsToolbar): Removed the event listeners.
342 (ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
343 to better support the use case of adding multiple panes.
344 (ChartsToolbar.cssTemplate): Tweaked CSS.
346 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
348 Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
349 https://bugs.webkit.org/show_bug.cgi?id=152389
351 Reviewed by Darin Adler.
353 Compute the x coordinate of the popover from the center of each annotation bar.
355 Also adjust the x coordinate to keep the popover within the charts.
357 * public/v3/components/interactive-time-series-chart.js:
358 (InteractiveTimeSeriesChart.prototype._renderChartContent):
360 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
362 Dashboard charts should have uniform widths on v3 UI
363 https://bugs.webkit.org/show_bug.cgi?id=152395
365 Reviewed by Chris Dumez.
367 Fix the bug by applying table-layout: fixed on the dashboard table.
369 * public/v3/pages/dashboard-page.js:
370 (DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
371 (DashboardPage.cssTemplate): Adjusted CSS accordingly.
373 2015-12-17 Ryosuke Niwa <rniwa@webkit.org>
375 Closing a pane on v3 UI always closes the last pane
376 https://bugs.webkit.org/show_bug.cgi?id=152388
378 Reviewed by Chris Dumez.
380 The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
381 Fixed it by passing in "this" pane object to the first argument.
383 * public/v3/pages/chart-pane.js:
386 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
388 Perf Dashboard v3 UI doesn't show recent data points on v2 UI
389 https://bugs.webkit.org/show_bug.cgi?id=152368
391 Reviewed by Chris Dumez.
393 The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
394 which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
395 to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
397 !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
399 Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
401 * public/api/measurement-set.php:
402 (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
403 * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
404 of the last modified date depends on when tests run, we can't assert it to be a certain value.
406 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
408 v3 UI should show and link the build number on charts page
409 https://bugs.webkit.org/show_bug.cgi?id=152359
411 Reviewed by Chris Dumez.
413 Show the hyperlinked build number in the v3 UI.
415 * public/v3/models/builder.js:
416 (Builder): Renamed _buildURL to _buildUrlTemplate.
417 (Builder.prototype.urlForBuild): Added.
418 * public/v3/pages/chart-pane-status-view.js:
419 (ChartPaneStatusView):
420 (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
421 (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
422 if the current point is set by an indicator (not by a selection).
424 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
426 v3 dashboard doesn't stretch charts to fill the screen
427 https://bugs.webkit.org/show_bug.cgi?id=152354
429 Reviewed by Chris Dumez.
431 The bug was caused by a workaround to avoid canvas stretching table cell too much.
433 Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
434 so that it does not contribute to the intrinsic/natural width of the cell.
436 * public/v3/components/time-series-chart.js:
437 (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
438 (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
439 the canvas does not resize with it.
440 * public/v3/pages/dashboard-page.js:
441 (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
443 2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
445 The chart status on v3 UI sometimes show wrong revision ranges
446 https://bugs.webkit.org/show_bug.cgi?id=152331
448 Reviewed by Chris Dumez.
450 The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
451 when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
452 finds the sampled data point immediately preceding the current point (at which the indicator is shown).
454 * public/v3/components/chart-status-view.js:
455 (ChartStatusView.prototype.updateStatusIfNeeded):
457 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
459 Perf dashboard's cycler page should use v3 UI
460 https://bugs.webkit.org/show_bug.cgi?id=152324
462 Reviewed by Chris Dumez.
464 Use the v3 UI in cycler.html after r194130.
466 * public/cycler.html:
467 * public/v3/index.html: Removed the reference to a non-existent platform-selector.js.
469 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
471 Add v3 UI to perf dashboard
472 https://bugs.webkit.org/show_bug.cgi?id=152311
474 Reviewed by Chris Dumez.
476 Add the third iteration of the perf dashboard UI. UI for viewing and modifying analysis tasks is coming soon.
477 The v3 UI is focused on speed, and removes all third-party script dependencies including jQuery, d3, and Ember.
478 Both the DOM-based UI and graphing are implemented manually.
481 The entire app is structured using new component library implemented in components/base.js. Each component is
482 an instance of a subclass of ComponentBase which owns a single DOM element. Each subclass may supply static
483 methods named htmlTemplate and cssTemplate as the template for a component instance. ComponentBase automatically
484 clones the templates inside the associated element (or its shadow root on the supported browsers). Each subclass
485 must supply a method called "render()" which constructs and updates the DOM as needed.
487 There is a special component called Page, which represents an entire page. Each Page is opened by PageRouter's
488 "route()" function. Each subclass of Page supplies "open()" for initialization and "updateFromSerializedState()"
489 for a hash URL transition.
492 The key feature of the v3 UI is the split of time series into chunks called clusters (see r194120). On an internal
493 instance of the dashboard, the v2 UI downloads 27MB of data whereas the same page loads only 3MB of data in the v3.
494 The key logic for fetching time series in chunks is implemented by MeasurementSet in /v3/models/measurement-set.js.
495 We first fetch the cached primary cluster (the cluster that contains the newest data) at:
496 /data/measurement-set-<platform-id>-<metric-id>.json
498 If that's outdated according to lastModified in manifest.json, then we immediately re-fetch the primary cluster at:
499 /api/measurement-set/?platform=<platform-id>&metric=<metric-id>
501 Once the up-to-date primary cluster is fetched, we fetch all "secondary" clusters. For each cluster being fetched,
502 including the primary, we invoke registered callbacks.
505 In addition, the v3 UI reduces the initial page load time by loading a single bundled JS file generated by
506 tools/bundle-v3-scripts.py. index.html has a fallback to load all 44 JS files individually during development.
508 * public/api/analysis-tasks.php:
509 (fetch_and_push_bugs_to_tasks): Added the code to fetch start and end run times. This is necessary in V3 UI
510 because no longer fetch the entire time series. See r194120 for the new measurement set JSON API.
511 (format_task): Compute the category of an analysis task based on "result" value. This will be re-vamped once
512 I add the UI for the analysis task page in v3.
514 * public/include/json-header.php:
515 (require_format): CamelCase the name.
516 (require_match_one_of_values): Ditto.
517 (validate_arguments): Renamed from require_existence_of and used in measurement-set.php landed in r194120.
520 * public/v3/components: Added.
522 * public/v3/components/base.js: Added.
523 (ComponentBase): The base component class.
524 (ComponentBase.prototype.element): Returns the DOM element associated with the DOM element.
525 (ComponentBase.prototype.content): Returns the shadow root if one exists and the associated element otherwise.
526 (ComponentBase.prototype.render): To be implemented by a subclass.
527 (ComponentBase.prototype.renderReplace): A helper function to "render" DOM contents.
528 (ComponentBase.prototype._constructShadowTree): Called inside the constructor to instantiate the templates.
529 (ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Instantiates components referred by
530 its element name inside the instantiated content.
531 (ComponentBase.isElementInViewport): A helper function. Returns true if the element is in the viewport and it has
532 non-zero width and height.
533 (ComponentBase.defineElement): Defines a custom element that can be automatically instantiated from htmlTemplate.
534 (ComponentBase.createElement): A helper function to create DOM tree to be used in "render()" method.
535 (ComponentBase._addContentToElement): A helper for "createElement".
536 (ComponentBase.createLink): A helper function to create a hyperlink or another clickable element (via callback).
537 (ComponentBase.createActionHandler): A helper function to create an event listener that prevents the default action
538 and stops the event propagation.
540 * public/v3/components/button-base.js: Added.
542 * public/v3/components/chart-status-view.js: Added.
543 (ChartStatusView): A component that reports the current status of time-series-chart. It's subclasses by
544 ChartPaneStatusView to provide additional information in the charts page's panes.
546 * public/v3/components/close-button.js: Added.
548 * public/v3/components/commit-log-viewer.js: Added.
549 (CommitLogViewer): A component that lists commit revisions along with commit messages for a range of data points.
551 * public/v3/components/interactive-time-series-chart.js: Added.
552 (InteractiveTimeSeriesChart): A subclass of InteractiveTimeSeriesChart with interactivity (selection & indicator).
553 Selection and indicator are mutually exclusive.
555 * public/v3/components/pane-selector.js: Added.
556 (PaneSelector): A component for selecting (platform, metric) pair to add in the charts page.
558 * public/v3/components/spinner-icon.js: Added.
560 * public/v3/components/time-series-chart.js: Added.
561 (TimeSeriesChart): A canvas-based chart component without interactivity. It takes a source list and options as
562 the constructor arguments. A source list is a list of measurement sets (measurement-set.js) with drawing options.
563 This component fetches data via MeasurementSet.fetchBetween inside TimeSeriesChart.prototype.setDomain and
564 progressively updates the charts as more data arrives. The canvas is updated on animation frame via rAF and all
565 layout and rendering metrics are lazily computed in _layout. In addition, this component samples data before
566 rendering the chart when there are more data points per pixel in _ensureSampledTimeSeries.
568 * public/v3/index.html: Added. Loads bundled-scripts.js if it exists, or individual script files otherwise.
570 * public/v3/instrumentation.js: Added. This class is used to gather runtime statistics of v3 UI. (It measures
571 the performance of the perf dashboard UI).
573 * public/v3/main.js: Added. Bootstraps the app.
577 * public/v3/models: Added.
578 * public/v3/models/analysis-task.js: Added.
579 * public/v3/models/bug-tracker.js: Added.
580 * public/v3/models/bug.js: Added.
581 * public/v3/models/builder.js: Added.
582 * public/v3/models/commit-log.js: Added.
583 * public/v3/models/data-model.js: Added.
584 (DataModelObject): The base class for various data objects that correspond to database tables. It supplies static
585 hash map to find entries by id as well as other keys.
586 (LabeledObject): A subclass of DataModelObject with the capability to find an object via its name.
588 * public/v3/models/measurement-cluster.js: Added.
589 (MeasurementCluster): Represents a single cluster or a chunk of data in a measurement set.
591 * public/v3/models/measurement-set.js: Added.
592 (MeasurementSet): Represents a measurement set.
593 (MeasurementSet.findSet): Returns the singleton set given (metric, platform). We use singleton to avoid issuing
594 multiple HTTP requests for the same JSON when there are multiple TimeSeriesChart that show the same graph (e.g. on
595 charts page with overview and main charts).
596 (MeasurementSet.prototype.findClusters): Finds the list of clusters to fetch in a given time range.
597 (MeasurementSet.prototype.fetchBetween): Fetch clusters for a given time range and calls callback whenever new data
598 arrives. The number of callbacks depends on the how many clusters need to be newly fetched.
599 (MeasurementSet.prototype._fetchSecondaryClusters): Fetches non-primary (non-latest) clusters.
600 (MeasurementSet.prototype._fetch): Issues a HTTP request to fetch a cluster.
601 (MeasurementSet.prototype._didFetchJSON): Called when a cluster is fetched.
602 (MeasurementSet.prototype._failedToFetchJSON): Called when the fetching of a cluster has failed.
603 (MeasurementSet.prototype._invokeCallbacks): Invokes callbacks upon an approval of a new cluster.
604 (MeasurementSet.prototype._addFetchedCluster): Adds the newly fetched cluster in the order.
605 (MeasurementSet.prototype.fetchedTimeSeries): Returns a time series that contains data from all clusters that have
607 (TimeSeries.prototype.findById): Additions to TimeSeries defined in /v2/data.js.
608 (TimeSeries.prototype.dataBetweenPoints): Ditto.
609 (TimeSeries.prototype.firstPoint): Ditto.
611 * public/v3/models/metric.js: Added.
612 * public/v3/models/platform.js: Added.
613 * public/v3/models/repository.js: Added.
614 * public/v3/models/test.js: Added.
616 * public/v3/pages: Added.
617 * public/v3/pages/analysis-category-page.js: Added. The "Analysis" page that lists the analysis tasks.
618 * public/v3/pages/analysis-category-toolbar.js: Added. The toolbar to filter analysis tasks based on its category
619 (unconfirmed, bisecting, identified, closed) and a keyword.
621 * public/v3/pages/analysis-task-page.js: Added. Not implemented yet. It just has the hyperlink to the v2 UI.
623 * public/v3/pages/chart-pane-status-view.js: Added.
624 (ChartPaneStatusView): A subclass of ChartStatusView used in the charts page. In addition to the current value,
625 comparison to baseline/target, it shows the list of repository revisions (e.g. WebKit revision, OS version).
627 * public/v3/pages/chart-pane.js: Added.
628 (ChartPane): A component a pane in the charts page. Each pane has the overview chart and the main chart. The zooming
629 is synced across all panes in the charts page.
631 * public/v3/pages/charts-page.js: Added. Charts page.
632 * public/v3/pages/charts-toolbar.js: Added. The toolbar to set the number of days to show. This affects the overview
633 chart's domain in each pane.
635 * public/v3/pages/create-analysis-task-page.js: Added.
636 (CreateAnalysisTaskPage): A page that gets shown momentarily while creating a new analysis task.
638 * public/v3/pages/dashboard-page.js: Added. A dashboard page.
639 * public/v3/pages/dashboard-toolbar.js: Added. Its toolbar with buttons to select the number of days to show.
640 * public/v3/pages/domain-control-toolbar.js: Added. An abstract superclass of charts and dashboard toolbars.
642 * public/v3/pages/heading.js: Added. A component for displaying the header and toolbar, if exists, on each page.
643 * public/v3/pages/page-router.js: Added. This class is responsible for updating the URL hashes as well as opening
644 and updating each page when the hash changes (via back/forward navigation).
645 * public/v3/pages/page-with-charts.js: Added. An abstract subclass of page used by dashboards and charts page.
646 Supplies helper functions for creating TimeSeriesChart options.
647 * public/v3/pages/page-with-heading.js: Added. An abstract subclass of page that uses the heading component.
648 * public/v3/pages/page.js: Added. The Page component.
649 * public/v3/pages/toolbar.js: Added. An abstract toolbar component.
651 * public/v3/remote.js: Added.
652 (getJSON): Fetches JSON from the remote server.
653 (getJSONWithStatus): Ditto. Rejects the response if the status is not "OK".
654 (PrivilegedAPI.sendRequest): Posts a HTTP request to a privileged API in /privileged-api/.
655 (PrivilegedAPI.requestCSRFToken): Creates a new CSRF token to request a privileged API post.
657 * tools/bundle-v3-scripts.py: Added.
658 (main): Bundles js files together and minifies them by jsmin.py for the v3 UI. Without this script, we're forced to
659 download 44 JS files or making each JS file contain multiple classes.
661 * tools/jsmin.py: Copied from WebInspector / JavaScriptCore code.
663 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
665 Fix v2 UI after r194093.
669 2015-12-15 Ryosuke Niwa <rniwa@webkit.org>
671 Add /api/measurement-set for v3 UI
672 https://bugs.webkit.org/show_bug.cgi?id=152312
674 Rubber-stamped by Chris Dumez.
676 The new API JSON allows the front end to fetch measured data in chunks called a "cluster" as specified
677 in config.json for each measurement set specified by the pair of a platform and a metric.
679 When the front end needs measured data in a given time range (t_0, t_1) for a measurement set, it first
680 fetches the primary cluster by /api/measurement-set/?platform=<platform-id>&metric=<metric-id>.
681 The primary cluster is the last cluster in the set (returning the first cluster here is not useful
682 since we don't typically show very old data), and provides the information needed to fetch other clusters.
684 Fetching the primary cluster also creates JSON files at:
685 /data/measurement-set-<platform-id>-<metric-id>-<cluster-end-time>.json
686 to allow latency free access for secondary clusters. The front end code can also fetch the cache of
687 the primary cluster at: /data/measurement-set-<platform-id>-<metric-id>.json.
689 Because the front end code has to behave as if all data is fetched, each cluster contains one data point
690 immediately before the first data point and one immediately after the last data point. This avoids having
691 to fetch multiple empty clusters for manually specified baseline data. To support this behavior, we generate
692 all clusters for a given measurement set at once when the primary cluster is requested.
694 Furthermore, all measurement sets are divided at the same time into clusters so that the boundary of clusters
695 won't shift as more data are reported to the server.
697 * config.json: Added clusterStart and clusterSize as options.
698 * public/api/measurement-set.php: Added.
700 (MeasurementSetFetcher::__construct):
701 (MeasurementSetFetcher::fetch_config_list): Finds configurations that belongs to this (platform, metric) pair.
702 (MeasurementSetFetcher::at_end): Returns true if we've reached the end of all clusters for this set.
703 (MeasurementSetFetcher::fetch_next_cluster): Generates the JSON data for the next cluster. We generate clusters
704 in increasing chronological order (the oldest first and the newest last).
705 (MeasurementSetFetcher::execute_query): Executes the main query.
706 (MeasurementSetFetcher::format_map): Returns the mapping of a measurement field to an array index. This removes
707 the need to have key names for each measurement and reduces the JSON size by ~10%.
708 (MeasurementSetFetcher::format_run): Creates an array that contains data for a single measurement. The order
709 matches that of keys in format_map.
710 (MeasurementSetFetcher::parse_revisions_array): Added. Copied from runs.php.
711 * tests/api-measurement-set.js: Added. Added tests for /api/measurement-set.
713 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
715 Using fake timestamp in OS version make some results invisible
716 https://bugs.webkit.org/show_bug.cgi?id=152289
718 Reviewed by Stephanie Lewis.
720 Fix various bugs after r194088.
722 * public/api/commits.php:
723 (format_commit): Include the commit order.
725 (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
726 * tools/pull-os-versions.py:
727 (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
728 (available_builds_from_command): Exit early when an exception is thrown.
730 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
732 Fix a typo in the previous commit.
734 * public/include/report-processor.php:
736 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
738 Build fix after r192965. Suppress a warning about log being referred to as a closure variable.
740 * public/include/report-processor.php:
742 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
744 Using fake timestamp in OS version make some results invisible
745 https://bugs.webkit.org/show_bug.cgi?id=152289
747 Reviewed by Stephanie Lewis.
749 Added commit_order column to explicitly order OS versions. This fixes the bug whereby which
750 baseline results reported with only OS versions are shown with x coordinate set to 10 years ago.
752 To migrate the existing database, run:
753 ALTER TABLE commits ADD COLUMN commit_order integer;
754 CREATE INDEX commit_order_index ON commits(commit_order);
756 Then for each repository $1,
757 UPDATE commits SET (commit_time, commit_order) = (NULL, CAST(EXTRACT(epoch from commit_time) as integer))
758 WHERE commit_repository = $1;
761 * init-database.sql: Added the column.
762 * public/api/commits.php:
763 (fetch_commits_between): Use commit_order to order commits when commit_time is missing.
764 * public/api/report-commits.php:
765 (main): Set commit_order.
766 * tools/pull-os-versions.py:
767 (OSBuildFetcher.fetch_and_report_new_builds):
768 (OSBuildFetcher._assign_order): Renamed from _assign_fake_timestamps. Set the order instead of a fake timestmap.
770 2015-12-14 Ryosuke Niwa <rniwa@webkit.org>
772 Perf dashboard can't merge when the destination platform is missing baseline/target
773 https://bugs.webkit.org/show_bug.cgi?id=152286
775 Reviewed by Stephanie Lewis.
777 The bug was caused by the query to migrate test configurations to new platform checking
778 configuration type and metric separately; that is, it assumes the configuration exists
779 only if either the same type or the same metric exists in the destination.
781 Fixed the bug by checking both conditions simultaneously for each configuration.
783 * public/admin/platforms.php:
784 * tests/admin-platforms.js: Added a test.
786 2015-12-11 Ryosuke Niwa <rniwa@webkit.org>
788 Perf dashboard's buildbot sync config JSON duplicates too much information
789 https://bugs.webkit.org/show_bug.cgi?id=152196
791 Reviewed by Stephanie Lewis.
793 Added shared, per-builder, and per-test (called type) configurations.
795 * tools/sync-with-buildbot.py:
799 2015-12-02 Ryosuke Niwa <rniwa@webkit.org>
801 Perf dashboard should avoid overflow during geometric mean computation
802 https://bugs.webkit.org/show_bug.cgi?id=151773
804 Reviewed by Chris Dumez.
806 * public/include/report-processor.php:
808 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
810 Perf dashboard should extend baseline and target to the future
811 https://bugs.webkit.org/show_bug.cgi?id=151511
813 Reviewed by Darin Adler.
816 (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
817 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
818 (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
819 (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
820 * public/v2/manifest.js:
821 (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
823 2015-11-30 Ryosuke Niwa <rniwa@webkit.org>
825 Perf dashboard should always show comparison to baseline and target even if one is missing
826 https://bugs.webkit.org/show_bug.cgi?id=151510
828 Reviewed by Darin Adler.
830 Show the comparison status against the baseline when baseline is present but target is missing.
832 To make the code more readable, this patch splits the logic into three cases:
833 1. Both baseline and target are present
834 2. Only baseline is present
835 3. Only target is present
837 Also extracted a helper function to construct the label.
840 (.labelForDiff): Added.
841 (App.Pane.computeStatus):
843 2015-11-23 Commit Queue <commit-queue@webkit.org>
845 Unreviewed, rolling out r192716 and r192717.
846 https://bugs.webkit.org/show_bug.cgi?id=151582
848 The patch was incorrect. We always need at least one data
849 point in each configuration (Requested by rniwa on #webkit).
853 "Perf dashboard's should not include results more than 366
855 https://bugs.webkit.org/show_bug.cgi?id=151529
856 http://trac.webkit.org/changeset/192716
858 "Build fix for old version of PHP."
859 http://trac.webkit.org/changeset/192717
861 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
863 Build fix for old version of PHP.
865 * public/api/runs.php:
867 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
869 Perf dashboard's should not include results more than 366 days old in JSON
870 https://bugs.webkit.org/show_bug.cgi?id=151529
872 Reviewed by Timothy Hatcher.
874 Don't return results more than 366 days old in /api/runs/ JSON API.
875 This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.
877 * public/api/runs.php:
878 (main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
879 Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
880 of doing so will be included in elapsedTime.
881 (RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
882 (RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
883 (RunsGenerator::parse_revisions_array): Compute the max of commit times.
885 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
887 Remove chartPointRadius from interactive chart component
888 https://bugs.webkit.org/show_bug.cgi?id=151480
890 Reviewed by Darin Adler.
892 Replaced the parameter by CSS rules.
894 * public/v2/chart-pane.css:
896 (.chart .dot.foreground):
899 * public/v2/index.html:
900 * public/v2/interactive-chart.js:
901 (App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
902 (App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):
904 2015-11-20 Ryosuke Niwa <rniwa@webkit.org>
906 Perf dashboard's runs API uses more than 128MB of memory
907 https://bugs.webkit.org/show_bug.cgi?id=151478
909 Reviewed by Andreas Kling.
911 Don't fetch all query results at once to avoid using twice as much memory as needed.
912 Use iterative API to format each result at a time.
914 This change is also a 5% runtime performance gain.
916 * public/api/runs.php:
917 (RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
918 no longer needed as we pass in each configuration type explicitly to fetch_runs.
919 (RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
920 Also moved the logic to compute the last modified time here.
921 (RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
922 (RunsGeneratorForTestGroup):
923 (RunsGeneratorForTestGroup::__construct):
924 (RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.
926 * public/include/db.php:
927 (generate_data_file): Lock the file to avoid corruption.
929 2015-11-19 Ryosuke Niwa <rniwa@webkit.org>
931 Perf dashboard always fetches charts JSON twice
932 https://bugs.webkit.org/show_bug.cgi?id=151483
934 Reviewed by Andreas Kling.
936 Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
937 obsolete (shouldRefetch is set true) or corrupt (the second closure).
942 2015-11-18 Ryosuke Niwa <rniwa@webkit.org>
944 Internal perf dashboard takes forever to load
945 https://bugs.webkit.org/show_bug.cgi?id=151430
947 Rubber-stamped by Antti Koivisto.
949 Fix a few performance problems with the perf dashboard v2 UI.
952 (App.DashboardRow._createPane): Set "inDashboard" to true.
953 (App.Pane._fetch): Immediately show the cached chart instead of waiting for the refetched data which invokes
954 a PHP JSON API. Also don't fetch the analysis tasks when the chart is shown in the dashboard since we don't
955 show annotate charts in the dashboard.
957 2015-10-15 Ryosuke Niwa <rniwa@webkit.org>
959 Unreviewed fix of a test after r190687.
961 * tests/admin-regenerate-manifest.js:
963 2015-10-12 Ryosuke Niwa <rniwa@webkit.org>
965 Perf dashboard tools shouldn't require server credentials in multiple configuration files
966 https://bugs.webkit.org/show_bug.cgi?id=149994
968 Reviewed by Chris Dumez.
970 Made detect-changes.js and pull-svn.py pull username and passwords from the server config JSON to reduce
971 the number of JSON files that need to include credentials.
973 Also made each script reload the server config after sleep to allow dynamic credential updates.
975 In addition, change the server config JSON's format to include scheme, host, and port numbers separately
976 instead of a url since detect-changes.js needs each value separately.
978 This reduces the number of JSONs with credentials to two for our internal dashboard.
980 * tools/detect-changes.js:
981 (main): Added a property argument parsing. Now takes --server-config-json, --change-detection-config-json,
982 and --seconds-to-sleep like other scripts.
983 (parseArgument): Added.
984 (fetchManifestAndAnalyzeData): Reload the server config JSON.
985 (loadServerConfig): Added. Set settings.perfserver and settings.slave from the server config JSON. Also
986 add settings.perfserver.host to match the old format.
987 (configurationsForTesting): Fixed a bug that we throw an exception when a dashboard contains an empty cell.
989 * tools/pull-os-versions.py:
990 (main): Use load_server_config after each sleep.
993 (main): Use load_server_config after each sleep.
994 (fetch_commits_and_submit): Use the perf dashboard's auth as subversion credential when useServerAuth is set.
996 * tools/sync-with-buildbot.py:
997 (main): Use load_server_config after each sleep.
1000 (load_server_config): Extracted from python scripts. Computes server's url from scheme, host, and port number
1001 to match the old format python scripts except.
1003 2015-10-11 Ryosuke Niwa <rniwa@webkit.org>
1005 Build fix after r190817. Now that pull-os-versions store fake timestamps, we need to bypass timestamp
1006 checks for OS versions when bots try to report new results. Otherwise, we fail to process the reports
1007 with a MismatchingCommitTime error.
1009 * public/include/report-processor.php:
1010 (ReportProcessor::resolve_build_id):
1012 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
1014 Perf dashboard erroneously shows an old OS build in A/B testing range
1015 https://bugs.webkit.org/show_bug.cgi?id=149942
1017 Reviewed by Darin Adler.
1019 Ordering OS builds lexicologically turned out be a bad idea since 15A25 falls between 15A242 and 15A251.
1020 Use a fake/synthetic timestamp to force the commonly understood total order instead.
1022 Refactored pull-os-versions.py to share the server config JSON with other scripts. Also made the script
1023 support pulling multiple sources; e.g. both OS X and iOS.
1025 Also removed superfluous feature to submit results in chunks. The perf dashboard can handle thousands of
1026 revisions being submitted at once just fine.
1028 * public/api/commits.php:
1029 (main): A partial revert of r185574 since we no longer need to order builds lexicologically.
1031 * tools/pull-os-versions.py:
1032 (main): Takes --os-config-json, --server-config-json, and --seconds-to-sleep as arguments instead of
1033 a single --config argument to share the server config JSON with other scripts.
1034 (OSBuildFetcher): Extracted out of main. This class is instantiated for each OS kind (e.g. OS X).
1035 (OSBuildFetcher.__init__): Added.
1036 (OSBuildFetcher._fetch_available_builds): Extracted out of main. Fetches available builds from a website
1038 (OSBuildFetcher.fetch_and_report_new_builds): Extracted out of main. Submits the fetched builds after
1039 filtering out the ones we've already reported.
1040 (OSBuildFetcher._assign_fake_timestamps): Creates a fake timestamp to establish a total order amongst each
1041 OS X / iOS style build number such as 12A3456b.
1043 2015-10-08 Ryosuke Niwa <rniwa@webkit.org>
1045 pull-svn.py fails to sync revisions when SVN credentials is not setup
1046 https://bugs.webkit.org/show_bug.cgi?id=149941
1048 Reviewed by Chris Dumez.
1050 Added the support for specifying subversion credentials.
1052 Also added the support for pulling from multiple subversion servers. Subversion servers are specified
1053 in a JSON configuration file specified by --svn-config formatted as follows:
1058 "url": "http://svn.webkit.org/repository/webkit",
1059 "username": "webkitten",
1060 "password": "webkitten's password",
1061 "trustCertificate": true,
1062 "accountNameFinderScript":
1063 ["python", "/Volumes/Data/WebKit/Tools/Scripts/webkit-patch", "find-users"]
1068 In addition, refactored it to use the shared server config JSON for the dashboard access.
1070 * tools/pull-svn.py:
1071 (main): Now takes --svn-config-json, --server-config-json, --seconds-to-sleep and --max-fetch-count
1072 as required options instead of seven unnamed arguments.
1073 (fetch_commits_and_submit): Extracted from main. Fetches at most max_fetch_count new revisions from
1074 the subversion server, and submits them in accordance with server_config.
1075 (fetch_commit_and_resolve_author): Now takes a single repository dictionary instead of two separate
1076 arguments for name and URL to pass down the repository's authentication info to fetch_commit.
1077 (fetch_commit): Ditto. Add appropriate arguments when username and passwords are specified.
1078 (resolve_author_name_from_account): Use a list argument instead of a single string argument now that
1079 the argument comes from a JSON instead of sys.argv.
1081 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1083 Unreviewed race condition fix. Exit early when xScale or yScale is not defined.
1085 * public/v2/interactive-chart.js:
1086 (App.InteractiveChartComponent._updateRangeBarRects):
1088 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1090 Add a page that cycles through v2 dashboards
1091 https://bugs.webkit.org/show_bug.cgi?id=149907
1093 Reviewed by Chris Dumez.
1095 Add cycler.html that goes through each dashboard on v2 UI.
1097 This allows the dashboards to be cycled through on a TV screen.
1099 * public/cycler.html: Added.
1100 (loadURLAt): Appends a new iframe to load the next URL (i is the index of the dashboard to be shown)
1101 at the end of body. We don't immediately show the new iframe since it might take a while to load.
1102 (showNewFrameIfLoaded): Remove the current iframe and show the next iframe if the next dashboard has
1103 finished loading. We can't rely on DOMContentLoaded or load events because we use asynchronous XHR to
1104 load each chart's data. Instead, wait until some chart becomes available or fails to load and none of
1105 charts are still in progress to be shown.
1107 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1109 Allow custom revisions to be specified in A/B testing
1110 https://bugs.webkit.org/show_bug.cgi?id=149905
1112 Reviewed by Chris Dumez.
1114 Allow custom revision number on each "repository" when creating a test group.
1116 * public/v2/app.css:
1117 (form .analysis-group [name=customValue]): Added.
1120 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
1121 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
1122 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
1123 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
1124 revision option is selected.
1126 * public/v2/index.html: Added a text field for specifying a custom revision number.
1128 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1130 Make the site name configurable in perf dashboard
1131 https://bugs.webkit.org/show_bug.cgi?id=149894
1133 Reviewed by Chris Dumez.
1135 Added "siteTitle" as a new configuration key to specify the site name.
1137 * public/include/db.php:
1138 (config): Now takes the default value as an argument.
1139 * public/include/manifest.php:
1140 (ManifestGenerator::generate): Include siteTitle in the manifest.
1141 * public/index.html: Update the title and the heading when the manifest is loaded.
1142 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
1143 * public/v2/manifest.js:
1144 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
1146 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1148 Perf dashboard doesn't show analysis tasks anchored at outliers
1149 https://bugs.webkit.org/show_bug.cgi?id=149870
1151 Reviewed by Chris Dumez.
1153 The bug was caused by the computation of start and end times of analysis tasks being dependent on
1154 time series provided to the interactive chart component even though they are already filtered.
1156 Since the interactive chart component shouldn't be messing with the underlying data models, moved
1157 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
1158 the unfiltered time series newly exposed on ChartData.
1160 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
1162 * public/admin/fetch-from-remote.php:
1163 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
1164 and Ember can start hanging browsers (took me three hours to debug this).
1167 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
1168 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
1169 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
1170 Filter the results manually instead.
1171 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
1172 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
1173 need to call a private method on it.
1174 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
1175 This will cause chartData to be modified so just exit early and wait for getting called again.
1177 * public/v2/interactive-chart.js:
1178 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
1181 * public/v2/manifest.js:
1182 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
1183 to compute the end points of analysis tasks when their end points are outliers.
1185 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
1187 Unreviewed. Fix a typo in r190645.
1189 * public/include/db.php:
1191 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1193 V2 UI shouldn't sort dashboards lexicologically
1194 https://bugs.webkit.org/show_bug.cgi?id=149856
1196 Reviewed by Chris Dumez.
1198 Don't sort the dashboards by name in App.Manifest.
1201 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
1202 * public/v2/manifest.js:
1203 (App.Manifest.._fetchedManifest):
1205 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1207 V2 UI fails to show the data for the very first point in charts
1208 https://bugs.webkit.org/show_bug.cgi?id=149857
1210 Reviewed by Chris Dumez.
1212 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
1213 Explicitly check the type of this property instead.
1215 * public/v2/data.js:
1216 (TimeSeries.prototype.seriesBetweenPoints):
1218 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
1220 Perf dashboard should have the capability to test local UI with production data
1221 https://bugs.webkit.org/show_bug.cgi?id=149834
1223 Reviewed by Chris Dumez.
1225 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
1227 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
1229 * config.json: Added remote server configurations.
1230 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
1231 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
1234 * public/include/db.php:
1235 (config_path): Extracted from generate_data_file.
1236 (generate_data_file):
1237 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
1238 run-with-remote-server.py.
1239 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
1241 (abspath_from_root):
1243 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
1247 * public/js/helper-classes.js:
1249 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
1251 build-requests should use conform to JSON API format
1252 https://bugs.webkit.org/show_bug.cgi?id=146375
1254 Reviewed by Stephanie Lewis.
1256 Instead of returning single dictionary that maps root set id to a dictionary of repository names
1257 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
1258 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
1259 matches what we do in /api/test-groups.
1261 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
1262 This is useful for debugging purposes.
1264 * public/api/build-requests.php:
1265 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
1266 (update_builds): Extracted from main.
1268 * public/include/build-requests-fetcher.php:
1269 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
1270 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
1271 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
1272 Moved the logic to exit early when the root set had already been fetched here.
1274 * public/v2/analysis.js:
1275 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
1278 * tools/pull-os-versions.py:
1280 (setup_auth): Moved to util.py
1282 * tools/sync-with-buildbot.py:
1283 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
1284 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
1286 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
1287 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
1288 (config_for_request): Fixed a bug that the script blows up when the build request is missing
1289 the repository specified in the configuration. This tolerance is necessary when a new repository
1290 dependency is added but we want to run A/B tests for old builds without the dependency.
1291 (fetch_json): No longer takes auth.
1294 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
1296 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
1298 Build fix. A/B testing is broken when continuous builders report revisions out of order.
1301 (App.AnalysisTaskController.Ember.Controller.extend.):
1303 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
1305 A/B testing results should be shown even if they were submitted to different platforms
1306 https://bugs.webkit.org/show_bug.cgi?id=146219
1308 Reviewed by Andreas Kling.
1310 Fetch A/B testing results regardless of the platform to which results are submitted
1311 by providing the platform ID to which the results were submitted for each test group.
1313 * public/api/test-groups.php:
1314 (main): Include the platform id in the test groups.
1315 * public/v2/analysis.js:
1316 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
1318 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
1320 Remove unnecessary svn:executable flags
1321 https://bugs.webkit.org/show_bug.cgi?id=146107
1323 Reviewed by Alexey Proskuryakov.
1325 * public/js/helper-classes.js: Removed property svn:executable.
1326 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
1327 * public/v2/app.css: Removed property svn:executable.
1328 * public/v2/app.js: Removed property svn:executable.
1329 * public/v2/chart-pane.css: Removed property svn:executable.
1330 * public/v2/data.js: Removed property svn:executable.
1331 * public/v2/index.html: Removed property svn:executable.
1332 * public/v2/js/d3/LICENSE: Removed property svn:executable.
1333 * public/v2/js/d3/d3.js: Removed property svn:executable.
1334 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
1335 * public/v2/js/ember-data.js: Removed property svn:executable.
1336 * public/v2/js/ember.js: Removed property svn:executable.
1337 * public/v2/js/handlebars.js: Removed property svn:executable.
1338 * public/v2/js/jquery.min.js: Removed property svn:executable.
1339 * public/v2/js/statistics.js: Removed property svn:executable.
1340 * public/v2/manifest.js: Removed property svn:executable.
1341 * public/v2/popup.js: Removed property svn:executable.
1343 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1345 Reading the list of analysis tasks is extremely slow
1346 https://bugs.webkit.org/show_bug.cgi?id=146086
1348 Reviewed by Darin Adler.
1350 The bug was caused by Ember data requesting manifest.js hundreds of times.
1351 Fetch it ahead of time in each route instead.
1354 (App.AnalysisRoute.model):
1355 (App.AnalysisTaskRoute.model):
1357 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1359 Update ReadMe.md and Install.md per database changes
1360 https://bugs.webkit.org/show_bug.cgi?id=146076
1362 Reviewed by Darin Adler.
1369 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
1371 Increase the popup dismissal time from 100ms to 500ms
1372 https://bugs.webkit.org/show_bug.cgi?id=146077
1374 Rubber-stamped by Andreas Kling.
1376 * public/v2/popup.js:
1377 (App.PopupView.scheduleHiding):
1379 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
1381 v2 UI should have buttons to breakdown a test
1382 https://bugs.webkit.org/show_bug.cgi?id=146010
1384 Reviewed by Chris Dumez.
1386 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
1387 as well as "Breakdown" to add all subtests' metrics.
1389 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
1390 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
1393 (App.ChartsController.addAlternativePanes): Added.
1394 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
1395 (App.TestProxyForPopup.actionName): Added.
1396 (App.TestProxyForPopup.actionArgument): Added.
1397 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
1398 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
1399 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
1400 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
1401 that are already present in the list of panes.
1402 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
1403 * public/v2/index.html:
1404 * public/v2/manifest.js:
1405 (App.Metric.childMetrics): Added.
1407 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1409 Build fix after r185574.
1412 (set get App.Pane.Ember.Object.extend.):
1414 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1418 * tools/pull-os-versions.py:
1421 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1423 Perf dashboard should be able to list iOS versions as well as OS X versions
1424 https://bugs.webkit.org/show_bug.cgi?id=146003
1426 Reviewed by Stephanie Lewis.
1428 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
1429 information specified in config.json.
1431 * tools/pull-os-versions.py: Renamed from pull-osx.py.
1432 (main): Use available_builds_from_command when 'customCommands' is specified.
1433 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
1434 (fetch_available_builds): Now takes the repository name.
1436 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1438 Removed a superfluous console.log per Chris's comment.
1442 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
1444 Analysis task should show all possible revisions for A/B testing
1445 https://bugs.webkit.org/show_bug.cgi?id=145996
1447 Reviewed by Chris Dumez.
1449 * public/api/commits.php:
1450 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
1451 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
1452 have a "commit time".
1455 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
1456 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
1457 the fetched list of commits if available.
1458 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
1459 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
1460 of points shown in the A/B testing configurations become too long.
1462 * public/v2/commits-viewer.js:
1463 (App.CommitsViewerComponent.commitsChanged):
1465 * public/v2/data.js:
1466 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
1468 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
1470 Add a script to post new OS X builds to perf dashboard
1471 https://bugs.webkit.org/show_bug.cgi?id=145955
1473 Reviewed by Darin Adler.
1475 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
1477 * public/api/report-commits.php:
1478 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
1479 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
1481 * tools/pull-osx.py: Added.
1482 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
1483 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
1484 (setup_auth): Sets up basic or digest auth to access the dashboard.
1485 (fetch_available_builds): Fetches and parses the XML document from an internal website.
1486 (textContent): A helper function to get the text content out of a XML node.
1487 (submit_commits): Submits commits to the perf dashboard.
1489 * tools/pull-svn.py:
1492 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
1494 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
1496 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
1497 https://bugs.webkit.org/show_bug.cgi?id=145940
1499 Reviewed by Darin Adler.
1501 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
1502 Also deleted the code to mark points outside the envelop as outliers.
1506 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
1508 Unreviewed build fix for merging platforms.
1510 * public/admin/platforms.php:
1512 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
1514 Unreviewed build fix. Some builder names are really long.
1516 * init-database.sql:
1518 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
1520 Show results and status before revisions for A/B testing results
1521 https://bugs.webkit.org/show_bug.cgi?id=145327
1523 Reviewed by Chris Dumez.
1525 Place the results and the status columns before the columns for revisions.
1526 Also show the absolute difference as well as the relative difference between the averages of A and B.
1529 (App.TestGroupPane._populate):
1530 (App.TestGroupPane._computeStatisticalSignificance):
1531 * public/v2/index.html:
1533 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1535 Build fix after r184591.
1537 * public/v2/manifest.js:
1539 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1541 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
1543 * public/include/build-requests-fetcher.php:
1545 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1547 UI to associate bugs with an analysis task is crappy
1548 https://bugs.webkit.org/show_bug.cgi?id=145198
1550 Reviewed by Andreas Kling.
1552 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
1553 a bug and a separate select view with a text field to associate a new bug instead of implicitly
1554 updating or deleting the existing record based on what the user had typed.
1556 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
1557 a given analysis task since it's perfectly reasonable for a given task to be associated with
1558 multiple WebKit bugs.
1560 * public/privileged-api/associate-bug.php:
1561 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
1562 one that matches the analysis task and the bug tracker when the bug number is falsey.
1564 * public/v2/analysis.js:
1565 (App.Bug.url): Added.
1566 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
1568 * public/v2/app.css:
1571 (App.AnalysisTaskController.actions.addBug): Added.
1572 (App.AnalysisTaskController.actions.deleteBug): Added.
1573 (App.AnalysisTaskController.associateBug): Deleted.
1575 * public/v2/index.html: Updated the templates.
1577 * public/v2/manifest.js:
1578 (App.BugTracker.urlFromBugNumber): Added.
1580 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
1582 A/B testing rootSets should provide commit times as well as revisions
1583 https://bugs.webkit.org/show_bug.cgi?id=145207
1585 Reviewed by Andreas Kling.
1587 Some continuous build systems need the commit time as well as the revision number / hash so provide one
1588 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
1590 * public/include/build-requests-fetcher.php:
1591 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
1592 the revision number as well as the commit time.
1593 * tools/sync-with-buildbot.py:
1594 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
1595 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
1596 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
1598 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
1600 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
1602 * public/v2/manifest.js:
1603 (App.Manifest.Ember.Controller.extend.):
1604 (App.Manifest.Ember.Controller.extend):
1606 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
1608 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
1609 https://bugs.webkit.org/show_bug.cgi?id=145181
1611 Rubber-stamped by Chris Dumez.
1613 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
1614 for clarity. This change also reduces the code complexity.
1616 * public/index.html:
1618 (App.AnalysisTaskController._chartDataChanged):
1619 (App.TestGroupPane._createConfigurationSummary):
1620 * public/v2/data.js:
1621 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
1623 * public/v2/interactive-chart.js: Removed the support for showing units separately.
1624 (App.InteractiveChartComponent._constructGraphIfPossible):
1625 (App.InteractiveChartComponent._relayoutDataAndAxes)
1627 * public/v2/manifest.js:
1628 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
1629 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
1630 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
1631 automatically include unit.
1633 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
1635 REGRESSION: v2 UI reports a higher memory usage
1636 https://bugs.webkit.org/show_bug.cgi?id=145151
1638 Reviewed by Chris Dumez.
1640 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
1641 Fixed the bug by manually implementing the formatter as done in v1.
1643 * public/v2/manifest.js:
1644 (App.Manfiest._formatBytes): Added.
1645 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
1647 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
1649 Unreviewed build fix. Add "Duration" as a time metric.
1651 * public/js/helper-classes.js:
1652 * public/v2/data.js:
1653 (RunsData.unitFromMetricName):
1655 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
1657 Perf dashboard treats Speedometer and JetStream as smaller is better
1658 https://bugs.webkit.org/show_bug.cgi?id=144711
1660 Reviewed by Chris Dumez.
1662 Added the support for "Score" metric.
1664 * public/js/helper-classes.js:
1666 * public/v2/data.js:
1667 (RunsData.unitFromMetricName):
1668 (RunsData.isSmallerBetter):
1670 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
1672 Build fix after r183232.
1674 * public/include/json-header.php:
1676 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
1678 Perf dashboard should automatically detect regressions
1679 https://bugs.webkit.org/show_bug.cgi?id=141443
1681 Reviewed by Anders Carlsson.
1683 Added a node.js script detect-changes.js to detect potential regressions and progressions
1684 on the graphs tracked on v2 dashboards.
1686 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
1687 columns to analysis_tasks to keep the segmentation and test range selection strategies used
1688 to create an analysis task.
1690 * public/api/analysis-tasks.php:
1691 (format_task): Include task_segmentation and analysis_tasks in the results.
1693 * public/include/json-header.php:
1694 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
1695 of a CSRF prevention token.
1696 (should_authenticate_as_slave): Added.
1697 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
1698 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
1699 to a CSRF attack, we don't need to check a CSRF token.
1701 * public/privileged-api/create-analysis-task.php:
1702 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
1703 analysis task. Also add or find segmentation and test range selection strategies if specified.
1705 * public/privileged-api/create-test-group.php:
1706 (main): Use ensure_privileged_api_data_and_token_or_slave.
1708 * public/privileged-api/generate-csrf-token.php:
1711 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
1713 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
1714 (Array.prototype.find): Added a polyfill to be used in node.js.
1715 (RunsData.fetchRuns):
1716 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
1717 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
1718 in detect-changes.js.
1719 (RunsData.unitFromMetricName): Ditto.
1720 (RunsData.isSmallerBetter): Ditto.
1721 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
1722 times are identical.
1723 (TimeSeries): When commit times are identical, order points based on build time. This is needed
1724 for when we trigger two builds at two different OS versions with the same WebKit revision since
1725 OS versions don't change the commit times.
1726 (TimeSeries.prototype.findPointByIndex): Added.
1727 (TimeSeries.prototype.rawValues): Added.
1729 * public/v2/js/statistics.js:
1730 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
1731 description of this strategy instead of the default probability. Also fixed a bug that debugging
1732 code was referring to non-existent variables.
1733 (Statistics.executeStrategy): Moved from App.Pane (app.js).
1735 * public/v2/manifest.js:
1736 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
1737 used in detect-changes.js.
1739 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
1740 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
1741 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
1742 (main): Loads the settings JSON specified in the argument.
1743 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
1744 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
1745 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
1746 and computes various values for when statistically significant changes are detected later.
1747 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
1748 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
1749 in chronological order and create a new analysis task for the very last change we detected. We'll
1750 eventually create an analysis task for all detected changes since we're repeating the analysis in
1751 fetchManifestAndAnalyzeData after some time.
1752 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
1753 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
1754 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
1755 tasks for the same range (e.g. humans may create one before the script gets to do it).
1756 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
1757 testing if available, and notify another server with a HTML message as specified.
1758 (findStrategyByLabel):
1759 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
1760 test or values are getting smaller in a larger-is-better test and vice versa.
1761 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
1762 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
1766 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
1767 (instantiateNotificationTemplate):
1770 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
1772 Perf dashboard should have UI to set status on analysis tasks
1773 https://bugs.webkit.org/show_bug.cgi?id=143977
1775 Reviewed by Chris Dumez.
1777 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
1778 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
1779 The latter will be a useful metric once we start automatically creating analysis tasks.
1781 * init-database.sql: Added two columns to analysis_tasks table.
1782 * public/api/analysis-tasks.php: Include the added columns in the JSON.
1783 * public/include/db.php:
1784 (Database::to_database_boolean): Added.
1785 * public/include/json-header.php:
1786 (require_match_one_of_values): Added.
1787 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
1789 * public/v2/analysis.js:
1790 (App.AnalysisTask.result): Added.
1791 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
1792 and we want to differentiate null from false in order to differentiate the null-ness of the value.
1793 (App.AnalysisTask.saveStatus): Added.
1794 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
1795 * public/v2/app.css:
1797 (App.AnalysisTaskController.analysisResultOptions): Added.
1798 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
1799 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
1800 been created if 'no change' is selected.
1801 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
1802 (App.AnalysisTaskController.actions.saveStatus): Added.
1803 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
1804 'result' and 'needed' values of the analysis task.
1806 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
1808 Unreviewed build fix. Updated config.json after recent changes.
1812 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
1814 Make the analysis page more useful
1815 https://bugs.webkit.org/show_bug.cgi?id=143617
1817 Reviewed by Chris Dumez.
1819 * public/api/analysis-tasks.php:
1820 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
1821 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
1822 * public/v2/analysis.js:
1823 (App.AnalysisTask.formattedCreatedAt): Added.
1824 (App.AnalysisTask._addLeadingZero): Added.
1825 (App.AnalysisTask.buildRequestCount): Added.
1826 (App.AnalysisTask.finishedBuildRequestCount): Added.
1827 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
1828 (App.AnalysisTask.testGroups):
1829 (App.AnalysisTask.triggerable):
1830 (App.AnalysisTask.label):
1832 * public/v2/app.css: Tweaked style rules for the analysis page.
1835 (App.buildPopup): Sort the list of platforms by name.
1836 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
1837 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
1838 such as "Bugzilla" with the corresponding text field.
1840 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
1841 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
1842 for the accompanying graph.
1844 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
1846 Perf dashboard should automatically select ranges for A/B testing
1847 https://bugs.webkit.org/show_bug.cgi?id=143580
1849 Reviewed by Chris Dumez.
1851 Added a new statistics option for picking a A/B test range selection strategy.
1852 The selected ranges are shown in the graph using the same UI to show analysis tasks.
1855 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
1856 charts page used by the dashboard since we've added a new parameter at the end.
1857 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
1858 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
1859 (App.Pane._cloneStrategy): Copy isSegmentation.
1860 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
1861 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
1862 selection strategy is picked by the user.
1863 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
1864 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
1865 the return value from the moving average time series to a dictionary that contains the moving
1866 average time series, a dictionary of anomalies, and an array of test ranges.
1867 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
1868 (App.ChartsController._serializePaneList): Ditto for serialization.
1869 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
1870 test range selection strategy.
1872 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
1874 * public/v2/index.html: Added UI for selecting a test range selection strategy.
1876 * public/v2/interactive-chart.js:
1877 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
1879 * public/v2/js/statistics.js:
1880 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
1881 (Statistics.TestRangeSelectionStrategies): Added.
1883 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
1885 The results of A/B testing should state statistical significance
1886 https://bugs.webkit.org/show_bug.cgi?id=143552
1888 Reviewed by Chris Dumez.
1890 Added statistical comparisons between results for each configuration on analysis task page using
1891 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
1894 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
1895 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
1897 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
1898 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
1899 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
1900 Also renamed "items" to "requests" for clarity.
1902 * public/v2/index.html: Added the template for showing statistical comparisons.
1904 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
1905 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
1906 probability and vice versa.
1907 (Statistics.supportedConfidenceIntervalProbabilities):
1908 (Statistics.confidenceIntervalDelta):
1909 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
1910 the probability that two values are sampled from distinct distributions using Welch's t-test.
1911 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
1912 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
1913 (.oneSidedToTwoSidedProbability): Extracted.
1914 (.twoSidedToOneSidedProbability): Extracted.
1915 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
1916 now that computeWelchsT takes two-sided probability.
1918 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
1920 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
1924 (App.Pane.refetchRuns):
1926 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
1928 Perf dashboard should have a way of marking outliers
1929 https://bugs.webkit.org/show_bug.cgi?id=143466
1931 Reviewed by Chris Dumez.
1933 Address kling's in-person comment to notify users when the new run status is saved in the database.
1936 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
1937 * public/v2/chart-pane.css: Fixed a typo.
1939 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
1941 Perf dashboard should have a way of marking outliers
1942 https://bugs.webkit.org/show_bug.cgi?id=143466
1944 Reviewed by Chris Dumez.
1946 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
1947 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
1949 * init-database.sql: Added run_marked_outlier column to test_runs table.
1951 * public/admin/tests.php:
1953 * public/api/runs.php:
1954 (main): Only emit Cache-Control and Expires headers in v1 UI.
1955 (RunsGenerator::format_run): Emit markedOutlier.
1957 * public/include/admin-header.php:
1959 * public/include/db.php:
1960 (Database::is_true): Made it static.
1962 * public/include/manifest.php:
1963 (Manifest::platforms):
1965 * public/index.html: Call into /api/runs/ with ?cache=true.
1967 * public/privileged-api/update-run-status.php: Added.
1968 (main): Updates the newly added column in test_runs table.
1972 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
1973 (App.Pane._didFetchRuns): Renamed from _updateChartData.
1974 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
1975 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
1976 the interactive chart component only observes changes to chartData and not individual properties of it.
1977 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
1978 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
1979 clone chartData here.
1981 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
1982 invoking App.Pane._setNewChartData.
1983 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
1984 opening the pane for marking points as outliers would be annoying.
1985 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
1986 (App.PaneController.selectedMeasurement): Added.
1987 (App.PaneController.showOutlierTitle): Added.
1988 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
1989 mark the selected point as an outlier via the newly added privileged API.
1991 * public/v2/chart-pane.css: Updated styles.
1993 * public/v2/data.js:
1994 (PrivilegedAPI._post): Report the semantic errors.
1995 (Measurement.prototype.markedOutlier): Added.
1996 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
1997 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
1998 whether the time series should include measurements marked as outliers or not.
1999 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
2000 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
2001 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
2003 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
2004 mark individual points as outliers.
2006 * public/v2/interactive-chart.js:
2007 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
2008 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
2009 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
2010 with the arrow key navigation support, this is no longer an issue.
2012 * public/v2/manifest.js:
2013 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
2014 updates the time series in this chart data in order to include or exclude outliers.
2016 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2018 Perf dashboard should be able to trigger A/B testing jobs for iOS
2019 https://bugs.webkit.org/show_bug.cgi?id=143398
2021 Reviewed by Chris Dumez.
2023 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
2025 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
2027 * public/api/triggerables.php:
2028 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
2029 * public/v2/analysis.js:
2030 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
2032 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
2033 some of the data points. This will happen when we modify the list of projects we build for iOS.
2034 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
2035 attempts to create an invalid test group; when there is already another test group of the same or when
2036 only either configuration specifies the revision for some repository.
2037 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
2038 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
2039 * tools/sync-with-buildbot.py:
2040 (find_request_updates):
2041 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
2042 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
2043 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
2044 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
2046 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2048 Add time series segmentation algorithms as moving averages
2049 https://bugs.webkit.org/show_bug.cgi?id=143362
2051 Reviewed by Chris Dumez.
2053 This patch implements two preliminary time series segmentation algorithms as moving averages.
2055 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
2056 If Welch's t-test implicates a statistically significance difference, then split the segment into two
2057 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
2058 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
2059 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
2061 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
2062 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
2063 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
2064 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
2065 through i = n. However, we also don't want to split every data point into a separate segment so we need
2066 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
2067 models discussed in [2] for simplicity. We will tune this cost function further in the future.
2069 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
2070 space is exponential with respect to the size of the time series since we could split at each data point.
2071 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
2072 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
2073 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
2074 exploring much of the problem space.
2076 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
2077 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
2078 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
2079 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
2080 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
2081 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
2082 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
2084 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
2085 a nonstationary time series", Physical Review E 69, 021108 (2004)
2087 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
2088 Lithuanian Mathematical Journal, vol 46, 2006
2090 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
2091 * public/v2/js/statistics.js:
2092 (Statistics.testWelchsT):
2093 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
2094 of each value array between which Welch's t-statistic is computed. This generalization helps the
2095 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
2096 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
2097 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
2098 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
2099 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
2101 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
2102 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
2104 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
2106 REGRESSION: Perf dashboard sometimes fails to update zooming level
2107 https://bugs.webkit.org/show_bug.cgi?id=143359
2109 Reviewed by Darin Adler.
2111 The bug was caused by various bugs that ended up in an exception.
2114 (App.Pane._handleFetchErrors): Removed superfluous console.log.
2115 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
2116 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
2117 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
2118 to # when Ember.js fails to attach event listeners on time.
2119 * public/v2/interactive-chart.js:
2120 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
2121 the containing element's size is 0.
2122 (App.InteractiveChartComponent._updateBrush): Ditto.
2124 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
2126 Perf dashboard should have UI to test out anomaly detection strategies
2127 https://bugs.webkit.org/show_bug.cgi?id=143290
2129 Reviewed by Benjamin Poulain.
2131 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
2133 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
2134 as well as Welch's t-test that compares the last five points to the prior twenty points.
2136 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
2137 performance tests although they compare medians instead of means.
2139 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
2142 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
2143 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
2144 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
2145 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
2146 Only report the first data point when multiple consecutive data points are detected as anomalies.
2147 * public/v2/chart-pane.css: Updated styles.
2148 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
2149 * public/v2/js/statistics.js:
2150 (Statistics.testWelchsT): Added. Implements Welch's t-test.
2151 (.sampleMeanAndVarianceForValues): Added.
2152 (.createWesternElectricRule): Added.
2153 (.countValuesOnSameSide): Added.
2154 (Statistics.AnomalyDetectionStrategy): Added.
2156 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2158 REGRESSION: Searching commits can highlight wrong data points
2159 https://bugs.webkit.org/show_bug.cgi?id=143272
2161 Reviewed by Antti Koivisto.
2163 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
2164 return commit times with only second precision. This resulted in the frontend code to match a commit
2165 with the data point that included the next commit when the millisecond component of commit's timestamp
2166 wasn't identically 0.
2168 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
2169 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
2170 so miliseconds component was only preserved in /api/commits.
2172 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
2173 it returns time in milisecond precision.
2175 * public/api/commits.php:
2176 (fetch_commits_between): Use Database::to_js_time for format commit times.
2177 (format_commit): Ditto.
2178 * public/include/db.php:
2179 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
2180 * public/v2/data.js:
2181 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
2183 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2185 Perf dashboard should show relative change in values
2186 https://bugs.webkit.org/show_bug.cgi?id=143252
2188 Reviewed by Antti Koivisto.
2190 When a range of values are selected, show the percentage difference between the start and the end
2191 in addition to the absolute value difference. When a single point is selected, show the relative
2192 difference with respect to the previous point. Use two significant figures and always show plus sign
2193 when the difference is positive.
2195 * public/v2/app.js: Compute and format the relative difference.
2196 * public/v2/chart-pane.css: Don't let commits view shrink itself when they're all collapsed.
2197 * public/v2/index.html: Show the relative difference.
2199 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
2201 REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
2202 https://bugs.webkit.org/show_bug.cgi?id=143254
2204 Reviewed by Antti Koivisto.
2206 The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
2207 or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
2208 so that the interactive chart component will observe a change to 'chartData'.
2211 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.
2213 2015-03-19 Ryosuke Niwa <rniwa@webkit.org>
2215 Unreviewed build fixes.
2217 * public/include/manifest.php:
2218 (Manifest::generate): These should be {} instead of [] when they're empty.
2219 * public/v2/data.js:
2220 (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
2221 * public/v2/manifest.js:
2222 (App.Metric.fullName): Fixed the typo.
2223 * tests/admin-regenerate-manifest.js: Fixed the test.
2225 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2227 Commit the erroneously reverted change.
2229 * public/api/runs.php:
2230 (RunsGenerator::results):
2232 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2234 Loading the perf dashboard takes multiple seconds
2235 https://bugs.webkit.org/show_bug.cgi?id=141860
2237 Reviewed by Andreas Kling.
2239 This patch introduces the caches of JSON files returned by /api/ in /data/ directory. It also records
2240 the last time test_runs rows associated with the requested platforms and metrics are inserted, updated,
2241 or removed in the caches as well as the manifest JSON files ("last modified time"). Because the manifest
2242 is regenerated each time a new test result is reported, the front end can compare last modified time in
2243 the manifest file with that in a /api/runs JSON cache to detect the stale-ness.
2245 More concretely, the front end first optimistically fetches the JSON in /data/. If the cache doesn't exit
2246 or the last modified time in the cache doesn't match with that in the manifest file, it would fetch it
2247 again via /api/runs. In the case the cache did exist, we render the charts based on the cache meanwhile.
2248 This dramatically reduces the perceived latency for the page load since charts are drawn immediately using
2249 the cache and we would only re-render the charts as new up-to-date JSON comes in.
2251 This patch also changes the format of runs JSONs by pushing the exiting properties into 'configurations'
2252 and adding 'lastModified' and 'elapsedTime' at the top level.
2254 * init-database.sql: Added config_runs_last_modified to test_configurations table as well as a trigger to
2255 auto-update this column upon changes to test_runs table.
2257 * public/admin/test-configurations.php:
2258 (add_run): Regenerate the manifest file to invalidate the /api/runs JSON cache.
2259 (delete_run): Ditto.
2261 * public/api/runs.php:
2262 (main): Fetch all columns of test_configurations table including config_runs_last_modified. Also generate
2263 the cache in /data/ directory.
2264 (RunsGenerator::__construct): Compute the last modified time for this (platform, metric) pair.
2265 (RunsGenerator::results): Put the old content in 'configurations' property and include 'lastModified' and
2266 'elapsedTime' properties. 'elapsedTime' is added for debugging purposes.
2267 (RunsGenerator::add_runs):
2268 (RunsGenerator::parse_revisions_array):
2270 * public/include/db.php:
2271 (CONFIG_DIR): Added.
2272 (generate_data_file): Added based on ManifestGenerator::store.
2273 (Database::to_js_time): Extracted from RunsGenerator::add_runs to share code.
2275 * public/include/json-header.php:
2276 (echo_success): Renamed from success_json. Return the serialized JSON instead of echo'ing it so that we can
2277 generate caches in /api/runs/.
2278 (exit_with_success):
2280 * public/include/manifest.php:
2281 (ManifestGenerator::generate): Added 'elapsedTime' property for the time taken to generate the manifest.
2282 It seems like we're generating it in 200-300ms for now so that's good.
2283 (ManifestGenerator::store): Uses generate_data_file.
2284 (ManifestGenerator::platforms): Added 'lastModified' array to each platform entry. This array contains the
2285 last modified time for each (platform, metric) pair.
2287 * public/index.html:
2288 (fetchTest): Updated per the format change in runs JSON.
2291 (App.Pane._fetch): Fetch the cached JSON first. Refetch the uncached version if instructed as such.
2292 (App.Pane._updateChartData): Extracted from App.Pane._fetch.
2293 (App.Pane._handleFetchErrors): Ditto.
2295 * public/v2/data.js:
2296 (RunsData.fetchRuns): Takes the fourth argument indicating whether we should fetch the cached version or not.
2297 The cached JSON is located in /data/ with the same filename. When fetching a cached JSON results in 404,
2298 fulfill the promise with null as the result instead of rejecting it. The only client of this function which
2299 sets useCache to true is App.Manifest.fetchRunsWithPlatformAndMetric, and it handles this special case.
2301 * public/v2/manifest.js:
2302 (App.DateArrayTransform): Added. Handles the array of last modified dates in platform objects.
2303 (App.Platform.lastModifiedTimeForMetric): Added. Returns the last modified date in the manifest JSON.
2304 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes "useCache" like RunsData.fetchRuns. Set shouldRefetch
2305 to true if response is null (the cache didn't exit) or the cache is out-of-date.
2306 (App.Manifest._formatFetchedData): Extracted from App.Manifest.fetchRunsWithPlatformAndMetric.
2309 (initializeDatabase): Avoid splitting function definitions in the middle.
2311 * tests/api-report.js: Added tests to verify that reporting new test results updates the last modified time
2312 in test_configurations.
2314 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2316 REGRESSION(r180333): Analysis tasks can't be associated with bugs
2317 https://bugs.webkit.org/show_bug.cgi?id=141858
2319 Reviewed by Andreas Kling.
2321 Added back the erroneously removed table to associate bugs. Also moved "details-table-container" div outside
2322 of the chart-details partial template as it needs to wrap associate bugs in analysis task pages.
2324 * public/v2/chart-pane.css:
2325 * public/v2/index.html:
2327 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2329 Selecting revisions for A/B testing is hard
2330 https://bugs.webkit.org/show_bug.cgi?id=141824
2332 Reviewed by Andreas Kling.
2334 Update the revisions used in A/B testing based on the selection in the overview chart. This allows users to
2335 intuitively select revisions based on points shown in the chart. Removed the old select elements used to
2336 select A/B testing points manually.
2338 Also renamed 'testSets' to 'configurations', 'roots' to 'rootConfigurations', and 'revisions' in each root's
2339 sets to 'options' for clarity.
2341 * public/v2/app.css: Reorganized style rules.
2344 (App.AnalysisTaskController):
2345 (App.AnalysisTaskController._taskUpdated): Merged updateTestGroupPanes.
2346 (App.AnalysisTaskController._chartDataChanged): Renamed from paneDomain. It's now an observer instead of
2347 a property, which sets 'overviewDomain' property as well as other properties.
2348 (App.AnalysisTaskController.updateRootConfigurations): Renamed from updateRoots.
2349 (App.AnalysisTaskController._updateRootsBySelectedPoints): Added. Select roots based on the selected points
2350 in the overview chart.
2352 * public/v2/chart-pane.css: Added arrows next to the configuration names (e.g. 'A') to indicate whether
2353 individual build requests / test results are shown or not.
2355 * public/v2/index.html: Removed the select element per configuration column. Also moved the select element
2356 for the number of runs as it doesn't belong in the same table as the one that lists repositories and roots.
2358 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
2360 Unreviewed test fixes after r179037, r179591, and r179763.
2362 * tests/admin-regenerate-manifest.js:
2363 * tests/admin-reprocess-report.js:
2365 2015-02-19 Ryosuke Niwa <rniwa@webkit.org>
2367 Relationship between A/B testing results are unclear
2368 https://bugs.webkit.org/show_bug.cgi?id=141810
2370 Reviewed by Andreas Kling.
2372 Show a "reference chart" indicating which two points have been tested in each test group pane.
2374 Now the chart shown at the top of an analysis task page is called the "overview pane", and we use the pane
2375 and the domain used in this chart to show charts in each test group.
2377 Also renamed an array of revisions used in the A/B test results tables from 'revisions' to 'revisionList'.
2379 * public/v2/analysis.js:
2380 (App.TestGroup._fetchTestResults): Renamed from _fetchChartData. Set 'testResults' instead of 'chartData'
2381 since this is the results of A/B testing results, not the data for charts shown next to them.
2383 * public/v2/app.css: Added CSS rules for reference charts.
2386 (App.AnalysisTaskController.paneDomain): Set 'overviewPane' and 'overviewDomain' on each test group pane.
2387 (App.TestGroupPane._populate): Updated per 'chartData' to 'testResults' rename.
2388 (App.TestGroupPane._updateReferenceChart): Get the chart data via the overview pane and find points that
2389 identically matches root sets. If one of configuration used a set of revisions for which no measurement
2390 was made in the original chart, don't show the reference chart as that would be misleading / confusing.
2391 (App.TestGroupPane._computeRepositoryList): Updated per 'chartData' to 'testResults' rename.
2392 (App.TestGroupPane._createConfigurationSummary): Ditto. Also renamed 'revisions' to 'revisionList'.
2393 In addition, renamed 'buildNumber' to 'buildLabel' and prefixed it with "Build ".
2395 * public/v2/data.js:
2396 (Measurement.prototype.revisionForRepository): Added.
2397 (Measurement.prototype.commitTimeForRepository): Cleanup.
2398 (TimeSeries.prototype.findPointByRevisions): Added. Finds a point based on a set of revisions.
2400 * public/v2/index.html: Added the reference chart. Streamlined the status label for each build request
2401 by including the build number in the title attribute instead of in the markup.
2403 * public/v2/interactive-chart.js:
2404 (App.InteractiveChartComponent._updateDomain): Fixed a typo introduced as a consequence of r179913.
2405 (App.InteractiveChartComponent._computeYAxisDomain): Expand the y-axis to show the highlighted points.
2406 (App.InteractiveChartComponent._highlightedItemsChanged): Adjust the y-axis as needed.
2408 2015-02-18 Ryosuke Niwa <rniwa@webkit.org>
2410 Analysis task pages are unusable
2411 https://bugs.webkit.org/show_bug.cgi?id=141786
2413 Reviewed by Andreas Kling.
2415 This patch makes following improvements to analysis task pages:
2416 1. Making the main chart interactive. This change required the use of App.Pane as well as moving the code to
2417 compute the data for the details pane from PaneController.
2418 2. Moving the form to add a new test group to the top of test groups instead of the bottom of them.
2419 3. Grouping the build requests in each test group by root sets instead of the order by which they were ran.
2420 This change required the creation of App.TestGroupPane as well as its methods.
2421 4. Show a box plot for each root set configuration as well as each build request. This change required
2422 App.BoxPlotComponent.
2423 5. Show revisions of each repository (e.g. WebKit) for each root set and build request.
2425 * public/api/build-requests.php:
2426 (main): Update per the rename of BuildRequestsFetcher::root_sets to BuildRequestsFetcher::root_sets_by_id.
2428 * public/api/test-groups.php:
2429 (main): Include root sets and roots in the response.
2430 (format_test_group):
2432 * public/include/build-requests-fetcher.php:
2433 (BuildRequestsFetcher::root_sets_by_id): Renamed from root_sets.
2434 (BuildRequestsFetcher::root_sets): Added.
2435 (BuildRequestsFetcher::roots): Added.
2436 (BuildRequestsFetcher::fetch_roots_for_set): Takes a boolean argument $resolve_ids. This flag is only set to
2437 true in /api/build-requests/ (as done prior to this patch) to use repository names as identifiers since
2438 tools/sync-with-buildbot.py can't convert repository names to their ids.
2440 * public/v2/analysis.js:
2442 (App.RootSet): Added.
2443 (App.RootSet.revisionForRepository): Added.
2444 (App.TestGroup.rootSets): Deleted the code to compute root set ids from build requests now that the JSON
2445 response at /api/test-groups will include them.
2446 (App.BuildRequest): Ditto. Also deleted 'configLetter' property, which has been moved to a proxy created by
2447 _createConfigurationSummary.
2448 (App.BuildRequest.statusLabel): Use 'Completed' as the human readable label for 'completed' status.
2449 (App.BuildRequest.aggregateStatuses): Added. Generates a human readable status for a set of build requests.
2451 * public/v2/app.css: Updated style rules for analysis task pages.
2454 (App.Pane): This class is now used in analysis task pages to make the main chart interactive.
2455 (App.Pane._updateDetails): Moved from App.PaneController.
2457 (App.PaneController._updateCanAnalyze): Updated the code per the move of selectedPoints.
2459 (App.AnalysisTaskController): Added 'details'.
2460 (App.AnalysisTaskController._taskUpdated):
2461 (App.AnalysisTaskController.paneDomain):Renamed from _fetchedRuns.
2462 (App.AnalysisTaskController.updateTestGroupPanes): Added. Creates App.TestGroupPane for each test group.
2463 (App.AnalysisTaskController.actions.toggleShowRequestList): Added.
2465 (App.TestGroupPane): Added.
2466 (App.TestGroupPane._populate): Added. Group build requests by root sets and create a summary for each group.
2467 (App.TestGroupPane._computeRepositoryList): Added. Returns a sorted list of repositories which is the union
2468 of all repositories appearing in root sets and builds associated with A/B testing results.
2469 (App.TestGroupPane._groupRequestsByConfigurations): Added. Groups build requests by root sets.
2470 (App.TestGroupPane._createConfigurationSummary): Added. Creates a summary for a group of build requests that
2471 use the same root set. We start by wrapping "raw" build requests in a proxy with formatted values,
2472 build numbers, etc... obtained from the fetched chart data. The list of revisions shown in the group summary
2473 is a union of revisions in the root set and the first build request in the group. We null-out revision info
2474 for a build request if it is identical to the one in the summary. The range of values is expanded as needed
2475 by the values in the group as well as 95% percentile confidence interval.
2477 (App.BoxPlotComponent): Added. Controls a box plot shown for each test group summary and build request.
2478 (App.BoxPlotComponent.didInsertElement): Added. Inserts a SVG element as well as two indicator rects to show
2479 the mean and the confidence interval.
2480 (App.BoxPlotComponent._updateBars): Added. Updates the dimensions of the indicator rects.
2481 (App.BoxPlotComponent.valueChanged): Added. Computes the relative dimensions of the indicator rects and
2482 calls _updateBars to update the rects.
2484 * public/v2/chart-pane.css: Added some style rules to be used in the details pane in analysis task pages.
2486 * public/v2/data.js:
2487 (Measurement.prototype.formattedRevisions):
2488 (Measurement.formatRevisionRange): Renamed from Measurement.prototype._formatRevisionRange so that it can be
2489 called in _createConfigurationSummary.
2491 * public/v2/index.html: Updated the templates for analysis task pages. Moved the form to create a new test
2492 group above all test groups, and replaced the list of data points by "details" pane used in the charts page.
2493 Also made the fetching of chartData no longer block showing of test groups.
2495 * public/v2/interactive-chart.js:
2496 (App.InteractiveChartComponent._updateDomain): Added an early exit to fix a newly revealed race condition.
2497 (App.InteractiveChartComponent._domainChanged): Ditto.
2498 (App.InteractiveChartComponent._updateSelectionToolbar): Made it respect 'zoomable' boolean property.
2500 * public/v2/js/statistics.js:
2501 (Statistics.min): Added.
2502 (Statistics.max): Added.
2504 * public/v2/manifest.js:
2505 (App.Manifest.fetchRunsWithPlatformAndMetric): Added formatWithDeltaAndUnit to be used in _createConfigurationSummary.
2507 2015-02-14 Ryosuke Niwa <rniwa@webkit.org>
2509 Build URL on new perf dashboard doesn't resolve $builderName
2510 https://bugs.webkit.org/show_bug.cgi?id=141583
2512 Reviewed by Darin Adler.
2514 Support $builderName in the build URL template.
2516 * public/js/helper-classes.js:
2517 (TestBuild.buildUrl): Replaced $builderName with the builder name.
2519 * public/v2/manifest.js:
2520 (App.Metric.fullName): Fixed the typo. We need &ni, not &in.
2521 (App.BuilderurlFromBuildNumber): Replaced $builderName with the builder name.
2523 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
2525 Unreviewed build fix after r179591.
2527 * public/api/commits.php:
2529 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
2531 The status of a A/B testing request always eventually becomes "Failed"
2532 https://bugs.webkit.org/show_bug.cgi?id=141523
2534 Reviewed by Andreas Kling.
2536 The bug was caused by /api/build-requests always setting the status of a build request to 'failed' when
2537 'failedIfNotCompleted' was sent by the buildbot sync'er.
2539 Fixed the bug by only setting the status to 'failed' if it wasn't set to 'completed'.
2541 * public/api/build-requests.php:
2544 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
2546 Unreviewed, remove empty directories.
2548 * public/data: Removed.
2550 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
2552 Perf dashboard should show the results of A/B testing
2553 https://bugs.webkit.org/show_bug.cgi?id=141500
2555 Reviewed by Chris Dumez.
2557 Added the support for fetching test_runs for a specific test group in /api/runs/, and used it in the
2558 analysis task page to fetch results for each test group.
2560 Merged App.createChartData into App.Manifest.fetchRunsWithPlatformAndMetric so that App.BuildRequest
2561 can use the formatter.
2563 * public/api/runs.php:
2564 (fetch_runs_for_config_and_test_group): Added.
2565 (fetch_runs_for_config): Just return the fetched rows since main will format them with RunsGenerator.
2566 (main): Use fetch_runs_for_config_and_test_group to fetch rows when a test group id is specified. Also
2567 use RunsGenerator to format results.
2568 (RunsGenerator): Added.
2569 (RunsGenerator::__construct): Added.
2570 (RunsGenerator::add_runs): Added.
2571 (RunsGenerator::format_run): Moved.
2572 (RunsGenerator::parse_revisions_array): Moved.
2574 * public/v2/analysis.js:
2575 (App.TestGroup): Fixed a typo. The property on a test group that refers to an analysis task is "task".
2576 (App.TestGroup._fetchChartData): Added. Fetches all A/B testing results for this group.
2577 (App.BuildRequest.configLetter): Renamed from config since this returns a letter that identifies the
2578 configuration associated with this build request such as "A" and "B".
2579 (App.BuildRequest.statusLabel): Added the missing label for failed build requests.
2580 (App.BuildRequest.url): Added. Returns the URL associated with this build request.
2581 (App.BuildRequest._meanFetched): Added. Retrieve the mean and the build number for this request via
2585 (App.Pane._fetch): Set chartData directly here.
2586 (App.Pane._updateMovingAverageAndEnvelope): Renamed from _computeChartData. No longer sets chartData
2587 now that it's done in App.Pane._fetch.
2588 (App.AnalysisTaskController._fetchedRuns): Updated per createChartData merge.
2590 * public/v2/data.js:
2591 (Measurement.prototype.buildId): Added.
2592 (TimeSeries.prototype.findPointByBuild): Added.
2594 * public/v2/index.html: Fixed a bug that build status URL was broken. We can't use link-to helper since
2595 url is not an Ember routed path.
2597 * public/v2/manifest.js:
2598 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes testGroupId as the third argument. Merged
2599 App.createChartData here so that App.BuildRequest can use the formatter
2601 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
2603 v2 UI should adjust the number of ticks on dashboards based on screen size
2604 https://bugs.webkit.org/show_bug.cgi?id=141502
2606 Reviewed by Chris Dumez.
2608 * public/v2/interactive-chart.js:
2609 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Compute the number of ticks based on the
2612 2015-02-11 Ryosuke Niwa <rniwa@webkit.org>
2614 New perf dashboard shows too much space around interesting data points
2615 https://bugs.webkit.org/show_bug.cgi?id=141487
2617 Reviewed by Chris Dumez.
2619 Revise the y-axis range adjustment algorithm in r179913. Instead of showing the entire moving average,
2620 show the current time series excluding points in the series outside the moving average envelope.
2623 (App.Pane._computeChartData): Don't deal with missing moving average or enveloping strategy here.
2624 (App.Pane._computeMovingAverageAndOutliers): Set isOutliner to true on all data points in the current
2625 time series if the point lies outside the moving average envelope. Don't expose the moving average or
2626 the envelope computed for this purpose if they're not set by the user.
2628 * public/v2/data.js:
2629 (TimeSeries.prototype.minMaxForTimeRange): Takes a boolean argument, ignoreOutlier. When the flag is set
2630 to true, min/max computation will ignore any point in the series with non-falsy "isOutliner" property.
2632 * public/v2/interactive-chart.js:
2633 (App.InteractiveChartComponent._constructGraphIfPossible): Unsupport hideMovingAverage and hideEnvelope.
2634 (App.InteractiveChartComponent._computeYAxisDomain): Removed the commented out code. Also moved the code
2635 to deal with showFullYAxis here.
2636 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Rewrote the code. Takes ignoreOutliners as an
2637 argument instead of directly inspecting showFullYAxis.
2639 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
2641 New perf dashboard shouldn't always show outliners
2642 https://bugs.webkit.org/show_bug.cgi?id=141445
2644 Reviewed by Chris Dumez.
2646 Use the simple moving average with an average difference envelope to compute the y-axis range to show
2647 to avoid expanding it spuriously to show one off outlier.
2650 (App.Pane): Don't show the full y-axis range by default.
2651 (App.Pane._computeChartData): Use the first strategies for the moving average and the enveloping if
2652 one is not specified by the user but without showing them in the charts.
2653 (App.Pane._computeMovingAverage): Takes moving average and enveloping strategies as arguments instead
2654 of retrieving via chosenMovingAverageStrategy and chosenEnvelopingStrategy.
2656 (App.ChartsController._parsePaneList): Added showFullYAxis as a query string argument to each pane.
2657 (App.ChartsController._serializePaneList): Ditto.
2659 * public/v2/chart-pane.css: Added a CSS rule for when y-axis is clickable.
2661 * public/v2/index.html: Pass in showFullYAxis as an argument to the main interactive chart.
2663 * public/v2/interactive-chart.js:
2664 (App.InteractiveChartComponent._constructGraphIfPossible): Add an event listener on y-axis labels when
2665 the chart is interactive so that toggle showFullYAxis. Also hide the moving average and/or the envelope
2666 if they are not specified by the user (i.e. only used to adjust y-axis range).
2667 (App.InteractiveChartComponent._updateDomain): Don't exit early if y-axis domains are different even if
2668 x-axis domain remained the same. Without this change, the charts would never redraw.
2669 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Use the moving average instead of the current
2670 time series to compute the y-axis range if showFullYAxis is false. When showFullYAxis is true, expand
2671 y-axis all the way down to 0 or the minimum value in the current time series whichever is smaller.
2673 * public/v2/js/statistics.js:
2674 (Statistics.MovingAverageStrategies): Use a wider window in Simple Moving Average by default.
2676 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
2678 Unreviewed build fix.
2681 (set get App.Pane.Ember.Object.extend):
2683 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
2685 New perf dashboard should have the ability to overlay moving average with an envelope
2686 https://bugs.webkit.org/show_bug.cgi?id=141438
2688 Reviewed by Andreas Kling.
2690 This patch adds three kinds of moving average strategies and two kinds of enveloping strategies:
2692 Simple Moving Average - The moving average x̄_i of x_i is computed as the arithmetic mean of values
2693 from x_(i - n) though x_(i + m) where n is a non-negative integer and m is a positive integer. It takes
2694 n, backward window size, and m, forward window size, as an argument.
2696 Cumulative Moving Average - x̄_i is computed as the arithmetic mean of all values x_0 though x_i.
2697 That is, x̄_1 = x_1 and x̄_i = ((i - 1) * M_(i - 1) + x_i) / i for all i > 1.
2699 Exponential Moving Average - x̄_i is computed as the weighted average of x_i and x̄_(i - 1) with α as
2700 an argument specifying x_i's weight. To be precise, x̄_1 = x_1 and x̄_i = α * x_i + (α - 1) x̄_(i-1).
2703 Average Difference - The enveloping delta d is computed as the arithmetic mean of the difference
2704 between each x_i and x̄_i.
2706 Moving Average Standard Deviation - d is computed like the standard deviation except the deviation
2707 for each term is measured from the moving average instead of the sample arithmetic mean. i.e. it uses
2708 the average of (x_i - x̄_i)^2 as the "sample variance" instead of the conventional (x_i - x̄)^2 where
2709 x̄ is the sample mean of all x_i's. This change was necessary since our time series is non-stationary.
2712 Each strategy is cloned for an App.Pane instance so that its parameterList can be configured per pane.
2713 The configuration of the currently chosen strategies is saved in the query string for convenience.
2715 Also added the "stat pane" to choose a moving average strategy and a enveloping strategy in each pane.
2717 * public/v2/app.css: Specify the fill color for all SVG groups in the pane toolbar icons.
2720 (App.Pane._fetch): Delegate the creation of 'chartData' to _computeChartData.
2721 (App.Pane.updateStatisticsTools): Added. Clones moving average and enveloping strategies for this pane.
2722 (App.Pane._cloneStrategy): Added. Clones a strategy for a new pane.
2723 (App.Pane._configureStrategy): Added. Finds and configures a strategy from the configuration retrieved
2724 from the query string via ChartsController.
2725 (App.Pane._computeChartData): Added. Creates chartData from fetchedData.
2726 (App.Pane._computeMovingAverage): Added. Computes the moving average and the envelope.
2727 (App.Pane._executeStrategy): Added.
2728 (App.Pane._updateStrategyConfigIfNeeded): Pushes the strategy configurations to the query string via
2730 (App.ChartsController._parsePaneList): Merged the query string arguments for the range and point
2731 selections, and added two new arguments for the moving average and the enveloping configurations.
2732 (App.ChartsController._serializePaneList): Ditto.
2733 (App.ChartsController._scheduleQueryStringUpdate): Observes strategy configurations.
2734 (App.PaneController.actions.toggleBugsPane): Hides the stat pane.
2735 (App.PaneController.actions.toggleSearchPane): Hides the stat pane.
2736 (App.PaneController.actions.toggleStatPane): Added.
2738 * public/v2/chart-pane.css: Added CSS rules for the new stat pane. Also added .foreground class for the
2739 current (as opposed to baseline and target) time series for when it's the most foreground graph without
2740 moving average and its envelope overlapping on top of it.
2742 * public/v2/index.html: Added the templates for the stat pane and the corresponding icon (Σ).
2744 * public/v2/interactive-chart.js:
2745 (App.InteractiveChartComponent.chartDataDidChange): Unset _totalWidth and _totalHeight to avoid exiting
2746 early inside _updateDimensionsIfNeeded when chartData changes after the initial layout.
2747 (App.InteractiveChartComponent.didInsertElement): Attach event listeners here instead of inside
2748 _constructGraphIfPossible since that could be called multiple times on the same SVG element.
2749 (App.InteractiveChartComponent._constructGraphIfPossible): Clear down the old SVG element we created
2750 but don't bother removing individual paths and circles. Added the code to show the moving average time
2751 series when there is one. Also add "foreground" class on SVG elements for the current time series when
2752 we're not showing the moving average. chart-pane.css has been updated to "dim down" the current time
2753 series when "foreground" is not set.
2754 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Take the moving average time series into
2755 account when computing the y-axis range.
2756 (App.InteractiveChartComponent._brushChanged): Removed 'selectionIsLocked' argument as it's useless.
2758 * public/v2/js/statistics.js:
2759 (Statistics.MovingAverageStrategies): Added.
2760 (Statistics.EnvelopingStrategies): Added.
2762 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2764 The delta value in the chart pane sometimes doens't show '+' for a positive delta
2765 https://bugs.webkit.org/show_bug.cgi?id=141340
2767 Reviewed by Andreas Kling.
2769 The bug was caused by computeStatus prefixing the value delta with '+' if it's greater than 0 after
2770 it had already been formatted. Fixed the bug by using a formatter that always emits a sign symbol.
2773 (App.Pane.computeStatus):
2774 (App.createChartData):
2776 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2778 Unreviewed build fix. currentPoint wasn't defined when selectedPoints was used to find points.
2781 (App.PaneController._updateDetails):
2783 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2785 Unreviewed. Commit the forgotten change.
2787 * public/include/manifest.php:
2789 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
2791 New perf dashboard should have multiple dashboard pages
2792 https://bugs.webkit.org/show_bug.cgi?id=141339
2794 Reviewed by Chris Dumez.
2796 Added the support for multiple dashboard pages. Also added the status of the latest data point.
2797 e.g. "5% better than target"
2799 * public/v2/app.css: Tweaked the styles to work around the fact Ember.js creates empty script elements.
2800 Also hid the border lines around charts on the dashboard page for a cleaner look.
2803 (App.IndexRoute): Added. Navigate to /dashboard/<defaultDashboardName> once the manifest.json is loaded.
2804 (App.IndexRoute.beforeModel): Added.
2805 (App.DashboardRoute): Added.
2806 (App.DashboardRoute.model): Added. Return the dashboard specified by the name.
2807 (App.CustomDashboardRoute): Added. This route is used for a customized dashboard specified by "grid".
2808 (App.CustomDashboardRoute.model): Create a dashboard model from "grid" query parameter.
2809 (App.CustomDashboardRoute.renderTemplate): Use the dashboard template.
2810 (App.DashboardController): Renamed from App.IndexController.
2811 (App.DashboardController.modelChanged): Renamed from gridChanged. Removed the code to deal with "grid"
2812 and "defaultDashboard" as these are taken care of by newly added routers.
2813 (App.DashboardController.computeGrid): Renamed from updateGrid. No longer updates "grid" since this is
2814 now done in actions.toggleEditMode.
2815 (App.DashboardController.actions.toggleEditMode): Navigate to CustomDashboardRoute when start editing
2816 an existing dashboard.
2818 (App.Pane.computeStatus): Moved from App.PaneController so that to be called in App.Pane.latestStatus.
2819 Also moved the code to compute the delta with respect to the previous data point from _updateDetails.
2820 (App.Pane._relativeDifferentToLaterPointInTimeSeries): Ditto.
2821 (App.Pane.latestStatus): Added. Used by the dashboard template to show the status of the latest result.
2823 (App.createChartData): Added deltaFormatter to show less significant digits for differences.
2825 (App.PaneController._updateDetails): Updated per changes to computeStatus.
2827 * public/v2/chart-pane.css: Added style rules for the status labels on the dashboard.
2829 * public/v2/data.js:
2830 (TimeSeries.prototype.lastPoint): Added.
2832 * public/v2/index.html: Prefetch manifest.json as soon as possible, show the latest data points' status
2833 on the dashboard, and enumerate all predefined dashboards.
2835 * public/v2/interactive-chart.js:
2836 (App.InteractiveChartComponent._relayoutDataAndAxes): Slightly adjust the offset at which we show unit
2837 for the dashboard page.
2839 * public/v2/manifest.js:
2840 (App.Dashboard): Inherit from App.NameLabelModel now that each predefined dashboard has a name.
2841 (App.MetricSerializer.normalizePayload): Parse all predefined dashboards instead of a single dashboard.
2842 IDs are generated for each dashboard for forward compatibility.
2844 (App.Manifest.dashboardByName): Added.
2845 (App.Manifest.defaultDashboardName): Added.
2846 (App.Manifest._fetchedManifest): Create dashboard model objects for all predefined ones.
2848 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2850 Move commits viewer to the end of details view
2851 https://bugs.webkit.org/show_bug.cgi?id=141315
2853 Rubber-stamped by Andreas Kling.
2855 Show the difference instead of the old value per kling's request.
2858 (App.PaneController._updateDetails):
2859 * public/v2/index.html:
2861 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2863 Move commits viewer to the end of details view
2864 https://bugs.webkit.org/show_bug.cgi?id=141315
2866 Reviewed by Andreas Kling.
2868 Improved the way list of commits are shown per kling's request.
2871 (App.PaneController._updateDetails): Always show the old value even when a single point is selected.
2873 * public/v2/chart-pane.css: Updated the style for the commits viewer.
2875 * public/v2/commits-viewer.js:
2876 (App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
2877 (App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.
2879 * public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
2880 moved the commits viewers out of the details tables so that they don't interleave revision data.
2882 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2884 New perf dashboard should compare results to baseline and target
2885 https://bugs.webkit.org/show_bug.cgi?id=141286
2887 Reviewed by Chris Dumez.
2889 Compare the selected value against baseline and target values as done in v1. e.g. "5% below target"
2890 Also use d3.format to format the selected value to show four significant figures.
2893 (App.Pane.searchCommit):
2894 (App.Pane._fetch): Create time series here via createChartData so that _computeStatus can use them
2895 to compute the status text without having to recreate them.
2896 (App.createChartData): Added.
2897 (App.PaneController._updateDetails): Use 3d.format on current and old values.
2898 (App.PaneController._computeStatus): Added. Computes the status text.
2899 (App.PaneController._relativeDifferentToLaterPointInTimeSeries): Added.
2900 (App.AnalysisTaskController._fetchedManifest): Use createChartData as done in App.Pane._fetch. Also
2901 format the values using chartData.formatter.
2903 * public/v2/chart-pane.css: Enlarge the status text. Show the status text in red if it's worse than
2904 the baseline and in blue if it's better than the target.
2906 * public/v2/data.js:
2907 (TimeSeries.prototype.findPointAfterTime): Added.
2909 * public/v2/index.html: Added a new tbody for the status text and the selected value. Also fixed
2910 the bug that we were not showing the old value's unit.
2912 * public/v2/interactive-chart.js:
2913 (App.InteractiveChartComponent._constructGraphIfPossible): Use chartData.formatter. Also cleaned up
2914 the code to show the baseline and the target lines.
2916 * public/v2/manifest.js:
2917 (App.Manifest.fetchRunsWithPlatformAndMetric): Added smallerIsBetter.
2919 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
2921 Unreviewed build fix.
2924 (App.IndexController.gridChanged): Use store.createRecord to create a custom dashboard as required by Ember.js
2926 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2928 New perf dashboard doesn't preserve the number of days when clicking on a dashboard chart
2929 https://bugs.webkit.org/show_bug.cgi?id=141280
2931 Reviewed by Chris Dumez.
2933 Fixed the bug by passing in "since" as a query parameter to the charts page.
2935 Also fixed the styling issue that manifests when a JSON fetching fails on "Dashboard" page.
2937 * public/v2/app.css: Fixed CSS rules for error messages shown in the place of charts.
2939 (App.IndexController): Changed the default number of days from one month to one week.
2940 (App.IndexController._sharedDomainChanged): Set "since" property on the controller.
2941 * public/v2/index.html: Pass in "since" property on the controller as a query parameter.
2943 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2945 New perf dashboard erroneously clears zoom when poping history items
2946 https://bugs.webkit.org/show_bug.cgi?id=141278
2948 Reviewed by Chris Dumez.
2950 The bug was caused by _sharedZoomChanged updating overviewSelection without updating mainPlotDomain.
2952 Updating overviewSelection resulted in _overviewSelectionChanged, which observes changes to overviewSelection,
2953 to schedule a call to propagateZoom, which in turn overrode "sharedZoom" we just parsed from the query string.
2956 (App.PaneController._overviewSelectionChanged): Don't schedule propagateZoom if the selected domain is already
2957 shown in the main plot.
2958 (App.PaneController._sharedZoomChanged): Set both overviewSelection and mainPlotDomain to avoid overriding
2959 "sharedZoom" via propagateZoom inside _overviewSelectionChanged.
2961 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2963 New perf dashboard shows null as the aggregator name if no aggregation is done
2964 https://bugs.webkit.org/show_bug.cgi?id=141256
2966 Reviewed by Chris Dumez.
2968 Don't show the aggregator name if there isn't one.
2970 * public/v2/manifest.js:
2973 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2975 Unreviewed build fix after r179611.
2977 * public/v2/interactive-chart.js:
2979 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
2981 Perf dashboard doesn’t show the right unit for Safari UI tests
2982 https://bugs.webkit.org/show_bug.cgi?id=141238
2984 Reviewed by Darin Adler.
2986 Safari UI tests use custom metrics that end with "Time". This patch teaches the perf dashboard how to
2987 get the unit for a given metric based on the suffix of the metric name instead of hard-coding the mapping
2988 between metrics and their units.
2990 * public/js/helper-classes.js:
2991 (PerfTestRuns): Use the suffix of the metric name to compute the unit.
2992 * public/v2/manifest.js:
2993 (App.Manifest.fetchRunsWithPlatformAndMetric): Ditto. Also set "useSI" property iff for "bytes".
2994 * public/v2/interactive-chart.js:
2995 (App.InteractiveChartComponent._constructGraphIfPossible): Respect useSI. Use toPrecision(3) otherwise.
2996 (App.InteractiveChartComponent._relayoutDataAndAxes): Place the unit vertically on the left of ticks.
2998 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
3000 Interactive chart component provides two duplicate API for highlighting points
3001 https://bugs.webkit.org/show_bug.cgi?id=141234
3003 Reviewed by Chris Dumez.
3005 Prior to this patch, the interactive chart component supported highlightedItems for finding commits
3006 on the main charts page and markedPoints to show the two end points in the analysis task page.
3008 This patch merges markedPoints into highlightedItems.
3011 (App.AnalysisTaskController._fetchedRuns): Use highlightedItems.
3012 * public/v2/chart-pane.css:
3013 * public/v2/index.html: Ditto.
3014 * public/v2/interactive-chart.js:
3015 (App.InteractiveChartComponent._constructGraphIfPossible): Make this._highlights an array instead of
3016 array of arrays. Also call _highlightedItemsChanged at the end to fix the bug that we never highlight
3017 items if highlightedItems was set before the initial layout.
3018 (App.InteractiveChartComponent._relayoutDataAndAxes):
3019 (App.InteractiveChartComponent._updateHighlightPositions): Now that highlights are circles instead of
3020 vertical lines, just set cx and cy as done for other "dots".
3021 (App.InteractiveChartComponent._highlightedItemsChanged): Exit early only if _clippedContainer wasn't
3022 already set; i.e. _constructGraphIfPossible hasn't been called. Also updated the logic to accommodate
3023 the fact this._highlights is an array of elements instead of an array of arrays of elements. Finally,
3024 set the radius of highlight circles here.
3026 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
3028 Don’t use repository names as id’s.
3029 https://bugs.webkit.org/show_bug.cgi?id=141226
3031 Reviewed by Chris Dumez.
3033 Not using repository names as their id's reduces the need to fetch the entire repositories table.
3034 Since names of repositories are available in manifest.json, we can resolve their names in the front end.
3036 * Websites/perf.webkit.org/public/api/runs.php:
3037 (parse_revisions_array): No longer uses $repository_id_to_name.
3038 (main): No longer populates $repository_id_to_name.
3040 * Websites/perf.webkit.org/public/api/triggerables.php:
3041 (main): Don't resolve repository names.
3043 * Websites/perf.webkit.org/public/include/manifest.php:
3044 (ManifestGenerator::repositories): Use repositories ids as keys in the result and include their names.
3045 (ManifestGenerator::bug_trackers): Don't resolve repository names.
3047 * Websites/perf.webkit.org/public/js/helper-classes.js:
3048 (TestBuild): Renamed repositoryName to repositoryId.
3049 (TestBuild.revision): Ditto.
3050 (TestBuild.formattedRevisions): Ditto. Continue to use the repository name in the formatted result
3051 since this is the text shown to human.
3053 * Websites/perf.webkit.org/public/v2/app.js:
3054 (App.pane.searchCommit): Renamed repositoryName to repositoryId.
3055 (App.PaneController._updateDetails): Ditto.
3056 (App.AnalysisTaskController.updateRoots): Ditto.
3058 * Websites/perf.webkit.org/public/v2/data.js:
3059 (Measurement): Ditto.
3060 (Measurement.prototype.commitTimeForRepository): Ditto.
3061 (Measurement.prototype.formattedRevisions): Ditto.
3063 * Websites/perf.webkit.org/public/v2/index.html: Use the repository name and the repository id as
3064 select element's label and value respectively.
3066 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
3068 Unreviewed build fix. Declare $repository_id_to_name in the global scope.
3070 * public/api/runs.php:
3072 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
3074 /api/runs.php should have main function
3075 https://bugs.webkit.org/show_bug.cgi?id=141220
3077 Reviewed by Benjamin Poulain.
3079 Wrapped the code inside main function for clarity.
3081 * public/api/runs.php:
3083 2015-01-27 Ryosuke Niwa <rniwa@webkit.org>
3085 Unreviewed build fix. "eta" isn't set on a in-progress build on a newly added builder.
3087 * tools/sync-with-buildbot.py:
3088 (find_request_updates):
3090 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
3092 Perf dashboard always assigns the result of A/B testing with build request 1
3093 https://bugs.webkit.org/show_bug.cgi?id=140382
3095 Reviewed by Darin Adler.
3097 The bug was caused by the expression array_get($report, 'jobId') or array_get($report, 'buildRequest')
3098 which always evaluated to 1 when the report contained jobId. Fixed the bug by cascading array_get instead.
3100 Also fixed a typo as well as a bug that reports were never associated with builds.
3102 * public/include/report-processor.php:
3103 (ReportProcessor::process): Don't use "or" to find the non-null value since that always evaluates to 1
3104 instead of the first non-null value.
3105 (ReportProcessor::resolve_build_id): Fixed the typo by adding the missing "$this->".
3106 (ReportProcessor::commit): Associate the report with the corresponding build as intended.
3108 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
3110 Unreviewed typo fix. The prefix in triggerable_configurations is "trigconfig", not "trigrepo".
3112 * public/admin/tests.php:
3114 2015-01-10 Ryosuke Niwa <rniwa@webkit.org>
3116 Unreviewed build fix. Removed the stale code.
3118 * public/admin/triggerables.php:
3120 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
3122 Perf dashboard should have the ability to post A/B testing builds
3123 https://bugs.webkit.org/show_bug.cgi?id=140317
3125 Rubber-stamped by Simon Fraser.
3127 This patch adds the support for triggering A/B testing from the perf dashboard.
3129 We add a few new tables to the database. "build_triggerables", which represents a set of builders
3130 that accept A/B testing. "triggerable_repositories" associates each "triggerable" with a fixed set
3131 of repositories for which an arbitrary revision can be specified for A/B testing.
3132 "triggerable_configurations" specifies a triggerable available on a given test on a given platform.
3133 "roots" table which specifies the revision used in a given root set in each repository.
3135 * init-database.sql: Added "build_triggerables", "triggerable_repositories",
3136 "triggerable_configurations", and "roots" tables. Added references to "build_triggerables",
3137 "platforms", and "tests" tables as well as columns to store status, status url, and creation time
3138 to build_requests table. Also made each test group's name unique in a given analysis task as it
3139 would be confusing to have multiple test groups of the same name.
3141 * public/admin/tests.php: Added the UI and the code to associate a test with a triggerable.
3143 * public/admin/triggerables.php: Added. Manages the list of triggerables as well as repositories
3144 for which a specific revision can be set in an A/B testing on a given triggerable.
3146 * public/api/build-requests.php: Added. Returns the list of open build requests on a specified
3147 triggerable. Also updates the status' and the status urls of specified build requests when
3148 buildRequestUpdates is provided in the raw POST data.
3151 * public/api/runs.php:
3152 (fetch_runs_for_config): Don't include results associated with a build request, meaning they are
3153 results of an A/B testing.
3155 * public/api/test-groups.php:
3156 (main): Use the newly added BuildRequestsFetcher. Also merged fetch_test_groups_for_task back.
3158 * public/api/triggerables.php: Added.
3159 (main): Returns a list of triggerables or a triggerable associated with a given analysis task.
3161 * public/include/admin-header.php:
3163 * public/include/build-requests-fetcher.php: Added. Extracted from public/api/test-groups.php.
3164 (BuildRequestsFetcher): This class abstracts the process of fetching a list of builds requests
3165 and root sets used in those requests.D
3166 (BuildRequestsFetcher::__construct):
3167 (BuildRequestsFetcher::fetch_for_task):
3168 (BuildRequestsFetcher::fetch_for_group):
3169 (BuildRequestsFetcher::fetch_incomplete_requests_for_triggerable):
3170 (BuildRequestsFetcher::has_results):
3171 (BuildRequestsFetcher::results):
3172 (BuildRequestsFetcher::results_with_resolved_ids):
3173 (BuildRequestsFetcher::results_internal):
3174 (BuildRequestsFetcher::root_sets):
3175 (BuildRequestsFetcher::fetch_roots_for_set):
3177 * public/include/db.php:
3178 (Database::prefixed_column_names): Don't return "$prefix_" when there are no columns.
3179 (Database::insert_row): Support taking an empty array for values. This is useful in "root_sets"
3180 table since it only has the primary key, id, column.
3181 (Database::select_or_insert_row):
3182 (Database::update_or_insert_row):
3183 (Database::update_row): Added.
3184 (Database::_select_update_or_insert_row): Takes an extra argument specifying whether a new row
3185 should be inserted when no row matches the specified criteria. This is used while updating
3186 build_requests' status and url in public/api/build-requests.php since we shouldn't be inserting
3187 new build requests in that API.
3188 (Database::select_rows): Also use "1 == 1" in the select query when the query criteria is empty.
3189 This is used in public/api/triggerables.php when no analysis task is specified.
3191 * public/include/json-header.php:
3192 (find_triggerable_for_task): Added. Finds a triggerable available on a given test. We return the
3193 triggerable associated with the closest ancestor of the test. Since issuing a new query for each
3194 ancestor test is expensive, we retrieve triggerable for all ancestor tests at once and manually
3195 find the closest ancestor with a triggerable.
3197 * public/include/report-processor.php:
3198 (ReportProcessor::process):
3199 (ReportProcessor::resolve_build_id): Associate a build request with the newly created build
3200 if jobId or buildRequest is specified.
3202 * public/include/test-name-resolver.php:
3203 (TestNameResolver::map_metrics_to_tests): Store the entire metric row instead of its name so that
3204 test_exists_on_platform can use it. The last diff in public/admin/tests.php adopts this change.
3205 (TestNameResolver::test_exists_on_platform): Added. Returns true iff the test has ever run on
3208 * public/include/test-path-resolver.php: Added.
3209 (TestPathResolver): This class abstracts the ancestor chains of a test. It retrieves the entire
3210 "tests" table to do this since there could be arbitrary number of ancestors for a given test.
3211 This class is a lot more lightweight than TestNameResolver, which retrieves a whole bunch of tables
3212 in order to compute full test metric names.
3213 (TestPathResolver::__construct):
3214 (TestPathResolver::ancestors_for_test): Returns the ordered list of ancestors from the closest to
3215 the highest (a test without a parent).
3216 (TestPathResolver::path_for_test): Returns a test "path", the ordered list of test names from
3217 the highest ancestor to the test itself.
3218 (TestPathResolver::ensure_id_to_test_map): Fetches "tests" table to construct id_to_test_map.
3220 * public/privileged-api/create-test-group.php: Added. An API to create A/B testing groups.
3222 (commit_sets_from_root_sets): Given a dictionary of repository names to a pair of revisions
3223 for sets A and B respectively, returns a pair of arrays, each of which contains the corresponding
3224 set of "commits" for sets A and B respectively. e.g. {"WebKit": [1, 2], "Safari": [3, 4]} will
3225 result in [[WebKit commit at r1, Safari commit at r3], [WebKit commit at r2, Safari commit at r4]].