1 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
3 Allow custom revisions to be specified in A/B testing
4 https://bugs.webkit.org/show_bug.cgi?id=149905
6 Reviewed by Chris Dumez.
8 Allow custom revision number on each "repository" when creating a test group.
11 (form .analysis-group [name=customValue]): Added.
14 (App.AnalysisTaskController._createConfiguration): Added "Custom" as a revision option.
15 Also added point labels such as (point 3) on "None" for when some points are missing revision info.
16 (App.AnalysisTaskController._labelForPoints): Extracted from _createConfiguration.
17 (App.AnalysisTaskController.actions.createTestGroup): Respect the custom revision number when custom
18 revision option is selected.
20 * public/v2/index.html: Added a text field for specifying a custom revision number.
22 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
24 Make the site name configurable in perf dashboard
25 https://bugs.webkit.org/show_bug.cgi?id=149894
27 Reviewed by Chris Dumez.
29 Added "siteTitle" as a new configuration key to specify the site name.
31 * public/include/db.php:
32 (config): Now takes the default value as an argument.
33 * public/include/manifest.php:
34 (ManifestGenerator::generate): Include siteTitle in the manifest.
35 * public/index.html: Update the title and the heading when the manifest is loaded.
36 * public/v2/index.html: Use App.Manifest.siteTitle as the heading. document.title needs to be updated manually.
37 * public/v2/manifest.js:
38 (App.MetricSerializer.normalizePayload): Update document.title and App.Manifest.siteTitle.
40 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
42 Perf dashboard doesn't show analysis tasks anchored at outliers
43 https://bugs.webkit.org/show_bug.cgi?id=149870
45 Reviewed by Chris Dumez.
47 The bug was caused by the computation of start and end times of analysis tasks being dependent on
48 time series provided to the interactive chart component even though they are already filtered.
50 Since the interactive chart component shouldn't be messing with the underlying data models, moved
51 the code to compute start and end times to App.Pane, to where it belongs, and made the moved code use
52 the unfiltered time series newly exposed on ChartData.
54 Also fixed a bug in fetch-from-remote.php which resulted in Ember endlessly fetching same JSON files.
56 * public/admin/fetch-from-remote.php:
57 (.): Use the full request URI for HTTP requests and caching. Otherwise, we're going to mix up caches
58 and Ember can start hanging browsers (took me three hours to debug this).
61 (App.Pane._showOutlierChanged): Added. Resets chartData when showOutlier flag has been changed.
62 (App.Pane.fetchAnalyticRanges): The old code wasn't filtering analysis tasks by platforms and metrics
63 at all since it relied on the server-side REST API to do the filtering, which I haven't implemented yet.
64 Filter the results manually instead.
65 (App.Pane.ranges): Moved the logic to compute startTime and endTime here from InteractiveChartComponent.
66 (App.PaneController.toggleShowOutlier): Now that App.Pane responds to showOutlier changes, we don't
67 need to call a private method on it.
68 (App.AnalysisTaskController._chartDataChanged): When end points are not found, try showing outliers.
69 This will cause chartData to be modified so just exit early and wait for getting called again.
71 * public/v2/interactive-chart.js:
72 (App.InteractiveChartComponent._rangesChanged): The code to compute start and end time has been moved
75 * public/v2/manifest.js:
76 (App.Manifest._formatFetchedData): Added unfiltered time series as new properties as they are now used
77 to compute the end points of analysis tasks when their end points are outliers.
79 2015-10-07 Ryosuke Niwa <rniwa@webkit.org>
81 Unreviewed. Fix a typo in r190645.
83 * public/include/db.php:
85 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
87 V2 UI shouldn't sort dashboards lexicologically
88 https://bugs.webkit.org/show_bug.cgi?id=149856
90 Reviewed by Chris Dumez.
92 Don't sort the dashboards by name in App.Manifest.
95 (App.IndexRoute.beforeModel): Don't transition to "undefined" (string) dashboard.
96 * public/v2/manifest.js:
97 (App.Manifest.._fetchedManifest):
99 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
101 V2 UI fails to show the data for the very first point in charts
102 https://bugs.webkit.org/show_bug.cgi?id=149857
104 Reviewed by Chris Dumez.
106 The bug was caused by seriesBetweenPoints returning null for when point.seriesIndex is 0.
107 Explicitly check the type of this property instead.
110 (TimeSeries.prototype.seriesBetweenPoints):
112 2015-10-06 Ryosuke Niwa <rniwa@webkit.org>
114 Perf dashboard should have the capability to test local UI with production data
115 https://bugs.webkit.org/show_bug.cgi?id=149834
117 Reviewed by Chris Dumez.
119 Added tools/run-with-remote-server.py which runs a local httpd server and pulls data from a remote server.
121 * Install.md: Added the instruction on how to use the script. Also updated the remaining instructions
123 * config.json: Added remote server configurations.
124 * public/admin/fetch-from-remote.php: Added. This script fetches JSON from the remote server specified in
125 config.json and caches the results in the location specified as "cacheDirectory" in config.json.
128 * public/include/db.php:
129 (config_path): Extracted from generate_data_file.
130 (generate_data_file):
131 * tools/remote-server-relay.conf: Added. Apache 2.4 configuration file for a local http server launched by
132 run-with-remote-server.py.
133 * tools/run-with-remote-server.py: Added. Launches Apache with the right set of directives.
137 2015-07-13 Ryosuke Niwa <rniwa@webkit.org>
141 * public/js/helper-classes.js:
143 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
145 build-requests should use conform to JSON API format
146 https://bugs.webkit.org/show_bug.cgi?id=146375
148 Reviewed by Stephanie Lewis.
150 Instead of returning single dictionary that maps root set id to a dictionary of repository names
151 to revisions, timestamps, simply return root sets and roots "rows" or "objects" as defined in
152 JSON API (http://jsonapi.org/). This API change makes it easier to resolve the bug 146374 and
153 matches what we do in /api/test-groups.
155 Also add the support for /api/build-requests/?id=<id> to fetch the build request with <id>.
156 This is useful for debugging purposes.
158 * public/api/build-requests.php:
159 (main): Added the support for $_GET['id']. Also return "rootSets" and "roots".
160 (update_builds): Extracted from main.
162 * public/include/build-requests-fetcher.php:
163 (BuildRequestFetcher::fetch_request): Added. Used for /api/build-requests/?id=<id>.
164 (BuildRequestFetcher::results_internal): Always call fetch_roots_for_set_if_needed.
165 (BuildRequestFetcher::fetch_roots_for_set_if_needed): Renamed from fetch_roots_for_set.
166 Moved the logic to exit early when the root set had already been fetched here.
168 * public/v2/analysis.js:
169 (App.TestGroup._fetchTestResults): Fixed the bug that test groups without any successful results
172 * tools/pull-os-versions.py:
174 (setup_auth): Moved to util.py
176 * tools/sync-with-buildbot.py:
177 (main): Replaced a bunch of perf dashboard related options by --server-config-json.
178 (update_and_fetch_build_requests): No longer takes build_request_auth since that's now taken care
180 (organize_root_sets_by_id_and_repository_names): Added. Builds the old rootsSets directory based
181 on "roots" and "rootSets" dictionaries returned by /api/build-requests.
182 (config_for_request): Fixed a bug that the script blows up when the build request is missing
183 the repository specified in the configuration. This tolerance is necessary when a new repository
184 dependency is added but we want to run A/B tests for old builds without the dependency.
185 (fetch_json): No longer takes auth.
188 (setup_auth): Moved from pull-os-versions.py to be shared with sync-with-buildbot.py.
190 2015-06-23 Ryosuke Niwa <rniwa@webkit.org>
192 Build fix. A/B testing is broken when continuous builders report revisions out of order.
195 (App.AnalysisTaskController.Ember.Controller.extend.):
197 2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
199 A/B testing results should be shown even if they were submitted to different platforms
200 https://bugs.webkit.org/show_bug.cgi?id=146219
202 Reviewed by Andreas Kling.
204 Fetch A/B testing results regardless of the platform to which results are submitted
205 by providing the platform ID to which the results were submitted for each test group.
207 * public/api/test-groups.php:
208 (main): Include the platform id in the test groups.
209 * public/v2/analysis.js:
210 (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
212 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
214 Remove unnecessary svn:executable flags
215 https://bugs.webkit.org/show_bug.cgi?id=146107
217 Reviewed by Alexey Proskuryakov.
219 * public/js/helper-classes.js: Removed property svn:executable.
220 * public/js/jquery.flot.plugins.js: Removed property svn:executable.
221 * public/v2/app.css: Removed property svn:executable.
222 * public/v2/app.js: Removed property svn:executable.
223 * public/v2/chart-pane.css: Removed property svn:executable.
224 * public/v2/data.js: Removed property svn:executable.
225 * public/v2/index.html: Removed property svn:executable.
226 * public/v2/js/d3/LICENSE: Removed property svn:executable.
227 * public/v2/js/d3/d3.js: Removed property svn:executable.
228 * public/v2/js/d3/d3.min.js: Removed property svn:executable.
229 * public/v2/js/ember-data.js: Removed property svn:executable.
230 * public/v2/js/ember.js: Removed property svn:executable.
231 * public/v2/js/handlebars.js: Removed property svn:executable.
232 * public/v2/js/jquery.min.js: Removed property svn:executable.
233 * public/v2/js/statistics.js: Removed property svn:executable.
234 * public/v2/manifest.js: Removed property svn:executable.
235 * public/v2/popup.js: Removed property svn:executable.
237 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
239 Reading the list of analysis tasks is extremely slow
240 https://bugs.webkit.org/show_bug.cgi?id=146086
242 Reviewed by Darin Adler.
244 The bug was caused by Ember data requesting manifest.js hundreds of times.
245 Fetch it ahead of time in each route instead.
248 (App.AnalysisRoute.model):
249 (App.AnalysisTaskRoute.model):
251 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
253 Update ReadMe.md and Install.md per database changes
254 https://bugs.webkit.org/show_bug.cgi?id=146076
256 Reviewed by Darin Adler.
263 2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
265 Increase the popup dismissal time from 100ms to 500ms
266 https://bugs.webkit.org/show_bug.cgi?id=146077
268 Rubber-stamped by Andreas Kling.
270 * public/v2/popup.js:
271 (App.PopupView.scheduleHiding):
273 2015-06-16 Ryosuke Niwa <rniwa@webkit.org>
275 v2 UI should have buttons to breakdown a test
276 https://bugs.webkit.org/show_bug.cgi?id=146010
278 Reviewed by Chris Dumez.
280 Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
281 as well as "Breakdown" to add all subtests' metrics.
283 Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
284 for example, we make the test itself clickable instead of showing a submenu that only contains one item.
287 (App.ChartsController.addAlternativePanes): Added.
288 (App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
289 (App.TestProxyForPopup.actionName): Added.
290 (App.TestProxyForPopup.actionArgument): Added.
291 (App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
292 _actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
293 (App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
294 excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
295 that are already present in the list of panes.
296 * public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
297 * public/v2/index.html:
298 * public/v2/manifest.js:
299 (App.Metric.childMetrics): Added.
301 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
303 Build fix after r185574.
306 (set get App.Pane.Ember.Object.extend.):
308 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
312 * tools/pull-os-versions.py:
315 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
317 Perf dashboard should be able to list iOS versions as well as OS X versions
318 https://bugs.webkit.org/show_bug.cgi?id=146003
320 Reviewed by Stephanie Lewis.
322 Generalized pull-osx.py so that it can run an arbitrary shell command to fetch OS versions based on
323 information specified in config.json.
325 * tools/pull-os-versions.py: Renamed from pull-osx.py.
326 (main): Use available_builds_from_command when 'customCommands' is specified.
327 (available_builds_from_command): Added. Executes a shell command to fetch a list of available builds.
328 (fetch_available_builds): Now takes the repository name.
330 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
332 Removed a superfluous console.log per Chris's comment.
336 2015-06-15 Ryosuke Niwa <rniwa@webkit.org>
338 Analysis task should show all possible revisions for A/B testing
339 https://bugs.webkit.org/show_bug.cgi?id=145996
341 Reviewed by Chris Dumez.
343 * public/api/commits.php:
344 (fetch_commits_between): When the time stamp is not available for commits, use revision numbers
345 to find revisions between two ranges. This is necessary for OS X and iOS versions since they don't
346 have a "commit time".
349 (App.AnalysisTaskController.updateRootConfigurations): Fetch commits between two end points.
350 (App.AnalysisTaskController._createConfiguration): Extracted from updateRootConfigurations. List
351 the fetched list of commits if available.
352 (App.AnalysisTaskController._serializeNumbersSkippingConsecutiveEntries): Added. Serializes an list
353 of numbers intelligently. For example, [1, 2, 4, 5] turns into "1-2, 4-5". Without this, some lists
354 of points shown in the A/B testing configurations become too long.
356 * public/v2/commits-viewer.js:
357 (App.CommitsViewerComponent.commitsChanged):
360 (CommitLogs.fetchCommits): Renamed from fetchForTimeRange.
362 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
364 Add a script to post new OS X builds to perf dashboard
365 https://bugs.webkit.org/show_bug.cgi?id=145955
367 Reviewed by Darin Adler.
369 Added a new script pull-osx.py and relaxed the restrictions on commits accepted by the dashboard API.
371 * public/api/report-commits.php:
372 (main): Allow more characters than [A-Za-z0-9] in revision. e.g. "10.10.3 14D136".
373 Also allow commits without the author, commit time, and commit message as OS versions do not have those.
375 * tools/pull-osx.py: Added.
376 (main): Fetch the list of builds from a website and submit them per submissionSize with submissionInterval.
377 Once all builds have been submitted, wait for a long time as specified by fetchInterval.
378 (setup_auth): Sets up basic or digest auth to access the dashboard.
379 (fetch_available_builds): Fetches and parses the XML document from an internal website.
380 (textContent): A helper function to get the text content out of a XML node.
381 (submit_commits): Submits commits to the perf dashboard.
386 * tools/util.py: Extracted submit_commits and text_content from pull-svn.py to be reused in pull-osx.py.
388 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
390 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
391 https://bugs.webkit.org/show_bug.cgi?id=145940
393 Reviewed by Darin Adler.
395 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
396 Also deleted the code to mark points outside the envelop as outliers.
400 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
402 Unreviewed build fix for merging platforms.
404 * public/admin/platforms.php:
406 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
408 Unreviewed build fix. Some builder names are really long.
412 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
414 Show results and status before revisions for A/B testing results
415 https://bugs.webkit.org/show_bug.cgi?id=145327
417 Reviewed by Chris Dumez.
419 Place the results and the status columns before the columns for revisions.
420 Also show the absolute difference as well as the relative difference between the averages of A and B.
423 (App.TestGroupPane._populate):
424 (App.TestGroupPane._computeStatisticalSignificance):
425 * public/v2/index.html:
427 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
429 Build fix after r184591.
431 * public/v2/manifest.js:
433 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
435 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
437 * public/include/build-requests-fetcher.php:
439 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
441 UI to associate bugs with an analysis task is crappy
442 https://bugs.webkit.org/show_bug.cgi?id=145198
444 Reviewed by Andreas Kling.
446 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
447 a bug and a separate select view with a text field to associate a new bug instead of implicitly
448 updating or deleting the existing record based on what the user had typed.
450 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
451 a given analysis task since it's perfectly reasonable for a given task to be associated with
452 multiple WebKit bugs.
454 * public/privileged-api/associate-bug.php:
455 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
456 one that matches the analysis task and the bug tracker when the bug number is falsey.
458 * public/v2/analysis.js:
459 (App.Bug.url): Added.
460 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
465 (App.AnalysisTaskController.actions.addBug): Added.
466 (App.AnalysisTaskController.actions.deleteBug): Added.
467 (App.AnalysisTaskController.associateBug): Deleted.
469 * public/v2/index.html: Updated the templates.
471 * public/v2/manifest.js:
472 (App.BugTracker.urlFromBugNumber): Added.
474 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
476 A/B testing rootSets should provide commit times as well as revisions
477 https://bugs.webkit.org/show_bug.cgi?id=145207
479 Reviewed by Andreas Kling.
481 Some continuous build systems need the commit time as well as the revision number / hash so provide one
482 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
484 * public/include/build-requests-fetcher.php:
485 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
486 the revision number as well as the commit time.
487 * tools/sync-with-buildbot.py:
488 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
489 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
490 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
492 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
494 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
496 * public/v2/manifest.js:
497 (App.Manifest.Ember.Controller.extend.):
498 (App.Manifest.Ember.Controller.extend):
500 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
502 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
503 https://bugs.webkit.org/show_bug.cgi?id=145181
505 Rubber-stamped by Chris Dumez.
507 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
508 for clarity. This change also reduces the code complexity.
512 (App.AnalysisTaskController._chartDataChanged):
513 (App.TestGroupPane._createConfigurationSummary):
515 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
517 * public/v2/interactive-chart.js: Removed the support for showing units separately.
518 (App.InteractiveChartComponent._constructGraphIfPossible):
519 (App.InteractiveChartComponent._relayoutDataAndAxes)
521 * public/v2/manifest.js:
522 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
523 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
524 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
525 automatically include unit.
527 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
529 REGRESSION: v2 UI reports a higher memory usage
530 https://bugs.webkit.org/show_bug.cgi?id=145151
532 Reviewed by Chris Dumez.
534 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
535 Fixed the bug by manually implementing the formatter as done in v1.
537 * public/v2/manifest.js:
538 (App.Manfiest._formatBytes): Added.
539 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
541 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
543 Unreviewed build fix. Add "Duration" as a time metric.
545 * public/js/helper-classes.js:
547 (RunsData.unitFromMetricName):
549 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
551 Perf dashboard treats Speedometer and JetStream as smaller is better
552 https://bugs.webkit.org/show_bug.cgi?id=144711
554 Reviewed by Chris Dumez.
556 Added the support for "Score" metric.
558 * public/js/helper-classes.js:
561 (RunsData.unitFromMetricName):
562 (RunsData.isSmallerBetter):
564 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
566 Build fix after r183232.
568 * public/include/json-header.php:
570 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
572 Perf dashboard should automatically detect regressions
573 https://bugs.webkit.org/show_bug.cgi?id=141443
575 Reviewed by Anders Carlsson.
577 Added a node.js script detect-changes.js to detect potential regressions and progressions
578 on the graphs tracked on v2 dashboards.
580 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
581 columns to analysis_tasks to keep the segmentation and test range selection strategies used
582 to create an analysis task.
584 * public/api/analysis-tasks.php:
585 (format_task): Include task_segmentation and analysis_tasks in the results.
587 * public/include/json-header.php:
588 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
589 of a CSRF prevention token.
590 (should_authenticate_as_slave): Added.
591 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
592 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
593 to a CSRF attack, we don't need to check a CSRF token.
595 * public/privileged-api/create-analysis-task.php:
596 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
597 analysis task. Also add or find segmentation and test range selection strategies if specified.
599 * public/privileged-api/create-test-group.php:
600 (main): Use ensure_privileged_api_data_and_token_or_slave.
602 * public/privileged-api/generate-csrf-token.php:
605 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
607 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
608 (Array.prototype.find): Added a polyfill to be used in node.js.
609 (RunsData.fetchRuns):
610 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
611 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
612 in detect-changes.js.
613 (RunsData.unitFromMetricName): Ditto.
614 (RunsData.isSmallerBetter): Ditto.
615 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
617 (TimeSeries): When commit times are identical, order points based on build time. This is needed
618 for when we trigger two builds at two different OS versions with the same WebKit revision since
619 OS versions don't change the commit times.
620 (TimeSeries.prototype.findPointByIndex): Added.
621 (TimeSeries.prototype.rawValues): Added.
623 * public/v2/js/statistics.js:
624 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
625 description of this strategy instead of the default probability. Also fixed a bug that debugging
626 code was referring to non-existent variables.
627 (Statistics.executeStrategy): Moved from App.Pane (app.js).
629 * public/v2/manifest.js:
630 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
631 used in detect-changes.js.
633 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
634 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
635 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
636 (main): Loads the settings JSON specified in the argument.
637 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
638 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
639 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
640 and computes various values for when statistically significant changes are detected later.
641 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
642 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
643 in chronological order and create a new analysis task for the very last change we detected. We'll
644 eventually create an analysis task for all detected changes since we're repeating the analysis in
645 fetchManifestAndAnalyzeData after some time.
646 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
647 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
648 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
649 tasks for the same range (e.g. humans may create one before the script gets to do it).
650 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
651 testing if available, and notify another server with a HTML message as specified.
652 (findStrategyByLabel):
653 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
654 test or values are getting smaller in a larger-is-better test and vice versa.
655 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
656 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
660 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
661 (instantiateNotificationTemplate):
664 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
666 Perf dashboard should have UI to set status on analysis tasks
667 https://bugs.webkit.org/show_bug.cgi?id=143977
669 Reviewed by Chris Dumez.
671 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
672 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
673 The latter will be a useful metric once we start automatically creating analysis tasks.
675 * init-database.sql: Added two columns to analysis_tasks table.
676 * public/api/analysis-tasks.php: Include the added columns in the JSON.
677 * public/include/db.php:
678 (Database::to_database_boolean): Added.
679 * public/include/json-header.php:
680 (require_match_one_of_values): Added.
681 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
683 * public/v2/analysis.js:
684 (App.AnalysisTask.result): Added.
685 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
686 and we want to differentiate null from false in order to differentiate the null-ness of the value.
687 (App.AnalysisTask.saveStatus): Added.
688 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
691 (App.AnalysisTaskController.analysisResultOptions): Added.
692 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
693 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
694 been created if 'no change' is selected.
695 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
696 (App.AnalysisTaskController.actions.saveStatus): Added.
697 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
698 'result' and 'needed' values of the analysis task.
700 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
702 Unreviewed build fix. Updated config.json after recent changes.
706 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
708 Make the analysis page more useful
709 https://bugs.webkit.org/show_bug.cgi?id=143617
711 Reviewed by Chris Dumez.
713 * public/api/analysis-tasks.php:
714 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
715 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
716 * public/v2/analysis.js:
717 (App.AnalysisTask.formattedCreatedAt): Added.
718 (App.AnalysisTask._addLeadingZero): Added.
719 (App.AnalysisTask.buildRequestCount): Added.
720 (App.AnalysisTask.finishedBuildRequestCount): Added.
721 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
722 (App.AnalysisTask.testGroups):
723 (App.AnalysisTask.triggerable):
724 (App.AnalysisTask.label):
726 * public/v2/app.css: Tweaked style rules for the analysis page.
729 (App.buildPopup): Sort the list of platforms by name.
730 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
731 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
732 such as "Bugzilla" with the corresponding text field.
734 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
735 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
736 for the accompanying graph.
738 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
740 Perf dashboard should automatically select ranges for A/B testing
741 https://bugs.webkit.org/show_bug.cgi?id=143580
743 Reviewed by Chris Dumez.
745 Added a new statistics option for picking a A/B test range selection strategy.
746 The selected ranges are shown in the graph using the same UI to show analysis tasks.
749 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
750 charts page used by the dashboard since we've added a new parameter at the end.
751 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
752 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
753 (App.Pane._cloneStrategy): Copy isSegmentation.
754 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
755 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
756 selection strategy is picked by the user.
757 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
758 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
759 the return value from the moving average time series to a dictionary that contains the moving
760 average time series, a dictionary of anomalies, and an array of test ranges.
761 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
762 (App.ChartsController._serializePaneList): Ditto for serialization.
763 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
764 test range selection strategy.
766 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
768 * public/v2/index.html: Added UI for selecting a test range selection strategy.
770 * public/v2/interactive-chart.js:
771 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
773 * public/v2/js/statistics.js:
774 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
775 (Statistics.TestRangeSelectionStrategies): Added.
777 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
779 The results of A/B testing should state statistical significance
780 https://bugs.webkit.org/show_bug.cgi?id=143552
782 Reviewed by Chris Dumez.
784 Added statistical comparisons between results for each configuration on analysis task page using
785 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
788 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
789 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
791 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
792 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
793 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
794 Also renamed "items" to "requests" for clarity.
796 * public/v2/index.html: Added the template for showing statistical comparisons.
798 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
799 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
800 probability and vice versa.
801 (Statistics.supportedConfidenceIntervalProbabilities):
802 (Statistics.confidenceIntervalDelta):
803 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
804 the probability that two values are sampled from distinct distributions using Welch's t-test.
805 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
806 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
807 (.oneSidedToTwoSidedProbability): Extracted.
808 (.twoSidedToOneSidedProbability): Extracted.
809 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
810 now that computeWelchsT takes two-sided probability.
812 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
814 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
818 (App.Pane.refetchRuns):
820 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
822 Perf dashboard should have a way of marking outliers
823 https://bugs.webkit.org/show_bug.cgi?id=143466
825 Reviewed by Chris Dumez.
827 Address kling's in-person comment to notify users when the new run status is saved in the database.
830 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
831 * public/v2/chart-pane.css: Fixed a typo.
833 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
835 Perf dashboard should have a way of marking outliers
836 https://bugs.webkit.org/show_bug.cgi?id=143466
838 Reviewed by Chris Dumez.
840 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
841 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
843 * init-database.sql: Added run_marked_outlier column to test_runs table.
845 * public/admin/tests.php:
847 * public/api/runs.php:
848 (main): Only emit Cache-Control and Expires headers in v1 UI.
849 (RunsGenerator::format_run): Emit markedOutlier.
851 * public/include/admin-header.php:
853 * public/include/db.php:
854 (Database::is_true): Made it static.
856 * public/include/manifest.php:
857 (Manifest::platforms):
859 * public/index.html: Call into /api/runs/ with ?cache=true.
861 * public/privileged-api/update-run-status.php: Added.
862 (main): Updates the newly added column in test_runs table.
866 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
867 (App.Pane._didFetchRuns): Renamed from _updateChartData.
868 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
869 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
870 the interactive chart component only observes changes to chartData and not individual properties of it.
871 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
872 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
873 clone chartData here.
875 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
876 invoking App.Pane._setNewChartData.
877 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
878 opening the pane for marking points as outliers would be annoying.
879 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
880 (App.PaneController.selectedMeasurement): Added.
881 (App.PaneController.showOutlierTitle): Added.
882 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
883 mark the selected point as an outlier via the newly added privileged API.
885 * public/v2/chart-pane.css: Updated styles.
888 (PrivilegedAPI._post): Report the semantic errors.
889 (Measurement.prototype.markedOutlier): Added.
890 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
891 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
892 whether the time series should include measurements marked as outliers or not.
893 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
894 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
895 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
897 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
898 mark individual points as outliers.
900 * public/v2/interactive-chart.js:
901 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
902 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
903 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
904 with the arrow key navigation support, this is no longer an issue.
906 * public/v2/manifest.js:
907 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
908 updates the time series in this chart data in order to include or exclude outliers.
910 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
912 Perf dashboard should be able to trigger A/B testing jobs for iOS
913 https://bugs.webkit.org/show_bug.cgi?id=143398
915 Reviewed by Chris Dumez.
917 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
919 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
921 * public/api/triggerables.php:
922 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
923 * public/v2/analysis.js:
924 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
926 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
927 some of the data points. This will happen when we modify the list of projects we build for iOS.
928 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
929 attempts to create an invalid test group; when there is already another test group of the same or when
930 only either configuration specifies the revision for some repository.
931 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
932 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
933 * tools/sync-with-buildbot.py:
934 (find_request_updates):
935 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
936 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
937 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
938 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
940 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
942 Add time series segmentation algorithms as moving averages
943 https://bugs.webkit.org/show_bug.cgi?id=143362
945 Reviewed by Chris Dumez.
947 This patch implements two preliminary time series segmentation algorithms as moving averages.
949 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
950 If Welch's t-test implicates a statistically significance difference, then split the segment into two
951 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
952 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
953 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
955 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
956 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
957 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
958 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
959 through i = n. However, we also don't want to split every data point into a separate segment so we need
960 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
961 models discussed in [2] for simplicity. We will tune this cost function further in the future.
963 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
964 space is exponential with respect to the size of the time series since we could split at each data point.
965 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
966 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
967 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
968 exploring much of the problem space.
970 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
971 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
972 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
973 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
974 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
975 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
976 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
978 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
979 a nonstationary time series", Physical Review E 69, 021108 (2004)
981 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
982 Lithuanian Mathematical Journal, vol 46, 2006
984 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
985 * public/v2/js/statistics.js:
986 (Statistics.testWelchsT):
987 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
988 of each value array between which Welch's t-statistic is computed. This generalization helps the
989 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
990 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
991 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
992 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
993 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
995 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
996 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
998 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
1000 REGRESSION: Perf dashboard sometimes fails to update zooming level
1001 https://bugs.webkit.org/show_bug.cgi?id=143359
1003 Reviewed by Darin Adler.
1005 The bug was caused by various bugs that ended up in an exception.
1008 (App.Pane._handleFetchErrors): Removed superfluous console.log.
1009 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
1010 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
1011 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
1012 to # when Ember.js fails to attach event listeners on time.
1013 * public/v2/interactive-chart.js:
1014 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
1015 the containing element's size is 0.
1016 (App.InteractiveChartComponent._updateBrush): Ditto.
1018 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
1020 Perf dashboard should have UI to test out anomaly detection strategies
1021 https://bugs.webkit.org/show_bug.cgi?id=143290
1023 Reviewed by Benjamin Poulain.
1025 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
1027 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
1028 as well as Welch's t-test that compares the last five points to the prior twenty points.
1030 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
1031 performance tests although they compare medians instead of means.
1033 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
1036 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
1037 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
1038 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
1039 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
1040 Only report the first data point when multiple consecutive data points are detected as anomalies.
1041 * public/v2/chart-pane.css: Updated styles.
1042 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
1043 * public/v2/js/statistics.js:
1044 (Statistics.testWelchsT): Added. Implements Welch's t-test.
1045 (.sampleMeanAndVarianceForValues): Added.
1046 (.createWesternElectricRule): Added.
1047 (.countValuesOnSameSide): Added.
1048 (Statistics.AnomalyDetectionStrategy): Added.
1050 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
1052 REGRESSION: Searching commits can highlight wrong data points
1053 https://bugs.webkit.org/show_bug.cgi?id=143272
1055 Reviewed by Antti Koivisto.
1057 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
1058 return commit times with only second precision. This resulted in the frontend code to match a commit
1059 with the data point that included the next commit when the millisecond component of commit's timestamp
1060 wasn't identically 0.
1062 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
1063 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
1064 so miliseconds component was only preserved in /api/commits.
1066 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
1067 it returns time in milisecond precision.
1069 * public/api/commits.php:
1070 (fetch_commits_between): Use Database::to_js_time for format commit times.
1071 (format_commit): Ditto.
1072 * public/include/db.php:
1073 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
1074 * public/v2/data.js:
1075 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
1077 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
1079 Perf dashboard should show relative change in values
1080 https://bugs.webkit.org/show_bug.cgi?id=143252
1082 Reviewed by Antti Koivisto.
1084 When a range of values are selected, show the percentage difference between the start and the end
1085 in addition to the absolute value difference. When a single point is selected, show the relative
1086 difference with respect to the previous point. Use two significant figures and always show plus sign
1087 when the difference is positive.
1089 * public/v2/app.js: Compute and format the relative difference.
1090 * public/v2/chart-pane.css: Don't let commits view shrink itself when they're all collapsed.
1091 * public/v2/index.html: Show the relative difference.
1093 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
1095 REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
1096 https://bugs.webkit.org/show_bug.cgi?id=143254
1098 Reviewed by Antti Koivisto.
1100 The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
1101 or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
1102 so that the interactive chart component will observe a change to 'chartData'.
1105 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.
1107 2015-03-19 Ryosuke Niwa <rniwa@webkit.org>
1109 Unreviewed build fixes.
1111 * public/include/manifest.php:
1112 (Manifest::generate): These should be {} instead of [] when they're empty.
1113 * public/v2/data.js:
1114 (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
1115 * public/v2/manifest.js:
1116 (App.Metric.fullName): Fixed the typo.
1117 * tests/admin-regenerate-manifest.js: Fixed the test.
1119 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
1121 Commit the erroneously reverted change.
1123 * public/api/runs.php:
1124 (RunsGenerator::results):
1126 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
1128 Loading the perf dashboard takes multiple seconds
1129 https://bugs.webkit.org/show_bug.cgi?id=141860
1131 Reviewed by Andreas Kling.
1133 This patch introduces the caches of JSON files returned by /api/ in /data/ directory. It also records
1134 the last time test_runs rows associated with the requested platforms and metrics are inserted, updated,
1135 or removed in the caches as well as the manifest JSON files ("last modified time"). Because the manifest
1136 is regenerated each time a new test result is reported, the front end can compare last modified time in
1137 the manifest file with that in a /api/runs JSON cache to detect the stale-ness.
1139 More concretely, the front end first optimistically fetches the JSON in /data/. If the cache doesn't exit
1140 or the last modified time in the cache doesn't match with that in the manifest file, it would fetch it
1141 again via /api/runs. In the case the cache did exist, we render the charts based on the cache meanwhile.
1142 This dramatically reduces the perceived latency for the page load since charts are drawn immediately using
1143 the cache and we would only re-render the charts as new up-to-date JSON comes in.
1145 This patch also changes the format of runs JSONs by pushing the exiting properties into 'configurations'
1146 and adding 'lastModified' and 'elapsedTime' at the top level.
1148 * init-database.sql: Added config_runs_last_modified to test_configurations table as well as a trigger to
1149 auto-update this column upon changes to test_runs table.
1151 * public/admin/test-configurations.php:
1152 (add_run): Regenerate the manifest file to invalidate the /api/runs JSON cache.
1153 (delete_run): Ditto.
1155 * public/api/runs.php:
1156 (main): Fetch all columns of test_configurations table including config_runs_last_modified. Also generate
1157 the cache in /data/ directory.
1158 (RunsGenerator::__construct): Compute the last modified time for this (platform, metric) pair.
1159 (RunsGenerator::results): Put the old content in 'configurations' property and include 'lastModified' and
1160 'elapsedTime' properties. 'elapsedTime' is added for debugging purposes.
1161 (RunsGenerator::add_runs):
1162 (RunsGenerator::parse_revisions_array):
1164 * public/include/db.php:
1165 (CONFIG_DIR): Added.
1166 (generate_data_file): Added based on ManifestGenerator::store.
1167 (Database::to_js_time): Extracted from RunsGenerator::add_runs to share code.
1169 * public/include/json-header.php:
1170 (echo_success): Renamed from success_json. Return the serialized JSON instead of echo'ing it so that we can
1171 generate caches in /api/runs/.
1172 (exit_with_success):
1174 * public/include/manifest.php:
1175 (ManifestGenerator::generate): Added 'elapsedTime' property for the time taken to generate the manifest.
1176 It seems like we're generating it in 200-300ms for now so that's good.
1177 (ManifestGenerator::store): Uses generate_data_file.
1178 (ManifestGenerator::platforms): Added 'lastModified' array to each platform entry. This array contains the
1179 last modified time for each (platform, metric) pair.
1181 * public/index.html:
1182 (fetchTest): Updated per the format change in runs JSON.
1185 (App.Pane._fetch): Fetch the cached JSON first. Refetch the uncached version if instructed as such.
1186 (App.Pane._updateChartData): Extracted from App.Pane._fetch.
1187 (App.Pane._handleFetchErrors): Ditto.
1189 * public/v2/data.js:
1190 (RunsData.fetchRuns): Takes the fourth argument indicating whether we should fetch the cached version or not.
1191 The cached JSON is located in /data/ with the same filename. When fetching a cached JSON results in 404,
1192 fulfill the promise with null as the result instead of rejecting it. The only client of this function which
1193 sets useCache to true is App.Manifest.fetchRunsWithPlatformAndMetric, and it handles this special case.
1195 * public/v2/manifest.js:
1196 (App.DateArrayTransform): Added. Handles the array of last modified dates in platform objects.
1197 (App.Platform.lastModifiedTimeForMetric): Added. Returns the last modified date in the manifest JSON.
1198 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes "useCache" like RunsData.fetchRuns. Set shouldRefetch
1199 to true if response is null (the cache didn't exit) or the cache is out-of-date.
1200 (App.Manifest._formatFetchedData): Extracted from App.Manifest.fetchRunsWithPlatformAndMetric.
1203 (initializeDatabase): Avoid splitting function definitions in the middle.
1205 * tests/api-report.js: Added tests to verify that reporting new test results updates the last modified time
1206 in test_configurations.
1208 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
1210 REGRESSION(r180333): Analysis tasks can't be associated with bugs
1211 https://bugs.webkit.org/show_bug.cgi?id=141858
1213 Reviewed by Andreas Kling.
1215 Added back the erroneously removed table to associate bugs. Also moved "details-table-container" div outside
1216 of the chart-details partial template as it needs to wrap associate bugs in analysis task pages.
1218 * public/v2/chart-pane.css:
1219 * public/v2/index.html:
1221 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
1223 Selecting revisions for A/B testing is hard
1224 https://bugs.webkit.org/show_bug.cgi?id=141824
1226 Reviewed by Andreas Kling.
1228 Update the revisions used in A/B testing based on the selection in the overview chart. This allows users to
1229 intuitively select revisions based on points shown in the chart. Removed the old select elements used to
1230 select A/B testing points manually.
1232 Also renamed 'testSets' to 'configurations', 'roots' to 'rootConfigurations', and 'revisions' in each root's
1233 sets to 'options' for clarity.
1235 * public/v2/app.css: Reorganized style rules.
1238 (App.AnalysisTaskController):
1239 (App.AnalysisTaskController._taskUpdated): Merged updateTestGroupPanes.
1240 (App.AnalysisTaskController._chartDataChanged): Renamed from paneDomain. It's now an observer instead of
1241 a property, which sets 'overviewDomain' property as well as other properties.
1242 (App.AnalysisTaskController.updateRootConfigurations): Renamed from updateRoots.
1243 (App.AnalysisTaskController._updateRootsBySelectedPoints): Added. Select roots based on the selected points
1244 in the overview chart.
1246 * public/v2/chart-pane.css: Added arrows next to the configuration names (e.g. 'A') to indicate whether
1247 individual build requests / test results are shown or not.
1249 * public/v2/index.html: Removed the select element per configuration column. Also moved the select element
1250 for the number of runs as it doesn't belong in the same table as the one that lists repositories and roots.
1252 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
1254 Unreviewed test fixes after r179037, r179591, and r179763.
1256 * tests/admin-regenerate-manifest.js:
1257 * tests/admin-reprocess-report.js:
1259 2015-02-19 Ryosuke Niwa <rniwa@webkit.org>
1261 Relationship between A/B testing results are unclear
1262 https://bugs.webkit.org/show_bug.cgi?id=141810
1264 Reviewed by Andreas Kling.
1266 Show a "reference chart" indicating which two points have been tested in each test group pane.
1268 Now the chart shown at the top of an analysis task page is called the "overview pane", and we use the pane
1269 and the domain used in this chart to show charts in each test group.
1271 Also renamed an array of revisions used in the A/B test results tables from 'revisions' to 'revisionList'.
1273 * public/v2/analysis.js:
1274 (App.TestGroup._fetchTestResults): Renamed from _fetchChartData. Set 'testResults' instead of 'chartData'
1275 since this is the results of A/B testing results, not the data for charts shown next to them.
1277 * public/v2/app.css: Added CSS rules for reference charts.
1280 (App.AnalysisTaskController.paneDomain): Set 'overviewPane' and 'overviewDomain' on each test group pane.
1281 (App.TestGroupPane._populate): Updated per 'chartData' to 'testResults' rename.
1282 (App.TestGroupPane._updateReferenceChart): Get the chart data via the overview pane and find points that
1283 identically matches root sets. If one of configuration used a set of revisions for which no measurement
1284 was made in the original chart, don't show the reference chart as that would be misleading / confusing.
1285 (App.TestGroupPane._computeRepositoryList): Updated per 'chartData' to 'testResults' rename.
1286 (App.TestGroupPane._createConfigurationSummary): Ditto. Also renamed 'revisions' to 'revisionList'.
1287 In addition, renamed 'buildNumber' to 'buildLabel' and prefixed it with "Build ".
1289 * public/v2/data.js:
1290 (Measurement.prototype.revisionForRepository): Added.
1291 (Measurement.prototype.commitTimeForRepository): Cleanup.
1292 (TimeSeries.prototype.findPointByRevisions): Added. Finds a point based on a set of revisions.
1294 * public/v2/index.html: Added the reference chart. Streamlined the status label for each build request
1295 by including the build number in the title attribute instead of in the markup.
1297 * public/v2/interactive-chart.js:
1298 (App.InteractiveChartComponent._updateDomain): Fixed a typo introduced as a consequence of r179913.
1299 (App.InteractiveChartComponent._computeYAxisDomain): Expand the y-axis to show the highlighted points.
1300 (App.InteractiveChartComponent._highlightedItemsChanged): Adjust the y-axis as needed.
1302 2015-02-18 Ryosuke Niwa <rniwa@webkit.org>
1304 Analysis task pages are unusable
1305 https://bugs.webkit.org/show_bug.cgi?id=141786
1307 Reviewed by Andreas Kling.
1309 This patch makes following improvements to analysis task pages:
1310 1. Making the main chart interactive. This change required the use of App.Pane as well as moving the code to
1311 compute the data for the details pane from PaneController.
1312 2. Moving the form to add a new test group to the top of test groups instead of the bottom of them.
1313 3. Grouping the build requests in each test group by root sets instead of the order by which they were ran.
1314 This change required the creation of App.TestGroupPane as well as its methods.
1315 4. Show a box plot for each root set configuration as well as each build request. This change required
1316 App.BoxPlotComponent.
1317 5. Show revisions of each repository (e.g. WebKit) for each root set and build request.
1319 * public/api/build-requests.php:
1320 (main): Update per the rename of BuildRequestsFetcher::root_sets to BuildRequestsFetcher::root_sets_by_id.
1322 * public/api/test-groups.php:
1323 (main): Include root sets and roots in the response.
1324 (format_test_group):
1326 * public/include/build-requests-fetcher.php:
1327 (BuildRequestsFetcher::root_sets_by_id): Renamed from root_sets.
1328 (BuildRequestsFetcher::root_sets): Added.
1329 (BuildRequestsFetcher::roots): Added.
1330 (BuildRequestsFetcher::fetch_roots_for_set): Takes a boolean argument $resolve_ids. This flag is only set to
1331 true in /api/build-requests/ (as done prior to this patch) to use repository names as identifiers since
1332 tools/sync-with-buildbot.py can't convert repository names to their ids.
1334 * public/v2/analysis.js:
1336 (App.RootSet): Added.
1337 (App.RootSet.revisionForRepository): Added.
1338 (App.TestGroup.rootSets): Deleted the code to compute root set ids from build requests now that the JSON
1339 response at /api/test-groups will include them.
1340 (App.BuildRequest): Ditto. Also deleted 'configLetter' property, which has been moved to a proxy created by
1341 _createConfigurationSummary.
1342 (App.BuildRequest.statusLabel): Use 'Completed' as the human readable label for 'completed' status.
1343 (App.BuildRequest.aggregateStatuses): Added. Generates a human readable status for a set of build requests.
1345 * public/v2/app.css: Updated style rules for analysis task pages.
1348 (App.Pane): This class is now used in analysis task pages to make the main chart interactive.
1349 (App.Pane._updateDetails): Moved from App.PaneController.
1351 (App.PaneController._updateCanAnalyze): Updated the code per the move of selectedPoints.
1353 (App.AnalysisTaskController): Added 'details'.
1354 (App.AnalysisTaskController._taskUpdated):
1355 (App.AnalysisTaskController.paneDomain):Renamed from _fetchedRuns.
1356 (App.AnalysisTaskController.updateTestGroupPanes): Added. Creates App.TestGroupPane for each test group.
1357 (App.AnalysisTaskController.actions.toggleShowRequestList): Added.
1359 (App.TestGroupPane): Added.
1360 (App.TestGroupPane._populate): Added. Group build requests by root sets and create a summary for each group.
1361 (App.TestGroupPane._computeRepositoryList): Added. Returns a sorted list of repositories which is the union
1362 of all repositories appearing in root sets and builds associated with A/B testing results.
1363 (App.TestGroupPane._groupRequestsByConfigurations): Added. Groups build requests by root sets.
1364 (App.TestGroupPane._createConfigurationSummary): Added. Creates a summary for a group of build requests that
1365 use the same root set. We start by wrapping "raw" build requests in a proxy with formatted values,
1366 build numbers, etc... obtained from the fetched chart data. The list of revisions shown in the group summary
1367 is a union of revisions in the root set and the first build request in the group. We null-out revision info
1368 for a build request if it is identical to the one in the summary. The range of values is expanded as needed
1369 by the values in the group as well as 95% percentile confidence interval.
1371 (App.BoxPlotComponent): Added. Controls a box plot shown for each test group summary and build request.
1372 (App.BoxPlotComponent.didInsertElement): Added. Inserts a SVG element as well as two indicator rects to show
1373 the mean and the confidence interval.
1374 (App.BoxPlotComponent._updateBars): Added. Updates the dimensions of the indicator rects.
1375 (App.BoxPlotComponent.valueChanged): Added. Computes the relative dimensions of the indicator rects and
1376 calls _updateBars to update the rects.
1378 * public/v2/chart-pane.css: Added some style rules to be used in the details pane in analysis task pages.
1380 * public/v2/data.js:
1381 (Measurement.prototype.formattedRevisions):
1382 (Measurement.formatRevisionRange): Renamed from Measurement.prototype._formatRevisionRange so that it can be
1383 called in _createConfigurationSummary.
1385 * public/v2/index.html: Updated the templates for analysis task pages. Moved the form to create a new test
1386 group above all test groups, and replaced the list of data points by "details" pane used in the charts page.
1387 Also made the fetching of chartData no longer block showing of test groups.
1389 * public/v2/interactive-chart.js:
1390 (App.InteractiveChartComponent._updateDomain): Added an early exit to fix a newly revealed race condition.
1391 (App.InteractiveChartComponent._domainChanged): Ditto.
1392 (App.InteractiveChartComponent._updateSelectionToolbar): Made it respect 'zoomable' boolean property.
1394 * public/v2/js/statistics.js:
1395 (Statistics.min): Added.
1396 (Statistics.max): Added.
1398 * public/v2/manifest.js:
1399 (App.Manifest.fetchRunsWithPlatformAndMetric): Added formatWithDeltaAndUnit to be used in _createConfigurationSummary.
1401 2015-02-14 Ryosuke Niwa <rniwa@webkit.org>
1403 Build URL on new perf dashboard doesn't resolve $builderName
1404 https://bugs.webkit.org/show_bug.cgi?id=141583
1406 Reviewed by Darin Adler.
1408 Support $builderName in the build URL template.
1410 * public/js/helper-classes.js:
1411 (TestBuild.buildUrl): Replaced $builderName with the builder name.
1413 * public/v2/manifest.js:
1414 (App.Metric.fullName): Fixed the typo. We need &ni, not &in.
1415 (App.BuilderurlFromBuildNumber): Replaced $builderName with the builder name.
1417 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
1419 Unreviewed build fix after r179591.
1421 * public/api/commits.php:
1423 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
1425 The status of a A/B testing request always eventually becomes "Failed"
1426 https://bugs.webkit.org/show_bug.cgi?id=141523
1428 Reviewed by Andreas Kling.
1430 The bug was caused by /api/build-requests always setting the status of a build request to 'failed' when
1431 'failedIfNotCompleted' was sent by the buildbot sync'er.
1433 Fixed the bug by only setting the status to 'failed' if it wasn't set to 'completed'.
1435 * public/api/build-requests.php:
1438 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
1440 Unreviewed, remove empty directories.
1442 * public/data: Removed.
1444 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
1446 Perf dashboard should show the results of A/B testing
1447 https://bugs.webkit.org/show_bug.cgi?id=141500
1449 Reviewed by Chris Dumez.
1451 Added the support for fetching test_runs for a specific test group in /api/runs/, and used it in the
1452 analysis task page to fetch results for each test group.
1454 Merged App.createChartData into App.Manifest.fetchRunsWithPlatformAndMetric so that App.BuildRequest
1455 can use the formatter.
1457 * public/api/runs.php:
1458 (fetch_runs_for_config_and_test_group): Added.
1459 (fetch_runs_for_config): Just return the fetched rows since main will format them with RunsGenerator.
1460 (main): Use fetch_runs_for_config_and_test_group to fetch rows when a test group id is specified. Also
1461 use RunsGenerator to format results.
1462 (RunsGenerator): Added.
1463 (RunsGenerator::__construct): Added.
1464 (RunsGenerator::add_runs): Added.
1465 (RunsGenerator::format_run): Moved.
1466 (RunsGenerator::parse_revisions_array): Moved.
1468 * public/v2/analysis.js:
1469 (App.TestGroup): Fixed a typo. The property on a test group that refers to an analysis task is "task".
1470 (App.TestGroup._fetchChartData): Added. Fetches all A/B testing results for this group.
1471 (App.BuildRequest.configLetter): Renamed from config since this returns a letter that identifies the
1472 configuration associated with this build request such as "A" and "B".
1473 (App.BuildRequest.statusLabel): Added the missing label for failed build requests.
1474 (App.BuildRequest.url): Added. Returns the URL associated with this build request.
1475 (App.BuildRequest._meanFetched): Added. Retrieve the mean and the build number for this request via
1479 (App.Pane._fetch): Set chartData directly here.
1480 (App.Pane._updateMovingAverageAndEnvelope): Renamed from _computeChartData. No longer sets chartData
1481 now that it's done in App.Pane._fetch.
1482 (App.AnalysisTaskController._fetchedRuns): Updated per createChartData merge.
1484 * public/v2/data.js:
1485 (Measurement.prototype.buildId): Added.
1486 (TimeSeries.prototype.findPointByBuild): Added.
1488 * public/v2/index.html: Fixed a bug that build status URL was broken. We can't use link-to helper since
1489 url is not an Ember routed path.
1491 * public/v2/manifest.js:
1492 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes testGroupId as the third argument. Merged
1493 App.createChartData here so that App.BuildRequest can use the formatter
1495 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
1497 v2 UI should adjust the number of ticks on dashboards based on screen size
1498 https://bugs.webkit.org/show_bug.cgi?id=141502
1500 Reviewed by Chris Dumez.
1502 * public/v2/interactive-chart.js:
1503 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Compute the number of ticks based on the
1506 2015-02-11 Ryosuke Niwa <rniwa@webkit.org>
1508 New perf dashboard shows too much space around interesting data points
1509 https://bugs.webkit.org/show_bug.cgi?id=141487
1511 Reviewed by Chris Dumez.
1513 Revise the y-axis range adjustment algorithm in r179913. Instead of showing the entire moving average,
1514 show the current time series excluding points in the series outside the moving average envelope.
1517 (App.Pane._computeChartData): Don't deal with missing moving average or enveloping strategy here.
1518 (App.Pane._computeMovingAverageAndOutliers): Set isOutliner to true on all data points in the current
1519 time series if the point lies outside the moving average envelope. Don't expose the moving average or
1520 the envelope computed for this purpose if they're not set by the user.
1522 * public/v2/data.js:
1523 (TimeSeries.prototype.minMaxForTimeRange): Takes a boolean argument, ignoreOutlier. When the flag is set
1524 to true, min/max computation will ignore any point in the series with non-falsy "isOutliner" property.
1526 * public/v2/interactive-chart.js:
1527 (App.InteractiveChartComponent._constructGraphIfPossible): Unsupport hideMovingAverage and hideEnvelope.
1528 (App.InteractiveChartComponent._computeYAxisDomain): Removed the commented out code. Also moved the code
1529 to deal with showFullYAxis here.
1530 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Rewrote the code. Takes ignoreOutliners as an
1531 argument instead of directly inspecting showFullYAxis.
1533 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
1535 New perf dashboard shouldn't always show outliners
1536 https://bugs.webkit.org/show_bug.cgi?id=141445
1538 Reviewed by Chris Dumez.
1540 Use the simple moving average with an average difference envelope to compute the y-axis range to show
1541 to avoid expanding it spuriously to show one off outlier.
1544 (App.Pane): Don't show the full y-axis range by default.
1545 (App.Pane._computeChartData): Use the first strategies for the moving average and the enveloping if
1546 one is not specified by the user but without showing them in the charts.
1547 (App.Pane._computeMovingAverage): Takes moving average and enveloping strategies as arguments instead
1548 of retrieving via chosenMovingAverageStrategy and chosenEnvelopingStrategy.
1550 (App.ChartsController._parsePaneList): Added showFullYAxis as a query string argument to each pane.
1551 (App.ChartsController._serializePaneList): Ditto.
1553 * public/v2/chart-pane.css: Added a CSS rule for when y-axis is clickable.
1555 * public/v2/index.html: Pass in showFullYAxis as an argument to the main interactive chart.
1557 * public/v2/interactive-chart.js:
1558 (App.InteractiveChartComponent._constructGraphIfPossible): Add an event listener on y-axis labels when
1559 the chart is interactive so that toggle showFullYAxis. Also hide the moving average and/or the envelope
1560 if they are not specified by the user (i.e. only used to adjust y-axis range).
1561 (App.InteractiveChartComponent._updateDomain): Don't exit early if y-axis domains are different even if
1562 x-axis domain remained the same. Without this change, the charts would never redraw.
1563 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Use the moving average instead of the current
1564 time series to compute the y-axis range if showFullYAxis is false. When showFullYAxis is true, expand
1565 y-axis all the way down to 0 or the minimum value in the current time series whichever is smaller.
1567 * public/v2/js/statistics.js:
1568 (Statistics.MovingAverageStrategies): Use a wider window in Simple Moving Average by default.
1570 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
1572 Unreviewed build fix.
1575 (set get App.Pane.Ember.Object.extend):
1577 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
1579 New perf dashboard should have the ability to overlay moving average with an envelope
1580 https://bugs.webkit.org/show_bug.cgi?id=141438
1582 Reviewed by Andreas Kling.
1584 This patch adds three kinds of moving average strategies and two kinds of enveloping strategies:
1586 Simple Moving Average - The moving average x̄_i of x_i is computed as the arithmetic mean of values
1587 from x_(i - n) though x_(i + m) where n is a non-negative integer and m is a positive integer. It takes
1588 n, backward window size, and m, forward window size, as an argument.
1590 Cumulative Moving Average - x̄_i is computed as the arithmetic mean of all values x_0 though x_i.
1591 That is, x̄_1 = x_1 and x̄_i = ((i - 1) * M_(i - 1) + x_i) / i for all i > 1.
1593 Exponential Moving Average - x̄_i is computed as the weighted average of x_i and x̄_(i - 1) with α as
1594 an argument specifying x_i's weight. To be precise, x̄_1 = x_1 and x̄_i = α * x_i + (α - 1) x̄_(i-1).
1597 Average Difference - The enveloping delta d is computed as the arithmetic mean of the difference
1598 between each x_i and x̄_i.
1600 Moving Average Standard Deviation - d is computed like the standard deviation except the deviation
1601 for each term is measured from the moving average instead of the sample arithmetic mean. i.e. it uses
1602 the average of (x_i - x̄_i)^2 as the "sample variance" instead of the conventional (x_i - x̄)^2 where
1603 x̄ is the sample mean of all x_i's. This change was necessary since our time series is non-stationary.
1606 Each strategy is cloned for an App.Pane instance so that its parameterList can be configured per pane.
1607 The configuration of the currently chosen strategies is saved in the query string for convenience.
1609 Also added the "stat pane" to choose a moving average strategy and a enveloping strategy in each pane.
1611 * public/v2/app.css: Specify the fill color for all SVG groups in the pane toolbar icons.
1614 (App.Pane._fetch): Delegate the creation of 'chartData' to _computeChartData.
1615 (App.Pane.updateStatisticsTools): Added. Clones moving average and enveloping strategies for this pane.
1616 (App.Pane._cloneStrategy): Added. Clones a strategy for a new pane.
1617 (App.Pane._configureStrategy): Added. Finds and configures a strategy from the configuration retrieved
1618 from the query string via ChartsController.
1619 (App.Pane._computeChartData): Added. Creates chartData from fetchedData.
1620 (App.Pane._computeMovingAverage): Added. Computes the moving average and the envelope.
1621 (App.Pane._executeStrategy): Added.
1622 (App.Pane._updateStrategyConfigIfNeeded): Pushes the strategy configurations to the query string via
1624 (App.ChartsController._parsePaneList): Merged the query string arguments for the range and point
1625 selections, and added two new arguments for the moving average and the enveloping configurations.
1626 (App.ChartsController._serializePaneList): Ditto.
1627 (App.ChartsController._scheduleQueryStringUpdate): Observes strategy configurations.
1628 (App.PaneController.actions.toggleBugsPane): Hides the stat pane.
1629 (App.PaneController.actions.toggleSearchPane): Hides the stat pane.
1630 (App.PaneController.actions.toggleStatPane): Added.
1632 * public/v2/chart-pane.css: Added CSS rules for the new stat pane. Also added .foreground class for the
1633 current (as opposed to baseline and target) time series for when it's the most foreground graph without
1634 moving average and its envelope overlapping on top of it.
1636 * public/v2/index.html: Added the templates for the stat pane and the corresponding icon (Σ).
1638 * public/v2/interactive-chart.js:
1639 (App.InteractiveChartComponent.chartDataDidChange): Unset _totalWidth and _totalHeight to avoid exiting
1640 early inside _updateDimensionsIfNeeded when chartData changes after the initial layout.
1641 (App.InteractiveChartComponent.didInsertElement): Attach event listeners here instead of inside
1642 _constructGraphIfPossible since that could be called multiple times on the same SVG element.
1643 (App.InteractiveChartComponent._constructGraphIfPossible): Clear down the old SVG element we created
1644 but don't bother removing individual paths and circles. Added the code to show the moving average time
1645 series when there is one. Also add "foreground" class on SVG elements for the current time series when
1646 we're not showing the moving average. chart-pane.css has been updated to "dim down" the current time
1647 series when "foreground" is not set.
1648 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Take the moving average time series into
1649 account when computing the y-axis range.
1650 (App.InteractiveChartComponent._brushChanged): Removed 'selectionIsLocked' argument as it's useless.
1652 * public/v2/js/statistics.js:
1653 (Statistics.MovingAverageStrategies): Added.
1654 (Statistics.EnvelopingStrategies): Added.
1656 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1658 The delta value in the chart pane sometimes doens't show '+' for a positive delta
1659 https://bugs.webkit.org/show_bug.cgi?id=141340
1661 Reviewed by Andreas Kling.
1663 The bug was caused by computeStatus prefixing the value delta with '+' if it's greater than 0 after
1664 it had already been formatted. Fixed the bug by using a formatter that always emits a sign symbol.
1667 (App.Pane.computeStatus):
1668 (App.createChartData):
1670 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1672 Unreviewed build fix. currentPoint wasn't defined when selectedPoints was used to find points.
1675 (App.PaneController._updateDetails):
1677 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1679 Unreviewed. Commit the forgotten change.
1681 * public/include/manifest.php:
1683 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1685 New perf dashboard should have multiple dashboard pages
1686 https://bugs.webkit.org/show_bug.cgi?id=141339
1688 Reviewed by Chris Dumez.
1690 Added the support for multiple dashboard pages. Also added the status of the latest data point.
1691 e.g. "5% better than target"
1693 * public/v2/app.css: Tweaked the styles to work around the fact Ember.js creates empty script elements.
1694 Also hid the border lines around charts on the dashboard page for a cleaner look.
1697 (App.IndexRoute): Added. Navigate to /dashboard/<defaultDashboardName> once the manifest.json is loaded.
1698 (App.IndexRoute.beforeModel): Added.
1699 (App.DashboardRoute): Added.
1700 (App.DashboardRoute.model): Added. Return the dashboard specified by the name.
1701 (App.CustomDashboardRoute): Added. This route is used for a customized dashboard specified by "grid".
1702 (App.CustomDashboardRoute.model): Create a dashboard model from "grid" query parameter.
1703 (App.CustomDashboardRoute.renderTemplate): Use the dashboard template.
1704 (App.DashboardController): Renamed from App.IndexController.
1705 (App.DashboardController.modelChanged): Renamed from gridChanged. Removed the code to deal with "grid"
1706 and "defaultDashboard" as these are taken care of by newly added routers.
1707 (App.DashboardController.computeGrid): Renamed from updateGrid. No longer updates "grid" since this is
1708 now done in actions.toggleEditMode.
1709 (App.DashboardController.actions.toggleEditMode): Navigate to CustomDashboardRoute when start editing
1710 an existing dashboard.
1712 (App.Pane.computeStatus): Moved from App.PaneController so that to be called in App.Pane.latestStatus.
1713 Also moved the code to compute the delta with respect to the previous data point from _updateDetails.
1714 (App.Pane._relativeDifferentToLaterPointInTimeSeries): Ditto.
1715 (App.Pane.latestStatus): Added. Used by the dashboard template to show the status of the latest result.
1717 (App.createChartData): Added deltaFormatter to show less significant digits for differences.
1719 (App.PaneController._updateDetails): Updated per changes to computeStatus.
1721 * public/v2/chart-pane.css: Added style rules for the status labels on the dashboard.
1723 * public/v2/data.js:
1724 (TimeSeries.prototype.lastPoint): Added.
1726 * public/v2/index.html: Prefetch manifest.json as soon as possible, show the latest data points' status
1727 on the dashboard, and enumerate all predefined dashboards.
1729 * public/v2/interactive-chart.js:
1730 (App.InteractiveChartComponent._relayoutDataAndAxes): Slightly adjust the offset at which we show unit
1731 for the dashboard page.
1733 * public/v2/manifest.js:
1734 (App.Dashboard): Inherit from App.NameLabelModel now that each predefined dashboard has a name.
1735 (App.MetricSerializer.normalizePayload): Parse all predefined dashboards instead of a single dashboard.
1736 IDs are generated for each dashboard for forward compatibility.
1738 (App.Manifest.dashboardByName): Added.
1739 (App.Manifest.defaultDashboardName): Added.
1740 (App.Manifest._fetchedManifest): Create dashboard model objects for all predefined ones.
1742 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1744 Move commits viewer to the end of details view
1745 https://bugs.webkit.org/show_bug.cgi?id=141315
1747 Rubber-stamped by Andreas Kling.
1749 Show the difference instead of the old value per kling's request.
1752 (App.PaneController._updateDetails):
1753 * public/v2/index.html:
1755 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1757 Move commits viewer to the end of details view
1758 https://bugs.webkit.org/show_bug.cgi?id=141315
1760 Reviewed by Andreas Kling.
1762 Improved the way list of commits are shown per kling's request.
1765 (App.PaneController._updateDetails): Always show the old value even when a single point is selected.
1767 * public/v2/chart-pane.css: Updated the style for the commits viewer.
1769 * public/v2/commits-viewer.js:
1770 (App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
1771 (App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.
1773 * public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
1774 moved the commits viewers out of the details tables so that they don't interleave revision data.
1776 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1778 New perf dashboard should compare results to baseline and target
1779 https://bugs.webkit.org/show_bug.cgi?id=141286
1781 Reviewed by Chris Dumez.
1783 Compare the selected value against baseline and target values as done in v1. e.g. "5% below target"
1784 Also use d3.format to format the selected value to show four significant figures.
1787 (App.Pane.searchCommit):
1788 (App.Pane._fetch): Create time series here via createChartData so that _computeStatus can use them
1789 to compute the status text without having to recreate them.
1790 (App.createChartData): Added.
1791 (App.PaneController._updateDetails): Use 3d.format on current and old values.
1792 (App.PaneController._computeStatus): Added. Computes the status text.
1793 (App.PaneController._relativeDifferentToLaterPointInTimeSeries): Added.
1794 (App.AnalysisTaskController._fetchedManifest): Use createChartData as done in App.Pane._fetch. Also
1795 format the values using chartData.formatter.
1797 * public/v2/chart-pane.css: Enlarge the status text. Show the status text in red if it's worse than
1798 the baseline and in blue if it's better than the target.
1800 * public/v2/data.js:
1801 (TimeSeries.prototype.findPointAfterTime): Added.
1803 * public/v2/index.html: Added a new tbody for the status text and the selected value. Also fixed
1804 the bug that we were not showing the old value's unit.
1806 * public/v2/interactive-chart.js:
1807 (App.InteractiveChartComponent._constructGraphIfPossible): Use chartData.formatter. Also cleaned up
1808 the code to show the baseline and the target lines.
1810 * public/v2/manifest.js:
1811 (App.Manifest.fetchRunsWithPlatformAndMetric): Added smallerIsBetter.
1813 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1815 Unreviewed build fix.
1818 (App.IndexController.gridChanged): Use store.createRecord to create a custom dashboard as required by Ember.js
1820 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1822 New perf dashboard doesn't preserve the number of days when clicking on a dashboard chart
1823 https://bugs.webkit.org/show_bug.cgi?id=141280
1825 Reviewed by Chris Dumez.
1827 Fixed the bug by passing in "since" as a query parameter to the charts page.
1829 Also fixed the styling issue that manifests when a JSON fetching fails on "Dashboard" page.
1831 * public/v2/app.css: Fixed CSS rules for error messages shown in the place of charts.
1833 (App.IndexController): Changed the default number of days from one month to one week.
1834 (App.IndexController._sharedDomainChanged): Set "since" property on the controller.
1835 * public/v2/index.html: Pass in "since" property on the controller as a query parameter.
1837 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1839 New perf dashboard erroneously clears zoom when poping history items
1840 https://bugs.webkit.org/show_bug.cgi?id=141278
1842 Reviewed by Chris Dumez.
1844 The bug was caused by _sharedZoomChanged updating overviewSelection without updating mainPlotDomain.
1846 Updating overviewSelection resulted in _overviewSelectionChanged, which observes changes to overviewSelection,
1847 to schedule a call to propagateZoom, which in turn overrode "sharedZoom" we just parsed from the query string.
1850 (App.PaneController._overviewSelectionChanged): Don't schedule propagateZoom if the selected domain is already
1851 shown in the main plot.
1852 (App.PaneController._sharedZoomChanged): Set both overviewSelection and mainPlotDomain to avoid overriding
1853 "sharedZoom" via propagateZoom inside _overviewSelectionChanged.
1855 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1857 New perf dashboard shows null as the aggregator name if no aggregation is done
1858 https://bugs.webkit.org/show_bug.cgi?id=141256
1860 Reviewed by Chris Dumez.
1862 Don't show the aggregator name if there isn't one.
1864 * public/v2/manifest.js:
1867 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1869 Unreviewed build fix after r179611.
1871 * public/v2/interactive-chart.js:
1873 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1875 Perf dashboard doesn’t show the right unit for Safari UI tests
1876 https://bugs.webkit.org/show_bug.cgi?id=141238
1878 Reviewed by Darin Adler.
1880 Safari UI tests use custom metrics that end with "Time". This patch teaches the perf dashboard how to
1881 get the unit for a given metric based on the suffix of the metric name instead of hard-coding the mapping
1882 between metrics and their units.
1884 * public/js/helper-classes.js:
1885 (PerfTestRuns): Use the suffix of the metric name to compute the unit.
1886 * public/v2/manifest.js:
1887 (App.Manifest.fetchRunsWithPlatformAndMetric): Ditto. Also set "useSI" property iff for "bytes".
1888 * public/v2/interactive-chart.js:
1889 (App.InteractiveChartComponent._constructGraphIfPossible): Respect useSI. Use toPrecision(3) otherwise.
1890 (App.InteractiveChartComponent._relayoutDataAndAxes): Place the unit vertically on the left of ticks.
1892 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1894 Interactive chart component provides two duplicate API for highlighting points
1895 https://bugs.webkit.org/show_bug.cgi?id=141234
1897 Reviewed by Chris Dumez.
1899 Prior to this patch, the interactive chart component supported highlightedItems for finding commits
1900 on the main charts page and markedPoints to show the two end points in the analysis task page.
1902 This patch merges markedPoints into highlightedItems.
1905 (App.AnalysisTaskController._fetchedRuns): Use highlightedItems.
1906 * public/v2/chart-pane.css:
1907 * public/v2/index.html: Ditto.
1908 * public/v2/interactive-chart.js:
1909 (App.InteractiveChartComponent._constructGraphIfPossible): Make this._highlights an array instead of
1910 array of arrays. Also call _highlightedItemsChanged at the end to fix the bug that we never highlight
1911 items if highlightedItems was set before the initial layout.
1912 (App.InteractiveChartComponent._relayoutDataAndAxes):
1913 (App.InteractiveChartComponent._updateHighlightPositions): Now that highlights are circles instead of
1914 vertical lines, just set cx and cy as done for other "dots".
1915 (App.InteractiveChartComponent._highlightedItemsChanged): Exit early only if _clippedContainer wasn't
1916 already set; i.e. _constructGraphIfPossible hasn't been called. Also updated the logic to accommodate
1917 the fact this._highlights is an array of elements instead of an array of arrays of elements. Finally,
1918 set the radius of highlight circles here.
1920 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1922 Don’t use repository names as id’s.
1923 https://bugs.webkit.org/show_bug.cgi?id=141226
1925 Reviewed by Chris Dumez.
1927 Not using repository names as their id's reduces the need to fetch the entire repositories table.
1928 Since names of repositories are available in manifest.json, we can resolve their names in the front end.
1930 * Websites/perf.webkit.org/public/api/runs.php:
1931 (parse_revisions_array): No longer uses $repository_id_to_name.
1932 (main): No longer populates $repository_id_to_name.
1934 * Websites/perf.webkit.org/public/api/triggerables.php:
1935 (main): Don't resolve repository names.
1937 * Websites/perf.webkit.org/public/include/manifest.php:
1938 (ManifestGenerator::repositories): Use repositories ids as keys in the result and include their names.
1939 (ManifestGenerator::bug_trackers): Don't resolve repository names.
1941 * Websites/perf.webkit.org/public/js/helper-classes.js:
1942 (TestBuild): Renamed repositoryName to repositoryId.
1943 (TestBuild.revision): Ditto.
1944 (TestBuild.formattedRevisions): Ditto. Continue to use the repository name in the formatted result
1945 since this is the text shown to human.
1947 * Websites/perf.webkit.org/public/v2/app.js:
1948 (App.pane.searchCommit): Renamed repositoryName to repositoryId.
1949 (App.PaneController._updateDetails): Ditto.
1950 (App.AnalysisTaskController.updateRoots): Ditto.
1952 * Websites/perf.webkit.org/public/v2/data.js:
1953 (Measurement): Ditto.
1954 (Measurement.prototype.commitTimeForRepository): Ditto.
1955 (Measurement.prototype.formattedRevisions): Ditto.
1957 * Websites/perf.webkit.org/public/v2/index.html: Use the repository name and the repository id as
1958 select element's label and value respectively.
1960 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1962 Unreviewed build fix. Declare $repository_id_to_name in the global scope.
1964 * public/api/runs.php:
1966 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1968 /api/runs.php should have main function
1969 https://bugs.webkit.org/show_bug.cgi?id=141220
1971 Reviewed by Benjamin Poulain.
1973 Wrapped the code inside main function for clarity.
1975 * public/api/runs.php:
1977 2015-01-27 Ryosuke Niwa <rniwa@webkit.org>
1979 Unreviewed build fix. "eta" isn't set on a in-progress build on a newly added builder.
1981 * tools/sync-with-buildbot.py:
1982 (find_request_updates):
1984 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
1986 Perf dashboard always assigns the result of A/B testing with build request 1
1987 https://bugs.webkit.org/show_bug.cgi?id=140382
1989 Reviewed by Darin Adler.
1991 The bug was caused by the expression array_get($report, 'jobId') or array_get($report, 'buildRequest')
1992 which always evaluated to 1 when the report contained jobId. Fixed the bug by cascading array_get instead.
1994 Also fixed a typo as well as a bug that reports were never associated with builds.
1996 * public/include/report-processor.php:
1997 (ReportProcessor::process): Don't use "or" to find the non-null value since that always evaluates to 1
1998 instead of the first non-null value.
1999 (ReportProcessor::resolve_build_id): Fixed the typo by adding the missing "$this->".
2000 (ReportProcessor::commit): Associate the report with the corresponding build as intended.
2002 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
2004 Unreviewed typo fix. The prefix in triggerable_configurations is "trigconfig", not "trigrepo".
2006 * public/admin/tests.php:
2008 2015-01-10 Ryosuke Niwa <rniwa@webkit.org>
2010 Unreviewed build fix. Removed the stale code.
2012 * public/admin/triggerables.php:
2014 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
2016 Perf dashboard should have the ability to post A/B testing builds
2017 https://bugs.webkit.org/show_bug.cgi?id=140317
2019 Rubber-stamped by Simon Fraser.
2021 This patch adds the support for triggering A/B testing from the perf dashboard.
2023 We add a few new tables to the database. "build_triggerables", which represents a set of builders
2024 that accept A/B testing. "triggerable_repositories" associates each "triggerable" with a fixed set
2025 of repositories for which an arbitrary revision can be specified for A/B testing.
2026 "triggerable_configurations" specifies a triggerable available on a given test on a given platform.
2027 "roots" table which specifies the revision used in a given root set in each repository.
2029 * init-database.sql: Added "build_triggerables", "triggerable_repositories",
2030 "triggerable_configurations", and "roots" tables. Added references to "build_triggerables",
2031 "platforms", and "tests" tables as well as columns to store status, status url, and creation time
2032 to build_requests table. Also made each test group's name unique in a given analysis task as it
2033 would be confusing to have multiple test groups of the same name.
2035 * public/admin/tests.php: Added the UI and the code to associate a test with a triggerable.
2037 * public/admin/triggerables.php: Added. Manages the list of triggerables as well as repositories
2038 for which a specific revision can be set in an A/B testing on a given triggerable.
2040 * public/api/build-requests.php: Added. Returns the list of open build requests on a specified
2041 triggerable. Also updates the status' and the status urls of specified build requests when
2042 buildRequestUpdates is provided in the raw POST data.
2045 * public/api/runs.php:
2046 (fetch_runs_for_config): Don't include results associated with a build request, meaning they are
2047 results of an A/B testing.
2049 * public/api/test-groups.php:
2050 (main): Use the newly added BuildRequestsFetcher. Also merged fetch_test_groups_for_task back.
2052 * public/api/triggerables.php: Added.
2053 (main): Returns a list of triggerables or a triggerable associated with a given analysis task.
2055 * public/include/admin-header.php:
2057 * public/include/build-requests-fetcher.php: Added. Extracted from public/api/test-groups.php.
2058 (BuildRequestsFetcher): This class abstracts the process of fetching a list of builds requests
2059 and root sets used in those requests.D
2060 (BuildRequestsFetcher::__construct):
2061 (BuildRequestsFetcher::fetch_for_task):
2062 (BuildRequestsFetcher::fetch_for_group):
2063 (BuildRequestsFetcher::fetch_incomplete_requests_for_triggerable):
2064 (BuildRequestsFetcher::has_results):
2065 (BuildRequestsFetcher::results):
2066 (BuildRequestsFetcher::results_with_resolved_ids):
2067 (BuildRequestsFetcher::results_internal):
2068 (BuildRequestsFetcher::root_sets):
2069 (BuildRequestsFetcher::fetch_roots_for_set):
2071 * public/include/db.php:
2072 (Database::prefixed_column_names): Don't return "$prefix_" when there are no columns.
2073 (Database::insert_row): Support taking an empty array for values. This is useful in "root_sets"
2074 table since it only has the primary key, id, column.
2075 (Database::select_or_insert_row):
2076 (Database::update_or_insert_row):
2077 (Database::update_row): Added.
2078 (Database::_select_update_or_insert_row): Takes an extra argument specifying whether a new row
2079 should be inserted when no row matches the specified criteria. This is used while updating
2080 build_requests' status and url in public/api/build-requests.php since we shouldn't be inserting
2081 new build requests in that API.
2082 (Database::select_rows): Also use "1 == 1" in the select query when the query criteria is empty.
2083 This is used in public/api/triggerables.php when no analysis task is specified.
2085 * public/include/json-header.php:
2086 (find_triggerable_for_task): Added. Finds a triggerable available on a given test. We return the
2087 triggerable associated with the closest ancestor of the test. Since issuing a new query for each
2088 ancestor test is expensive, we retrieve triggerable for all ancestor tests at once and manually
2089 find the closest ancestor with a triggerable.
2091 * public/include/report-processor.php:
2092 (ReportProcessor::process):
2093 (ReportProcessor::resolve_build_id): Associate a build request with the newly created build
2094 if jobId or buildRequest is specified.
2096 * public/include/test-name-resolver.php:
2097 (TestNameResolver::map_metrics_to_tests): Store the entire metric row instead of its name so that
2098 test_exists_on_platform can use it. The last diff in public/admin/tests.php adopts this change.
2099 (TestNameResolver::test_exists_on_platform): Added. Returns true iff the test has ever run on
2102 * public/include/test-path-resolver.php: Added.
2103 (TestPathResolver): This class abstracts the ancestor chains of a test. It retrieves the entire
2104 "tests" table to do this since there could be arbitrary number of ancestors for a given test.
2105 This class is a lot more lightweight than TestNameResolver, which retrieves a whole bunch of tables
2106 in order to compute full test metric names.
2107 (TestPathResolver::__construct):
2108 (TestPathResolver::ancestors_for_test): Returns the ordered list of ancestors from the closest to
2109 the highest (a test without a parent).
2110 (TestPathResolver::path_for_test): Returns a test "path", the ordered list of test names from
2111 the highest ancestor to the test itself.
2112 (TestPathResolver::ensure_id_to_test_map): Fetches "tests" table to construct id_to_test_map.
2114 * public/privileged-api/create-test-group.php: Added. An API to create A/B testing groups.
2116 (commit_sets_from_root_sets): Given a dictionary of repository names to a pair of revisions
2117 for sets A and B respectively, returns a pair of arrays, each of which contains the corresponding
2118 set of "commits" for sets A and B respectively. e.g. {"WebKit": [1, 2], "Safari": [3, 4]} will
2119 result in [[WebKit commit at r1, Safari commit at r3], [WebKit commit at r2, Safari commit at r4]].
2121 * public/v2/analysis.js:
2122 (App.AnalysisTask.testGroups): Takes arguments so that set('testGroups') will invalidate the cache.
2123 (App.AnalysisTask.triggerable): Added. Retrieves the triggerable associated with the task lazily.
2124 (App.TestGroup.rootSets): Added. Returns the list of root set ids used in this A/B testing group.
2125 (App.TestGroup.create): Added. Creates a new A/B testing group.
2126 (App.Triggerable): Added.
2127 (App.TriggerableAdapter): Added.
2128 (App.TriggerableAdapter.buildURL): Added.
2129 (App.BuildRequest.testGroup): Renamed from group.
2130 (App.BuildRequest.orderLabel): Added. One-based index to be used in labels.
2131 (App.BuildRequest.config): Added. Returns either 'A' or 'B' depending on the configuration used
2132 in this build request.
2133 (App.BuildRequest.status): Added.
2134 (App.BuildRequest.statusLabel): Added. Returns a human friendly label for the current status.
2135 (App.BuildRequest): Removed buildNumber, buildBuilder, as well as buildTime as they're unused.
2138 (App.AnalysisTaskController.testGroups): Added.
2139 (App.AnalysisTaskController.possibleRepetitionCounts): Added.
2140 (App.AnalysisTaskController.updateRoots): Renamed from roots. This is also no longer a property
2141 but an observer that updates "roots" property. Filter out the repositories that are not accepted
2142 by the associated triggerable as they will be ignored.
2143 (App.AnalysisTaskController.actions.createTestGroup): Added.
2145 * public/v2/index.html: Updated the UI, and added a form element to trigger createTestGroup action.
2147 * tools/sync-with-buildbot.py: Added. This scripts posts new builds on buildbot and reports back
2148 the status of those builds to the perf dashboard. A similar script can be written to support
2149 other continuous builds systems.
2150 (main): Fetches the list of pending builds as well as currently running or completed builds from
2151 a buildbot, and report new statuses of builds requests to the perf dashboard. It will then schedule
2152 a single new build on each builder with no pending builds, and marks the set of open build requests
2153 that have been scheduled to run on the buildbot but not found in the first step as stale.
2154 (load_config): Loads a JSON that contains the configurations for each builder. e.g.
2157 "platform": "mac-mavericks",
2158 "test": ["Parser", "html5-full-render.html"],
2159 "builder": "Trunk Syrah Production Perf AB Tests",
2161 "forcescheduler": "force-mac-mavericks-release-perf",
2162 "webkit_revision": "$WebKit",
2163 "jobid": "$buildRequest"
2168 (find_request_updates): Return a list of build request status updates to make based on the pending
2169 builds as well as in-progress and completed builds on each builder on the buildbot. When a build is
2170 completed, we use the special status "failedIfNotCompleted" which results in "failed" status only
2171 if the build request had not been completed. This is necessary because a failed build will not
2172 report its failed-ness back to the perf dashboard in some cases; e.g. lost slave or svn up failure.
2173 (update_and_fetch_build_requests): Submit the build request status updates and retrieve the list
2174 of open requests the perf dashboard has.
2175 (find_stale_request_updates): Compute the list of build requests that have been scheduled on the
2176 buildbot but not found in find_request_updates. These build requests are lost. e.g. a master reboot
2177 or human canceling a build may trigger such a state.
2178 (schedule_request): Schedules a build with the arguments specified in the configuration JSON after
2179 replacing repository names with their revisions and buildRequest with the build request id.
2180 (config_for_request): Finds a builder for the test and the platform of a build request.
2181 (fetch_json): Fetches a JSON from the specified URL, optionally with BasicAuth.
2182 (property_value_from_build): Returns the value of a specific property in a buildbot build.
2183 (request_id_from_build): Returns the build request id of a given buildbot build if there is one.
2185 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
2187 Cache-control should be set only on api/runs
2188 https://bugs.webkit.org/show_bug.cgi?id=140312
2190 Reviewed by Andreas Kling.
2192 Some JSON APIs such as api/analysis-tasks can't be cached even for a short period of time (e.g. a few minutes)
2193 since they can be modified by the user on demand. Since only api/runs.php takes a long time to generate JSONs,
2194 just set cache-control there instead of json-header.php which is used by other JSON APIs.
2196 Also set date_default_timezone_set in db.php since we never use non-UTC timezone in our scripts.
2198 * public/api/analysis-tasks.php:
2199 * public/api/runs.php: Set the cache control headers.
2200 * public/api/test-groups.php:
2201 * public/include/db.php: Set the default timezone to UTC.
2202 * public/include/json-header.php: Don't set the cache control headers.
2204 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
2206 api/report-commit should authenticate with a slave name and password
2207 https://bugs.webkit.org/show_bug.cgi?id=140308
2209 Reviewed by Benjamin Poulain.
2211 Use a slave name and a password to authenticate new commit reports.
2213 * public/api/report-commits.php:
2215 * public/include/json-header.php:
2216 (verify_slave): Renamed and repurposed from verify_builder in report-commits.php. Now authenticates with
2217 a slave name and a password instead of a builder name and a password.
2218 * tests/api-report-commits.js: Updated tests.
2219 * tools/pull-svn.py:
2220 (main): Renamed variables.
2221 (submit_commits): Submits slaveName and slavePassword instead of builderName and builderPassword.
2223 2014-12-19 Ryosuke Niwa <rniwa@webkit.org>
2225 Perf dashboard should support authentication via a slave password
2226 https://bugs.webkit.org/show_bug.cgi?id=139837
2228 Reviewed by Andreas Kling.
2230 For historical reasons, perf dashboard conflated builders and build slaves. As a result we ended up
2231 having to add multiple builders with the same password when a single build slave is shared among them.
2233 This patch introduces the concept of build_slave into the perf dashboard to end this madness.
2235 * init-database.sql: Added build_slave table as well as references to it in builds and reports.
2237 * public/admin/build-slaves.php: Added.
2239 * public/admin/builders.php: Added the support for updating passwords.
2241 * public/include/admin-header.php:
2242 (update_field): Takes an extra argument when a new value needs to be supplied by the caller instead of
2243 being retrieved from $_POST.
2244 (AdministrativePage::render_table): Use array_get to retrieve a value out of the database row since
2245 the raw may not exist (e.g. new_password).
2246 (AdministrativePage::render_form_to_add): Added the support for post_insertion. Don't render the form
2247 control here when this flag evaluates to TRUE.
2249 * public/include/report-processor.php:
2250 (ReportProcessor::process): Added the logic to authenticate with slaveName and slavePassword if those
2251 values are present in the report. In addition, try authenticating builderName with slavePassword if
2252 builderPassword is not specified. When neither password is specified, exit with BuilderNotFound.
2253 Also insert the slave or the builder whichever is missing after we've successfully authenticated.
2254 (ReportProcessor::construct_build_data): Takes a builder ID and an optional slave ID instead of
2256 (ReportProcessor::store_report): Store the slave ID with the report.
2257 (ReportProcessor::resolve_build_id): Exit with MismatchingBuildSlave when the slave associated with
2258 the matching build is different from what's being reported.
2260 * tests/api-report.js: Added a bunch of tests to test the new features of /api/report.
2263 2014-12-18 Ryosuke Niwa <rniwa@webkit.org>
2265 New perf dashboard should not duplicate author information in each commit
2266 https://bugs.webkit.org/show_bug.cgi?id=139756
2268 Reviewed by Darin Adler.
2270 Instead of each commit having author name and email, make it reference a newly added committers table.
2271 Also replace "email" by "account" since some repositories don't use emails as account names.
2273 This improves the keyword search performance in commits.php since LIKE now runs on committers table,
2274 which only contains as many rows as there are accounts in each repository, instead of commits table
2275 which contains every commit ever happened in each repository.
2277 To migrate an existing database into match the new schema, run:
2281 INSERT INTO committers (committer_repository, committer_name, committer_email)
2282 (SELECT DISTINCT commit_repository, commit_author_name, commit_author_email
2283 FROM commits WHERE commit_author_email IS NOT NULL);
2285 ALTER TABLE commits ADD COLUMN commit_committer integer REFERENCES committers ON DELETE CASCADE;
2287 UPDATE commits SET commit_committer = committer_id FROM committers
2288 WHERE commit_repository = committer_repository AND commit_author_email = committer_email;
2290 ALTER TABLE commits DROP COLUMN commit_author_name CASCADE;
2291 ALTER TABLE commits DROP COLUMN commit_author_email CASCADE;
2295 * init-database.sql: Added committers table, and replaced author columns in commits table by a foreign
2296 reference to committers. Also added the missing drop table statements.
2298 * public/api/commits.php:
2299 (main): Fetch the corresponding committers row for a single commit. Also wrap a single commit by
2300 an array here instead of doing it in format_commit.
2301 (fetch_commits_between): Updated queries to JOIN commits with committers.
2302 (format_commit): Takes both commit and committers rows. Also don't wrap the result in an array as that
2303 is now done in main.
2305 * public/api/report-commits.php:
2306 (main): Store the reported committer information or update the existing entry if there is one.
2308 * tests/admin-regenerate-manifest.js: Fixed tests.
2310 * tests/api-report-commits.js: Ditto. Also added a test for updating an existing committer entry.
2312 * tools/pull-svn.py: Renamed email to account.
2314 (fetch_commit_and_resolve_author):
2316 (resolve_author_name_from_account):
2317 (resolve_author_name_from_email): Deleted.
2319 2014-12-17 Ryosuke Niwa <rniwa@webkit.org>
2321 Unreviewed build fix.
2323 * public/v2/index.html: Include js files we extracted in r177424.
2325 2014-12-16 Ryosuke Niwa <rniwa@webkit.org>
2327 Unreviewed. Adding the forgotten svnprop.
2329 * tools/pull-svn.py: Added property svn:executable.
2331 2014-12-16 Ryosuke Niwa <rniwa@webkit.org>
2333 Split InteractiveChartComponent and CommitsViewerComponent into separate files
2334 https://bugs.webkit.org/show_bug.cgi?id=139716
2336 Rubber-stamped by Benjamin Poulain.
2338 Refactored InteractiveChartComponent and CommitsViewerComponent out of app.js into commits-viewer.js
2339 and interactive-chart.js respectively since app.js has gotten really large.
2342 * public/v2/commits-viewer.js: Added.
2343 * public/v2/interactive-chart.js: Added.
2345 2014-12-02 Ryosuke Niwa <rniwa@webkit.org>
2347 New perf dashboard's chart UI is buggy
2348 https://bugs.webkit.org/show_bug.cgi?id=139214
2350 Reviewed by Chris Dumez.
2352 The bugginess was caused by weird interactions between charts and panes. Rewrote the code to fix it.
2354 Superfluous selectionChanged and domainChanged "event" actions were removed from the interactive chart
2355 component. This is not how Ember.js components should interact to begin with. The component now exposes
2356 selectedPoints and always updates selection instead of sharedSelection.
2359 (App.ChartsController.present): Added. We can't call Date.now() in various points in our code as that
2360 would lead to infinite mutual recursions since X-axis domain values wouldn't match up.
2361 (App.ChartsController.updateSharedDomain): This function was completely useless. The overview's start
2362 and end time should be completely determined by "since" and the present time.
2363 (App.ChartsController._startTimeChanged): Ditto.
2364 (App.ChartsController._scheduleQueryStringUpdate):
2365 (App.ChartsController._updateQueryString): Set "zoom" only if it's different from the shared domain.
2367 (App.domainsAreEqual): Moved from InteractiveChartComponent._xDomainsAreSame.
2369 (App.PaneController.actions.createAnalysisTask): Use selectedPoints property set by the chart.
2370 (App.PaneController.actions.overviewDomainChanged): Removed; only needed to call updateSharedDomain.
2371 (App.PaneController.actions.rangeChanged): Removed. _showDetails (renamed to _updateDetails) directly
2372 observes the changes to selectedPoints property as it gets updated by the main chart.
2373 (App.PaneController._overviewSelectionChanged): This was previously a dead code. Now it's used again
2374 with a bug fix. When the overview selection is cleared, we use the same domain in the main chart and
2376 (App.PaneController._sharedDomainChanged): Fixed a but that it erroneously updates the overview domain
2377 when domain arrays aren't identical. This was causing a subtle race with other logic.
2378 (App.PaneController._sharedZoomChanged): Ditto. Also don't set mainPlotDomain here as any changes to
2379 overviewSelection will automatically propagate to the main plot's domain as they're aliased.
2380 (App.PaneController._currentItemChanged): Merged into _updateDetails (renamed from _showDetails).
2381 (App.PaneController._updateDetails): Previously, this function took points and inspected _hasRange to
2382 see if those two points correspond to a range or a single data point. Rewrote all that logic by
2383 directly observing selectedPoints and currentItem properties instead of taking points and relying on
2384 an instance variable, which was a terrible API.
2385 (App.PaneController._updateCanAnalyze): Use selectedPoints property. Since this property is only set
2386 when the main plot has a selected range, we don't have to check this._hasRange anymore.
2388 (App.InteractiveChartComponent._updateDomain): No longer sends domainChanged "event" action.
2389 (App.InteractiveChartComponent._sharedSelectionChanged): Removed. This is a dead code.
2390 (App.InteractiveChartComponent._updateSelection):
2391 (App.InteractiveChartComponent._xDomainsAreSame): Moved to App.domainsAreEqual.
2392 (App.InteractiveChartComponent._setCurrentSelection): Update the selection only if needed. Also set
2393 selectedPoints property.
2395 (App.AnalysisTaskController._fetchedRuns):
2396 (App.AnalysisTaskController._rootChangedForTestSet):
2398 * public/v2/index.html:
2399 Removed non-functional sharedSelection and superfluous selectionChanged and domainChanged actions.
2401 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
2403 Unreviewed. Fixed syntax errors.
2405 * init-database.sql:
2406 * public/api/commits.php:
2408 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
2410 The dashboard on new perf monitor should be configurable
2411 https://bugs.webkit.org/show_bug.cgi?id=138994
2413 Reviewed by Benjamin Poulain.
2415 For now, make it configurable via config.json. We should eventually make it configurable via
2416 an administrative page but this will do for now.
2418 * config.json: Added the empty dashboard configuration.
2420 * public/include/manifest.php: Include the dashboard configuration in the manifest file.
2423 (App.IndexController): Removed defaultTable since this is now dynamically obtained via App.Manifest.
2424 (App.IndexController.gridChanged): Use App.Dashboard to parse the dashboard configuration.
2425 Also obtain the default configuration from App.Manifest.
2426 (App.IndexController._normalizeTable): Moved to App.Dashboard.
2428 * public/v2/manifest.js:
2429 (App.Repository.urlForRevision): Fixed the position of the open curly bracket.
2430 (App.Repository.urlForRevisionRange): Ditto.
2431 (App.Dashboard): Added.
2432 (App.Dashboard.table): Extracted from App.IndexController.gridChanged.
2433 (App.Dashboard.rows): Ditto.
2434 (App.Dashboard.headerColumns): Ditto.
2435 (App.Dashboard._normalizeTable): Moved from App.IndexController._normalizeTable.
2436 (App.MetricSerializer.normalizePayload): Synthesize a dashboard record from the configuration.
2437 Since there is exactly one dashboard object per app, it's okay to hard code an id here.
2438 (App.Manifest._fetchedManifest): Set defaultDashboard to the one and only one dashboard we have.
2440 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
2442 There should be a way to associate bugs with analysis tasks
2443 https://bugs.webkit.org/show_bug.cgi?id=138977
2445 Reviewed by Benjamin Poulain.
2447 Updated associate-bug.php to match the new database schema.
2449 * public/include/json-header.php:
2450 (require_format): Removed the call to camel_case_words_separated_by_underscore since the name is
2451 already camel-cased in require_existence_of. This makes the function usable elsewhere.
2453 * public/privileged-api/associate-bug.php:
2454 (main): Changed the API to take run, bugTracker, and number to match the new database schema.
2455 Also verify that those values are integers using require_format.
2457 * public/v2/analysis.js:
2458 (App.AnalysisTask.label): Added. Concatenates the task's name with the bug numbers.
2459 (App.Bug.label): Added.
2460 (App.BugAdapter): Added.
2461 (App.BugAdapter.createRecord): Use PrivilegedAPI instead of the builtin ajax call.
2462 (App.BuildRequest): Inherit from newly added App.Model, which is set to DS.Model right now.
2464 * public/v2/app.css: Renamed .test-groups to .analysis-group. Also added new rules for the table
2465 containing the bug information.
2468 (App.InteractiveChartComponent._rangesChanged): Added label to range bar objects.
2469 (App.AnalysisTaskRoute):
2470 (App.AnalysisTaskController): Replaced the functionality of App.AnalysisTaskViewModel.
2471 (App.AnalysisTaskController._fetchedManifest): Added.
2472 (App.AnalysisTaskController.actions.associateBug): Added.
2474 * public/v2/chart-pane.css: Renamed .bugs-pane to .analysis-pane.
2476 * public/v2/data.js:
2477 (Measurement.prototype.associateBug): Deleted.
2479 * public/v2/index.html: Renamed .bugs-pane to .analysis-pane and .test-groups to .analysis-group.
2480 Added a table show the bug information. Also hide the chart until chartData is available.
2482 * public/v2/manifest.js:
2485 2014-11-20 Ryosuke Niwa <rniwa@webkit.org>
2487 Fix misc bugs and typos in app.js
2488 https://bugs.webkit.org/show_bug.cgi?id=138946
2490 Reviewed by Benjamin Poulain.
2493 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged):
2494 (App.ChartsController.init):
2495 (App.buildPopup): Renamed from App.BuildPopup.
2496 (App.InteractiveChartComponent._constructGraphIfPossible): Fixed the bug that we were calling
2497 remove() on the wrong object (an array as opposed to elements in the array).
2498 (App.InteractiveChartComponent._highlightedItemsChanged): Check the length of _highlights as
2499 _highlights is always an array and evalutes to true.
2501 2014-11-20 Ryosuke Niwa <rniwa@webkit.org>
2503 New perf dashboard should provide UI to create a new analysis task
2504 https://bugs.webkit.org/show_bug.cgi?id=138910
2506 Reviewed by Benjamin Poulain.
2508 This patch reverts some parts of r175006 and re-introduces bugs associated with analysis tasks.
2509 I'll add UI to show and edit bug numbers associated with an analysis task in a follow up patch.
2511 With this patch, we can create a new analysis task by selection a range of points and opening
2512 "analysis pane" (renamed from "bugs pane"). Each analysis task created is represented by a yellow bar
2513 in the chart hyperlinked to the analysis task.
2515 * init-database.sql: Redefined the bugs to be associated with an analysis task instead of a test run.
2517 * public/api/analysis-tasks.php: Added the support for querying analysis tasks for a specific metric
2518 on a specific platform. Also retrieve and return all bugs associated with analysis tasks.
2520 (fetch_and_push_bugs_to_tasks): Added. Fetches all bugs associated with an array of analysis tasks
2521 and adds the associated bugs to each task in the array.
2524 * public/api/runs.php: Reverted changes made in r175006.
2525 (fetch_runs_for_config):
2528 * public/api/test-groups.php:
2529 (fetch_test_groups_for_task): Use the newly added Database::select_rows.
2531 * public/include/db.php:
2532 (Database::select_first_or_last_row):
2533 (Database::select_rows): Extracted from select_first_or_last_row.
2535 * public/v2/analysis.js:
2536 (App.AnalysisTask): Added "bugs" property.
2537 (App.Bug): Added now that bugs are regular data store objects.
2540 (App.Pane._fetch): Calls this.fetchAnalyticRanges to fetch analysis tasks as well as test runs.
2541 (App.Pane.fetchAnalyticRanges): Added. Fetches analysis tasks for the current metric on the current
2542 platform that are associated with a specific range of runs.
2543 (App.PaneController.actions.toggleBugsPane): Updated per showingBugsPane to showingAnalysisPane rename.
2544 (App.PaneController.actions.associateBug): Deleted.
2545 (App.PaneController.actions.createAnalysisTask): Replaced the pre-condition checks with assertions as
2546 this action should never be triggered when the pre-condition is not met. Also re-fetch analysis tasks
2547 once we've created one.
2548 (App.PaneController.toggleSearchPane): Updated per showingBugsPane to showingAnalysisPane rename.
2549 (App.PaneController._detailsChanged): Ditto. Removed selectedSinglePoint since it's no longer used.
2550 (App.PaneController._showDetails): Call _updateCanAnalyze to update the status of "Analyze" button.
2551 (App.PaneController._updateBugs): Deleted.
2552 (App.PaneController._updateMarkedPoints): Deleted.
2553 (App.PaneController._updateCanAnalyze): Added. Disables the button to create an analysis task when
2554 the name is missing or when at most one point is selected.
2556 (App.InteractiveChartComponent._constructGraphIfPossible): Update the locations of range rects.
2557 (App.InteractiveChartComponent._relayoutDataAndAxes): Ditto.
2558 (App.InteractiveChartComponent._mousePointInGraph): Don't return a point unless the mouse cursor is
2559 on our svg element to avoid locking the current item when a bar shown for an analysis task is clicked.
2560 (App.InteractiveChartComponent._rangesChanged): Added. Creates an array of objects representing
2561 clickable bars for analysis tasks.
2562 (App.InteractiveChartComponent._updateRangeBarRects): Computes the inline style used by each clickable
2563 bar for analysis tasks to place them at the right location.
2564 (App.InteractiveChartComponent.actions.openRange): Added. Forwards the action to the parent controller.
2566 * public/v2/chart-pane.css:
2567 (.chart .extent): Use the same color as the vertical indicator in the highlight behind the selection.
2568 (.chart .rangeBar): Added.
2570 * public/v2/data.js:
2571 (TimeSeries.prototype.nextPoint): Added. Used by _rangesChanged.
2573 * public/v2/index.html: Renamed "bugs pane" to "analysis pane" and removed the UI to associate bugs.
2574 This ability will be reinstated in a follow up patch. Also added a container div and spans for analysis
2575 task bars in the interactive chart component.
2577 2014-11-19 Ryosuke Niwa <rniwa@webkit.org>
2579 Fix typos in r176203.
2582 (App.ChartsController.actions.addPaneByMetricAndPlatform):
2583 (App.AnalysisTaskRoute):
2585 2014-11-18 Ryosuke Niwa <rniwa@webkit.org>
2587 Unreviewed. Updated the install instruction.
2591 2014-11-17 Ryosuke Niwa <rniwa@webkit.org>
2593 App.Manifest shouldn't use App.__container__.lookup
2594 https://bugs.webkit.org/show_bug.cgi?id=138768
2596 Reviewed by Andreas Kling.
2598 Removed the hack to find the store object via App.__container__.lookup.
2599 Pass around the store object instead.
2602 (App.DashboardRow._createPane): Add "store" property to the pane.
2603 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Ditto.
2604 (App.IndexController.gridChanged): Ditto.
2605 (App.IndexController.actions.addRow): Ditto.
2606 (App.IndexController.init): Ditto.
2607 (App.Pane._fetch): Ditto.
2608 (App.ChartsController._parsePaneList): Ditto.
2609 (App.ChartsController._updateQueryString): Ditto.
2610 (App.ChartsController.actions.addPaneByMetricAndPlatform): Ditto.
2611 (App.BuildPopup): Ditto.
2612 (App.AnalysisTaskRoute.model): Ditto.
2613 (App.AnalysisTaskViewModel._taskUpdated): Ditto.
2615 * public/v2/manifest.js:
2616 (App.Manifest.fetch): Removed the code to find the store object.
2618 2014-11-08 Ryosuke Niwa <rniwa@webkit.org>
2620 Fix Ember.js warnings the new perf dashboard
2621 https://bugs.webkit.org/show_bug.cgi?id=138531
2623 Reviewed by Darin Adler.
2625 Fixed various warnings.
2628 (App.InteractiveChartComponent._relayoutDataAndAxes): We can't use "rem". Use this._rem as done for x.
2629 * public/v2/data.js:
2630 (PrivilegedAPI._post): Removed the superfluous console.log.
2631 (CommitLogs.fetchForTimeRange): Ditto.
2632 * public/v2/index.html: Added tbody as required by the HTML specification.
2634 2014-11-07 Ryosuke Niwa <rniwa@webkit.org>
2636 Fix typos in r175768.
2639 (App.AnalysisTaskViewModel.roots):
2641 2014-11-07 Ryosuke Niwa <rniwa@webkit.org>
2643 Introduce the concept of analysis task to perf dashboard
2644 https://bugs.webkit.org/show_bug.cgi?id=138517
2646 Reviewed by Andreas Kling.
2648 Introduced the concept of an analysis task, which is created for a range of measurements for a given metric on
2649 a single platform and used to bisect regressions in the range.
2651 Added a new page to see the list of active analysis tasks and a page to view the contents of an analysis task.
2653 * init-database.sql: Added a bunch of tables to store information about analysis tasks.
2654 analysis_tasks - Represents each analysis task. Associated with a platform and a metric and possibly with two
2655 test runs. Analysis tasks not associated with test runs are used for try new patches.
2656 analysis_test_groups - A test group in an analysis task represents a bunch of related A/B testing results.
2657 root_sets - A root set represents a set of roots (or packages) installed in each A/B testing.
2658 build_requests - A build request represents a single pending build for A/B testing.
2660 * public/api/analysis-tasks.php: Added. Returns the specified analysis task or all analysis tasks in an array.
2664 * public/api/test-groups.php: Added. Returns analysis task groups for the specified analysis task or returns
2665 the specified analysis task group as well as build requests associated with them.
2667 (fetch_test_groups_for_task):
2668 (fetch_build_requests_for_task):
2669 (fetch_build_requests_for_group):
2670 (format_test_group):
2671 (format_build_request):
2673 * public/include/json-header.php:
2674 (remote_user_name): Extracted from compute_token so that we can use it in create-analysis-task.php.
2677 * public/privileged-api/associate-bug.php:
2678 (main): Fixed a typo.
2680 * public/privileged-api/create-analysis-task.php: Added. Creates a new analysis task for a given test run range.
2683 (ensure_config_from_runs):
2685 * public/privileged-api/generate-csrf-token.php: Use remote_user_name.
2687 * public/v2/analysis.js: Added. Various Ember data store models to represent analysis tasks and related objects.
2689 (App.AnalysisTask.create):
2691 (App.TestGroupAdapter):
2692 (App.AnalysisTaskSerializer):
2693 (App.TestGroupSerializer):
2696 * public/v2/app.css: Added style rules for the analysis page.
2699 (App.Pane._fetch): Use fetchRunsWithPlatformAndMetric, which has been refactored into App.Manifest.
2701 (App.PaneController.actions.toggleBugsPane): Show bugs pane even when there are no bug trackers or there is not
2702 exactly one selected point as we can still create an analysis task.
2703 (App.PaneController.actions.associateBug): Renamed singlySelectedPoint to selectedSinglePoint to be more
2704 grammatical and also alert'ed the error message when there is one.
2705 (App.PaneController.actions.createAnalysisTask): Added. Creates a new analysis task and opens it in a new tab.
2706 Since window.open only works during the click, we open the new "window" preemptively and navigates or closes it
2707 once XHR request has completed.
2708 (App.PaneController._detailsChanged): Changes due to singlySelectedPoint to selectedSinglePoint rename.
2709 (App.PaneController._updateBugs): Fixed a bug that we were showing bugs in the previous point when a single point
2710 is selected in the details pane.
2712 (App.AnalysisRoute): Added.
2713 (App.AnalysisTaskRoute): Added.
2714 (App.AnalysisTaskViewModel): Added.
2715 (App.AnalysisTaskViewModel._taskUpdated): Fetch runs for the associated platform and metric.
2716 (App.AnalysisTaskViewModel._fetchedRuns): Setup the chart data to show.
2717 (App.AnalysisTaskViewModel.testSets): The computed property used to update roots for all repositories/projects.
2718 (App.AnalysisTaskViewModel._rootChangedForTestSet): Updates root selections for all repositories/projects when
2719 the user selects an option for all roots in A or B configuration.
2720 (App.AnalysisTaskViewModel.roots): The computed property used to show root choices for each repository/project.
2722 * public/v2/chart-pane.css: Added style rules for details view in the analysis task page.
2724 * public/v2/data.js:
2725 (Measurement.prototype._formatRevisionRange): Don't prefix a revision number with "At " when there is no previous
2726 point so that we can use it in App.AnalysisTaskViewModel.roots.
2727 (TimeSeries.prototype.findPointByMeasurementId): Added.
2728 (TimeSeries.prototype.seriesBetweenPoints): Added.
2730 * public/v2/index.html: Use Metric.fullName since the same value is needed in the analysis task page. Also added
2731 a button to create an analysis task, and made bugs pane button always enabled since we can an analysis task even
2732 when multiple points are selected. Finally, added a new template for the analysis task page.
2734 * public/v2/manifest.js:
2735 (App.Metric.fullName): Added to share code between the charts page and the analysis task page.
2736 (App.Manifest.fetchRunsWithPlatformAndMetric): Extracted from App.Pane._fetch to be reused in
2737 App.AnalysisTaskViewModel._taskUpdated.
2739 2014-10-28 Ryosuke Niwa <rniwa@webkit.org>
2741 Remove App.PaneController.bugsChangeCount in the new perf dashboard
2742 https://bugs.webkit.org/show_bug.cgi?id=138111
2744 Reviewed by Darin Adler.
2747 (App.PaneController.bugsChangeCount): Removed.
2748 (App.PaneController.actions.associateBug): Call _updateMarkedPoints instead of incrementing bugsChangeCount.
2749 (App.PaneController._updateMarkedPoints): Extracted from App.InteractiveChartComponent._updateDotsWithBugs.
2750 Finds the list of current run's points that are associated with bugs.
2751 (App.InteractiveChartComponent._updateMarkedDots): Renamed from _updateDotsWithBugs.
2752 * public/v2/chart-pane.css:
2753 (.chart .marked): Renamed from .hasBugs.
2754 * public/v2/index.html: Specify chartPointRadius and markedPoints.
2756 2014-10-27 Ryosuke Niwa <rniwa@webkit.org>
2758 REGRESSION: commit logs are not shown sometimes on the new dashboard UI
2759 https://bugs.webkit.org/show_bug.cgi?id=138099
2761 Reviewed by Benjamin Poulain.
2763 The bug was caused by _currentItemChanged not passing the previous point in the list of points and also
2764 _showDetails inverting the order of the current and old measurements.
2767 (App.PaneController._currentItemChanged): Pass in the previous point to _showDetails when there is one.
2768 (App.PaneController._showDetails): Since points are ordered chronologically, the last point is the
2769 current (latest) measurement and the first point is the oldest measurement.
2770 (App.CommitsViewerComponent.commitsChanged): Don't show a single measurement as a range for clarity.
2772 2014-10-18 Ryosuke Niwa <rniwa@webkit.org>
2774 Perf dashboard should provide a way to associate bugs with a test run
2775 https://bugs.webkit.org/show_bug.cgi?id=137857
2777 Reviewed by Andreas Kling.
2779 Added a "privileged" API, /privileged-api/associate-bug, to associate a bug with a test run.
2780 /privileged-api/ is to be protected by an authentication mechanism such as DigestAuth over https by
2781 the Apache configuration.
2784 The Cross Site Request (CSRF) Forgery prevention for privileged APIs work as follows. When a user is
2785 about to make a privileged API access, the front end code obtains a CSRF token generated by POST'ing
2786 to privileged-api/generate-csrf-token; the page sets a randomly generated salt and an expiration time
2787 via the cookie and returns a token computed from those two values as well as the remote username.
2789 The font end code then POST's the request along with the returned token. The server side code verifies
2790 that the specified token can be generated from the salt and the expiration time set in the cookie, and
2791 the token hasn't expired.
2794 * init-database.sql: Added bug_url to bug_trackers table, and added bugs table. Each bug tracker will
2795 have zero or exactly one bug associated with a test run.
2797 * public/admin/bug-trackers.php: Added the support for editing bug_url.
2798 * public/api/runs.php:
2799 (fetch_runs_for_config): Modified the query to fetch bugs associated with test_runs.
2800 (parse_bugs_array): Added. Parses the aggregated bugs and creates a dictionary that maps a tracker id to
2801 an associated bug if there is one.
2802 (format_run): Calls parse_bugs_array.
2804 * public/include/json-header.php: Added helper functions to deal for CSRF prevention.
2805 (ensure_privileged_api_data): Added. Dies immediately if the request's method is not POST or doesn't
2806 have a valid JSON payload.
2807 (ensure_privileged_api_data_and_token): Ditto. Also checks that the CSRF prevention token is valid.
2808 (compute_token): Computes a CSRF token using the REMOTE_USER (e.g. set via BasicAuth), the salt, and
2809 the expiration time stored in the cookie.
2810 (verify_token): Returns true iff the specified token matches what compute_token returns from the cookie.
2812 * public/include/manifest.php:
2813 (ManifestGenerator::bug_trackers): Include bug_url as bugUrl in the manifest. Also use tracker_id instead
2814 of tracker_name as the key in the manifest. This requires changes to both v1 and v2 front end.
2816 * public/index.html:
2817 (Chart..showTooltipWithResults): Updated for the manifest format changed mentioned above.
2819 * public/privileged-api/associate-bug.php: Added.
2820 (main): Added. Associates or dissociates a bug with a test run inside a transaction. It prevent a CSRF
2821 attack via ensure_privileged_api_data_and_token, which calls verify_token.
2823 * public/privileged-api/generate-csrf-token.php: Added. Generates a CSRF token valid for one hour.
2825 * public/v2/app.css:
2826 (.disabled .icon-button:hover g): Used by the "bugs" icon when a range of points or no points are
2827 selected in a chart.
2830 (App.PaneController.actions.toggleBugsPane): Added. Toggles the visibility of the bugs pane when exactly
2831 one point is selected in the chart. Also hides the search pane when making the bugs pane visible since
2832 they would overlap on each other if both of them are shown.
2833 (App.PaneController.actions.associateBug): Makes a privileged API request to associate the specified bug
2834 with the currently selected point (test run). Updates the bug information in "details" and colors of dots
2835 in the charts to reflect new states. Because chart data objects aren't real Ember objects for performance
2836 reasons, we have to use a dirty hack of modifying a dummy counter bugsChangeCount.
2837 (App.PaneController.actions.toggleSearchPane): Renamed from toggleSearch. Also hides the bugs pane when
2838 showing the search pane.
2839 (App.PaneController.actions.rangeChanged): Takes all selected points as the second argument instead of
2840 taking start and end points as the second and the third arguments so that _showDetails can enumerate all
2841 bugs in the selected range.
2843 (App.PaneController._detailsChanged): Added. Hide the bugs pane whenever a new point is selected.
2844 Also update singlySelectedPoint, which is used by toggleBugsPane and associateBug.
2845 (App.PaneController._currentItemChanged): Updated for the _showDetails change.
2846 (App.PaneController._showDetails): Takes an array of selected points in place of old arguments.
2847 Simplified the code to compute the revision information. Calls _updateBugs to format the associated bugs.
2848 (App.PaneController._updateBugs): Sets details.bugTrackers to a dictionary that maps a bug tracker id to
2849 a bug tracker proxy with an array of (bugNumber, bugUrl) pairs and also editedBugNumber, which is used by
2850 the bugs pane to associate or dissociate a bug number, if exactly one point is selected.
2852 (App.InteractiveChartComponent._updateDotsWithBugs): Added. Sets hasBugs class on dots as needed.
2853 (App.InteractiveChartComponent._setCurrentSelection): Finds and passes all points in the selected range
2854 to selectionChanged action instead of just finding the first and the last points.
2856 * public/v2/chart-pane.css: Updated the style.
2858 * public/v2/data.js:
2859 (PrivilegedAPI): Added. A wrapper for privileged APIs' CSRF tokens.
2860 (PrivilegedAPI.sendRequest): Makes a privileged API call. Fetches a new CSRF token if needed.
2861 (PrivilegedAPI._generateTokenInServerIfNeeded): Makes a request to privileged-api/generate-csrf-token if
2862 we haven't already obtained a CSRF token or if the token has already been expired.
2863 (PrivilegedAPI._post): Makes a single POST request to /privileged-api/* with a JSON payload.
2865 (Measurement.prototype.bugs): Added.
2866 (Measurement.prototype.hasBugs): Returns true iff bugs has more than one bug number.
2867 (Measurement.prototype.associateBug): Associates a bug with a test run via privileged-api/associate-bug.
2869 * public/v2/index.html: Added the bugs pane. Also added a list of bugs associated with the current run in
2872 * public/v2/manifest.js:
2873 (App.BugTracker.bugUrl):
2874 (App.BugTracker.newBugUrl): Added.
2875 (App.BugTracker.repositories): Added. This was a missing back reference to repositories.
2876 (App.MetricSerializer.normalizePayload): Now parses/loads the list of bug trackers from the manifest.
2877 (App.Manifest.repositoriesWithReportedCommits): Now initialized to an empty array instead of null.
2878 (App.Manifest.bugTrackers): Added.
2879 (App.Manifest._fetchedManifest): Sets App.Manifest.bugTrackers. Also sorts the list of repositories by
2880 their respective ids to make the ordering stable.
2882 2014-10-14 Ryosuke Niwa <rniwa@webkit.org>
2884 Remove unused jobs table
2885 https://bugs.webkit.org/show_bug.cgi?id=137724
2887 Reviewed by Daniel Bates.
2889 Removed jobs table in the database as well as related code.
2891 * init-database.sql:
2892 * public/admin/jobs.php: Removed.
2893 * public/admin/tests.php:
2894 * public/include/admin-header.php:
2896 2014-10-13 Ryosuke Niwa <rniwa@webkit.org>
2898 New perf dashboard should have an ability to search commits by a keyword
2899 https://bugs.webkit.org/show_bug.cgi?id=137675
2901 Reviewed by Geoffrey Garen.
2903 /api/commits/ now accepts query parameters to search a commit by a keyword. Its output format changed to
2904 include "authorEmail" and "authorName" directly as columns instead of including an "author" object.
2905 This API change allows fetch_commits_between to generate results without processing Postgres query results.
2907 In the front end side, we've added a search pane in pane controller, and the interactive chart component
2908 now has a concept of highlighted items which is used to indicate commits found by the search pane.
2910 * public/api/commits.php:
2911 (main): Extract query parameters: keyword, from, and to and use that to fetch appropriate commits.
2912 (fetch_commits_between): Moved some code from main. Now takes a search term as the third argument.
2913 We look for a commit if its author name or email contains the keyword or if its revision matches the keyword.
2914 (format_commit): Renamed from format_commits. Now only formats one commit.
2916 * public/include/db.php:
2917 (Database::query_and_fetch_all): Now returns array() when the query results is empty (instead of false).
2919 * public/v2/app.css: Renamed .close-button to .icon-button since it's used by a search button as well.
2922 (App.Pane.searchCommit): Added. Finds the commits by a search term and assigns 'highlightedItems',
2923 which is a hash table that contains highlighted items' measurements' ids as keys.
2924 (App.PaneController.actions.toggleSearch): Toggles the visibility of the search pane. Also sets
2925 the default commit repository.
2926 (App.PaneController.actions.searchCommit): Delegates the work to App.Pane.searchCommit.
2927 (App.InteractiveChartComponent._constructGraphIfPossible): Fixed a bug that we weren't removing old this._dots.
2928 Added the code to initialize this._highlights.
2929 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Updates dimensions of highlight lines.
2930 (App.InteractiveChartComponent._updateHighlightPositions): Added. Ditto.
2931 (App.InteractiveChartComponent._highlightedItemsChanged): Adds vertical lines for highlighted items and deletes
2932 the existing lines for the old highlighted items.
2933 (App.CommitsViewerComponent.commitsChanged): Updated the code per JSON API change mentioned above.
2934 Also fixed a bug that the code tries to update the commits viewer even if the viewer had already been destroyed.
2936 * public/v2/chart-pane.css: Added style for the search pane and the search button.
2938 * public/v2/data.js: Turned FetchCommitsForTimeRange into a class: CommitLogs.
2939 (CommitLogs): Added.
2940 (CommitLogs.fetchForTimeRange): Renamed from FetchCommitsForTimeRange. Takes a search term as an argument.
2941 (CommitLogs._cachedCommitsBetween): Extracted from FetchCommitsForTimeRange.
2942 (CommitLogs._cacheConsecutiveCommits): Ditto.
2943 (FetchCommitsForTimeRange._cachedCommitsByRepository): Deleted.
2944 (Measurement.prototype.commitTimeForRepository): Extracted from formattedRevisions.
2945 (Measurement.prototype.formattedRevisions): Uses formattedRevisions. Deleted the unused code for commitTime.
2947 * public/v2/index.html: Added the search pane and the search button. Also removed the unused attribute binding
2948 for showingDetails since this property is no longer used.
2950 * public/v2/manifest.js:
2951 (App.Manifest.repositories): Added.
2952 (App.Manifest.repositoriesWithReportedCommits): Ditto. Used by App.PaneController.actions.toggleSearch to find
2953 the default repository to search.
2954 (App.Manifest._fetchedManifest): Populates repositories and repositoriesWithReportedCommits.
2956 2014-10-13 Ryosuke Niwa <rniwa@webkit.org>
2958 Unreviewed build fix after r174555.
2960 * public/include/manifest.php:
2961 (ManifestGenerator::generate): Assign an empty array to $repositories_with_commit when there are no commits.
2962 * tests/admin-regenerate-manifest.js: Fixed the test case.
2964 2014-10-09 Ryosuke Niwa <rniwa@webkit.org>
2966 New perf dashboard UI tries to fetch commits all the time
2967 https://bugs.webkit.org/show_bug.cgi?id=137592
2969 Reviewed by Andreas Kling.
2971 Added hasReportedCommits boolean to repository meta data in manifest.json, and used that in
2972 the front end to avoid issuing HTTP requests to fetch commit logs for repositories with
2973 no reported commits as they are all going to fail.
2975 Also added an internal cache to FetchCommitsForTimeRange in the front end to avoid fetching
2976 the same commit logs repeatedly. There are two data structures we cache: commitsByRevision
2977 which maps a given commit revision/hash to a commit object; and commitsByTime which is an array
2978 of commits sorted chronologically by time.
2980 * public/include/manifest.php:
2983 (App.CommitsViewerComponent.commitsChanged):
2985 * public/v2/data.js:
2986 (FetchCommitsForTimeRange):
2987 (FetchCommitsForTimeRange._cachedCommitsByRepository):
2989 * public/v2/manifest.js:
2992 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2994 Another unreviewed build fix after r174477.
2996 Don't try to insert a duplicated row into build_commits as it results in a database constraint error.
2998 This has been caught by a test in /api/report. I don't know why I thought all tests were passing.
3000 * public/include/report-processor.php:
3002 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
3004 Unreviewed build fix after r174477.
3006 * init-database.sql: Removed build_commits_index since it's redundant with build_commit's primary key.
3007 Also fixed a syntax error that we were missing "," after line that declared build_commit column.
3009 * public/api/runs.php: Fixed the query so that test_runs without commits data will be retrieved.
3010 This is necessary for baseline and target values manually added via admin pages.
3012 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
3014 Add v2 UI for the perf dashboard
3015 https://bugs.webkit.org/show_bug.cgi?id=137537
3017 Rubber-stamped by Andreas Kling.
3020 * public/v2/app.css: Added.
3021 * public/v2/app.js: Added.
3022 * public/v2/chart-pane.css: Added.
3023 * public/v2/data.js: Added.
3024 * public/v2/index.html: Added.
3025 * public/v2/js: Added.
3026 * public/v2/js/d3: Added.
3027 * public/v2/js/d3/LICENSE: Added.
3028 * public/v2/js/d3/d3.js: Added.
3029 * public/v2/js/d3/d3.min.js: Added.
3030 * public/v2/js/ember-data.js: Added.
3031 * public/v2/js/ember.js: Added.
3032 * public/v2/js/handlebars.js: Added.
3033 * public/v2/js/jquery.min.js: Added.
3034 * public/v2/js/statistics.js: Added.
3035 * public/v2/manifest.js: Added.
3036 * public/v2/popup.js: Added.
3038 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
3040 Remove superfluously duplicated code in public/api/report-commits.php.
3042 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
3044 Perf dashboard should store commit logs
3045 https://bugs.webkit.org/show_bug.cgi?id=137510
3047 Reviewed by Darin Adler.
3049 For the v2 version of the perf dashboard, we would like to be able to see commit logs in the dashboard itself.
3051 This patch replaces "build_revisions" table with "commits" and "build_commits" relations to store commit logs,
3052 and add JSON APIs to report and retrieve them. It also adds a tools/pull-svn.py to pull commit logs from
3053 a subversion directory. The git version of this script will be added in a follow up patch.
3056 In the new database schema, each revision in each repository is represented by exactly one row in "commits"
3057 instead of one row for each build in "build_revisions". "commits" and "builds" now have a proper many-to-many
3058 relationship via "build_commits" relations.
3060 In order to migrate an existing instance of this application, run the following SQL commands:
3064 INSERT INTO commits (commit_repository, commit_revision, commit_time)
3065 (SELECT DISTINCT ON (revision_repository, revision_value)
3066 revision_repository, revision_value, revision_time FROM build_revisions);
3068 INSERT INTO build_commits (commit_build, build_commit) SELECT revision_build, commit_id
3069 FROM commits, build_revisions
3070 WHERE commit_repository = revision_repository AND commit_revision = revision_value;
3072 DROP TABLE build_revisions;
3077 The helper script to submit commit logs can be used as follows:
3079 python ./tools/pull-svn.py "WebKit" https://svn.webkit.org/repository/webkit/ https://perf.webkit.org
3080 feeder-slave feeder-slave-password 60 "webkit-patch find-users"
3082 The above command will pull the subversion server at https://svn.webkit.org/repository/webkit/ every 60 seconds
3083 to retrieve at most 10 commits, and submits the results to https://perf.webkit.org using "feeder-slave" and
3084 "feeder-slave-password" as the builder name and the builder password respectively.
3086 The last, optional, argument is the shell command to convert a subversion account to the corresponding username.
3087 e.g. "webkit-patch find-users rniwa@webkit.org" yields "Ryosuke Niwa" <rniwa@webkit.org> in the stdout.
3090 * init-database.sql: Replaced "build_revisions" relation with "commits" and "build_commits" relations.
3092 * public/api/commits.php: Added. Retrieves a list of commits based on arguments in its path of the form
3093 /api/commits/<repository-name>/<filter>. The behavior of this API depends on <filter> as follows:
3095 - Not specified - It returns every single commit for a given repository.
3096 - Matches "oldest" - It returns the commit with the oldest timestamp.
3097 - Matches "latest" - It returns the commit with the latest timestamp.
3098 - Matches "last-reported" - It returns the commit with the latest timestamp added via report-commits.php.
3099 - Is entirely alphanumeric - It returns the commit whose revision matches the filter.
3100 - Is of the form <alphanumeric>:<alphanumeric> or <alphanumeric>-<alphanumeric> - It retrieves the list
3101 of commits added via report-commits.php between two timestamps retrieved from commits whose revisions
3102 match the two alphanumeric values specified. Because it retrieves commits based on their timestamps,
3103 the list may contain commits that do not appear as neither hash's ancestor in git/mercurial.
3105 (commit_from_revision):
3106 (fetch_commits_between):
3109 * public/api/report-commits.php: Added. A JSON API to report new subversion, git, or mercurial commits.
3110 See tests/api-report-commits.js for examples on how to use this API.
3112 * public/api/runs.php: Updated the query to use "commit_builds" and "commits" relations instead of
3113 "build_revisions". Regrettably, the new query is 20% slower but I'm going to wait until the new UI is ready
3114 to optimize this and other JSON APIs.
3116 * public/include/db.php:
3117 (Database::select_or_insert_row):
3118 (Database::update_or_insert_row): Added.
3119 (Database::_select_update_or_insert_row): Extracted from select_or_insert_row. Try to update first and then
3120 insert if the update fails for update_or_insert_row. Preserves the old behavior when $should_update is false.
3122 (Database::select_first_row):
3123 (Database::select_last_row): Added.
3124 (Database::select_first_or_last_row): Extracted from select_first_row. Fixed a bug that we were asserting
3125 $order_by to be not alphanumeric/underscore. Retrieve the last row instead of the first if $descending_order.
3127 * public/include/report-processor.php:
3128 (ReportProcessor::resolve_build_id): Store commits instead of build_revisions. We don't worry about the race
3129 condition for adding "build_commits" rows since we shouldn't have a single tester submitting the same result
3130 concurrently. Even if it happened, it will only result in a PHP error and the database will stay consistent.
3133 (pathToTests): Don't call path.resolve with "undefined" testName; It throws an exception in the latest node.js.
3135 * tests/api-report-commits.js: Added.
3136 * tests/api-report.js: Fixed a test per build_revisions to build_commits/commits replacement.
3139 * tools/pull-svn.py: Added. See above for how to use this script.
3141 (determine_first_revision_to_fetch):
3142 (fetch_revision_from_dasbhoard):
3143 (fetch_commit_and_resolve_author):
3146 (resolve_author_name_from_email):
3149 2014-09-30 Ryosuke Niwa <rniwa@webkit.org>
3151 Update Install.md for Mavericks and fix typos
3152 https://bugs.webkit.org/show_bug.cgi?id=137276
3154 Reviewed by Benjamin Poulain.
3156 Add the instruction to copy php.ini to enable the Postgres extension in PHP.
3158 Also use perf.webkit.org as the directory name instead of WebKitPerfMonitor.
3160 Finally, init-database.sql is no longer located inside database directory.
3164 2014-08-11 Ryosuke Niwa <rniwa@webkit.org>
3166 Report run id's in api/runs.php for the new dashboard UI
3167 https://bugs.webkit.org/show_bug.cgi?id=135813
3169 Reviewed by Andreas Kling.
3171 Include run_id in the generated JSON.
3173 * public/api/runs.php:
3174 (fetch_runs_for_config): Don't sort results by time since that has been done in the front end for ages now.
3177 2014-08-11 Ryosuke Niwa <rniwa@webkit.org>
3179 Merging platforms mixes baselines and targets into reported data
3180 https://bugs.webkit.org/show_bug.cgi?id=135260
3182 Reviewed by Andreas Kling.
3184 When merging two platforms, move test configurations of a different type (baseline, target)
3185 as well as of different metric (Time, Runs).
3187 Also avoid fetching the entire table of runs just to see if there are no remaining runs.
3188 It's sufficient to detect one such test_runs object.
3190 * public/admin/platforms.php:
3193 2014-07-30 Ryosuke Niwa <rniwa@webkit.org>
3195 Merging platforms mixes baselines and targets into reported data
3196 https://bugs.webkit.org/show_bug.cgi?id=135260
3198 Reviewed by Geoffrey Garen.
3200 Make sure two test configurations we're merging are of the same type (e.g. baseline, target, current).
3201 Otherwise, we'll erroneously mix up runs for baseline, target, and current (reported values).
3203 * public/admin/platforms.php:
3205 2014-07-23 Ryosuke Niwa <rniwa@webkit.org>
3207 Build fix after r171361.
3209 * public/js/helper-classes.js:
3210 (.this.formattedBuildTime):
3212 2014-07-22 Ryosuke Niwa <rniwa@webkit.org>
3214 Perf dashboard spends 2s processing JSON data during the page loads
3215 https://bugs.webkit.org/show_bug.cgi?id=135152
3217 Reviewed by Andreas Kling.
3219 In the Apple internal dashboard, we were spending as much as 2 seconds
3220 converting raw JSON data into proper JS objects while loading the dashboard.
3222 This caused the apparent unresponsiveness of the dashboard despite of the fact
3223 charts themselves updated almost instantaneously.
3225 * public/index.html:
3226 * public/js/helper-classes.js:
3227 (TestBuild): Compute the return values of formattedTime and formattedBuildTime
3228 lazily as creating new Date objects and running string replace is expensive.
3229 (TestBuild.formattedTime):
3230 (TestBuild.formattedBuildTime):
3231 (PerfTestRuns.setResults): Added. Pushing each result was the biggest bottle neck.
3232 (PerfTestRuns.addResult): Deleted.
3234 2014-07-18 Ryosuke Niwa <rniwa@webkit.org>
3236 Perf dashboard shouldn't show the full git hash
3237 https://bugs.webkit.org/show_bug.cgi?id=135083
3239 Reviewed by Benjamin Poulain.
3241 Detect Git/Mercurial hash by checking the length.
3243 If it's a hash, use the first 8 characters in the label
3244 while retaining the full length to be used in hyperlinks.
3246 * public/js/helper-classes.js:
3247 (.this.formattedRevisions):
3250 2014-05-29 Ryosuke Niwa <rniwa@webkit.org>
3252 Add an instruction on how to backup the database.
3253 https://bugs.webkit.org/show_bug.cgi?id=133391
3255 Rubber-stamped by Andreas Kling.
3259 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
3261 Build fix after r166479. 'bytes' is now abbreviated as 'B'.
3263 * public/js/helper-classes.js:
3264 (PerfTestRuns.smallerIsBetter):
3266 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
3270 * public/common.css:
3272 * public/index.html:
3276 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
3278 WebKitPerfMonitor: There should be a way to add all metrics of a suite without also adding subtests
3279 https://bugs.webkit.org/show_bug.cgi?id=131157
3281 Reviewed by Andreas Kling.
3283 Split "all metrics" into all metrics of a test suite and all subtests of the suite.
3284 This allows, for example, adding all metrics such as Arithmetic and Geometric for
3285 a given test suite without also adding its subtests.
3287 * public/index.html:
3291 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
3293 WebKitPerfMonitor: Tooltips cannot be pinned after using browser's back button
3294 https://bugs.webkit.org/show_bug.cgi?id=131155
3296 Reviewed by Andreas Kling.
3298 The bug was caused by Chart.attach binding event listeners on plot container on each call.
3299 This resulted in the click event handler toggling the visiblity of the tooltip twice upon
3300 click when attach() has been called even number of times, keeping the tooltip invisible.
3302 Fixed the bug by extracting the code to bind event listeners outside of Chart.attach as
3303 a separate function, bindPlotEventHandlers, and calling it exactly once when Chart.attach
3304 is called for the first time.
3306 * public/index.html:
3308 (Chart..bindPlotEventHandlers):
3310 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
3312 WebKitPerfMonitor: Tooltips can be cut off at the top
3313 https://bugs.webkit.org/show_bug.cgi?id=130960
3315 Reviewed by Andreas Kling.
3317 * public/common.css:
3318 (#title): Removed the gradients, box shadows, and border from the header.
3319 (#title h1): Reduce the font size.
3320 (#title ul): Use line-height to vertically align the navigation bar instead of specifying a padding atop.
3321 * public/index.html:
3322 (.tooltop:before): Added. Identical to .tooltop:after except it's upside down (arrow facing up).
3323 (.tooltip.inverted:before): Show the arrow facing up when .inverted is set.
3324 (.tooltip.inverted:before): Hide the arrow facing down when .inverted is set.
3325 * public/js/helper-classes.js:
3326 (Tooltip.show): Show the tooltip below the point if placing it above the point results in the top of the
3327 tooltip extending above y=0.
3329 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
3331 WebKitPerfMonitor: Y-axis adjustment is too aggressive
3332 https://bugs.webkit.org/show_bug.cgi?id=130937
3334 Reviewed by Andreas Kling.
3336 Previously, adjusted min. and max. were defined as the two standards deviations away from EWMA of measured
3337 results. This had two major problems:
3338 1. Two standard deviations can be too small to show the confidence interval for results.
3339 2. Sometimes baseline and target can be more than two standards deviations away.
3341 Fixed the bug by completely rewriting the algorithm to compute the interval. Instead of blindly using two
3342 standard deviations as margins, we keep adding quarter the standard deviation on each side until more than 90%
3343 of points lie in the interval or we've expanded 4 standard deviations. Once this condition is met, we reduce
3344 the margin on each side separately to reduce the empty space on either side.
3346 A more rigorous approach would involve computing least squared value of results with respect to intervals
3347 but that seems like an overkill for a simple UI problem; it's also computationally expensive.
3349 * public/index.html:
3350 (Chart..adjustedIntervalForRun): Extracted from computeYAxisBoundsToFitLines.
3351 (Chart..computeYAxisBoundsToFitLines): Compute the min. and max. adjusted intervals out of adjusted intervals
3352 for each runs (current, baseline, and target) so that at least one point from each set of results is shown.
3353 We wouldn't see the difference between measured values versus baseline and target values otherwise.
3354 * public/js/helper-classes.js:
3355 (PerfTestResult.unscaledConfidenceIntervalDelta): Returns the default value if the confidence
3356 interval delta cannot be computed.
3357 (PerfTestResult.isInUnscaledInterval): Added. Returns true iff the confidence intervals lies
3358 within the given interval.
3359 (PerfTestRuns..filteredResults): Extracted from unscaledMeansForAllResults now that PerfTestRuns.min and
3360 PerfTestRuns.max need to use both mean and confidence interval delta for each result.
3361 (PerfTestRuns..unscaledMeansForAllResults):
3362 (PerfTestRuns.min): Take the confidence interval delta into account.
3363 (PerfTestRuns.max): Ditto.
3364 (PerfTestRuns.countResults): Returns the number of results in the given time frame (> minTime).
3365 (PerfTestRuns.countResultsInInterval): Returns the number of results whose confidence interval lie within the
3367 (PerfTestRuns.exponentialMovingArithmeticMean): Fixed the typo so that it actually computes the EWMA.
3369 2014-03-31 Ryosuke Niwa <rniwa@webkit.org>
3371 Some CSS tweaks after r166477 and r166479,
3373 * public/index.html:
3375 2014-03-30 Ryosuke Niwa <rniwa@webkit.org>
3377 WebKitPerfMonitor: Sometimes text inside panes overlap
3378 https://bugs.webkit.org/show_bug.cgi?id=130956
3380 Reviewed by Gyuyoung Kim.
3382 Revamped the pane UI. Now build info uses table element instead of plane text with BRs. The computed status of
3383 the latest result against baseline/target such as "3% until target" is now shown above the current value. This
3384 reduces the total height of the pane and fits more information per screen capita on the dashboard.
3386 * public/index.html: Updated and added a bunch of CSS rules for the new look.
3387 (.computeStatus): Don't append the build info here. The build info is constructed as a separate table now.
3388 (.createSummaryRowMarkup): Use th instead of td for "Current", "Baseline", and "Target" in the summary table.
3389 (.buildLabelWithLinks): Construct table rows instead of br separated lines of text. This streamlines the look
3390 of the build info shown in a chart pane and a tooltip.
3391 (Chart): Made .status a table.
3392 (Chart.populate): Prepend status.text, which contains text such as "3% until target", into the summary rows
3393 right above "Current" value, and populate .status with buildLabelWithLinks manually instead of status.text
3394 now that status.text no longer contains it.
3395 (Chart..showTooltipWithResults): Wrap buildLabelWithLinks with a table element.
3397 * public/js/helper-classes.js:
3398 (TestBuild.formattedRevisions): Don't include repository names in labels since repository names are now added
3399 by buildLabelWithLinks inside th elements. Also place spaces around '-' between two different OS X versions.
3400 e.g. "OS X 10.8 - OS X 10.9" instead of "OS X 10.8-OS X 10.9".
3401 (PerfTestRuns): Use "/s" for "runs/s" and "B" for "bytes" to make text shorter in .status and .summaryTable.
3402 (PerfTestRuns..computeScalingFactorIfNeeded): Avoid placing a space between 'M' and a unit starting with a
3403 capital letter; e.g. "MB" instead of "M B".
3405 2014-03-30 Ryosuke Niwa <rniwa@webkit.org>
3407 WebKitPerfMonitor: Header and number-of-days slider takes up too much space
3408 https://bugs.webkit.org/show_bug.cgi?id=130957
3410 Reviewed by Gyuyoung Kim.
3412 Moved the slider into the header. Also reduced the spacing between the header and platform names.
3413 This reclaims 50px × width of the screen real estate.
3415 * public/common.css:
3416 (#title): Reduced the space below the header from 20px to 10px.
3417 * public/index.html:
3418 (#numberOfDaysPicker): Removed the rounded border around the number-of-days slider.
3419 (#dashboard > tbody > tr > td): Added a 1.5em padding at the bottom.
3420 (#dashboard > thead th): That allows us to remove the padding at the top here. This reduces the wasted screen
3421 real estate between the header and the platform names.
3423 2014-03-10 Zoltan Horvath <zoltan@webkit.org>
3425 Update the install guidelines for perf.webkit.org
3426 https://bugs.webkit.org/show_bug.cgi?id=129895
3428 Reviewed by Ryosuke Niwa.
3430 The current install guideline for perf.webkit.org discourages the use of the installed
3431 Server application. I've actualized the documentation for Mavericks, and modified the
3432 guideline to include the instructions for Server.app also.
3436 2014-03-08 Zoltan Horvath <zoltan@webkit.org>
3438 Update perf.webkit.org json example
3439 https://bugs.webkit.org/show_bug.cgi?id=129907
3441 Reviewed by Andreas Kling.
3443 The current example is not valid json syntax. I fixed the syntax errors and indented the code properly.
3447 2014-01-31 Ryosuke Niwa <rniwa@webkit.org>
3449 Merge database-common.js and utility.js into run-tests.js.
3451 Reviewed by Matthew Hanson.
3453 Now that run-tests is the only node.js script, merged database-common.js and utility.js into it.
3454 Also moved init-database.sql out of the database directory and removed the directory entirely.
3456 * database: Removed.
3457 * database/database-common.js: Removed.
3458 * database/utility.js: Removed.
3459 * init-database.sql: Moved from database/init-database.sql.
3461 (connect): Moved from database-common.js.
3462 (pathToDatabseSQL): Extracted from pathToLocalScript.
3463 (pathToTests): Moved from database-common.js.
3466 (SerializedTaskQueue): Ditto.
3468 (initializeDatabase):
3469 (TestEnvironment.it):
3470 (TestEnvironment.queryAndFetchAll):
3473 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3475 Remove the dependency on node.js from the production code.
3477 Reviewed by Ricky Mondello.
3479 Work towards <rdar://problem/15955053> Upstream SafariPerfMonitor.
3481 Removed node.js dependency from TestRunsGenerator. It was really a design mistake to invoke node.js from php.
3482 It added so much complexity with only theoretical extensibility of adding aggregators. It turns out that
3483 many aggregators we'd like to add are a lot more complicated than ones that could be written under the current
3484 infrastructure, and we need to make the other aspects (e.g. the level of aggregations) a lot more extensible.
3485 Removing and simplifying TestRunsGenerator allows us to implement such extensions in the future.
3487 Also removed the js files that are no longer used.
3489 * config.json: Moved from database/config.json.
3490 * database/aggregate.js: Removed. No longer used.
3491 * database/database-common.js: Removed unused functions, and updated the path to config.json.
3492 * database/process-jobs.js: Removed. No longer used.
3493 * database/sample-data.sql: Removed. We have a much better corpus of data now.
3494 * database/schema.graffle: Removed. It's completely obsolete.
3495 * public/include/db.php: Updated the path to config.json.
3496 * public/include/evaluator.js: Removed.
3498 * public/include/report-processor.php:
3499 (TestRunsGenerator::aggregate): Directly aggregate values via newly added aggregate_values method instead of
3500 storing values into $expressions and calling evaluate_expressions_by_node.
3501 (TestRunsGenerator::aggregate_values): Added.
3502 (TestRunsGenerator::compute_caches): Directly compute the caches.
3504 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3506 Build fix. Don't fail the platform merges even if there are no test configurations to be moved to the new platform.
3508 * public/admin/platforms.php:
3509 * public/include/db.php:
3511 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3513 Zoomed y-axis view is ununsable when the last result is an outlier.
3515 Reviewed by Stephanie Lewis.
3517 Show two standard deviations from the exponential moving average with alpha = 0.3 instead of the mean of
3518 the last result so that the graph looks sane if the last result was an outlier. However, always show
3519 the last result's mean even if it was an outlier.
3521 * public/index.html:
3522 * public/js/helper-classes.js:
3523 (unscaledMeansForAllResults): Extracted from min/max/sampleStandardDeviation.
3524 Also added the ability to cache the unscaled means to avoid recomputation.
3525 (PerfTestRuns.min): Refactored to use unscaledMeansForAllResults.
3526 (PerfTestRuns.max): Ditto.
3527 (PerfTestRuns.sampleStandardDeviation): Ditto.
3528 (PerfTestRuns.exponentialMovingArithmeticMean): Added.
3530 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3534 * public/admin/tests.php:
3535 * public/js/helper-classes.js:
3537 2014-01-29 Ryosuke Niwa <rniwa@webkit.org>
3539 Use two standard deviations instead as I mentioned in the mailing list.
3541 * public/index.html:
3543 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
3545 The performance dashboard erroneously shows upward arrow for combined metrics.
3547 A single outlier can ruin the zoomed y-axis view.
3549 Rubber-stamped by Antti Koivisto.
3551 * public/index.html:
3552 (computeYAxisBoundsToFitLines): Added adjustedMax and adjustedMin, which are pegged at 4 standard deviations
3553 from the latest results' mean.
3554 (Chart): Renamed shouldStartYAxisAtZero to shouldShowEntireYAxis.
3555 (Chart.attachMainPlot): Use the adjusted max and min when we're not showing the entire y-axis.
3556 (Chart.toggleYAxis):
3557 * public/js/helper-classes.js:
3558 (PerfTestRuns.sampleStandardDeviation): Added.
3559 (PerfTestRuns.smallerIsBetter): 'Combined' is a smaller is better metric.
3561 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
3563 Don't include the confidence interval when computing the y-axis.
3565 Rubber-stamped by Simon Fraser.
3567 * public/js/helper-classes.js:
3571 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
3573 Tiny CSS tweak for tooltips.
3575 * public/index.html:
3577 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
3579 Remove the erroneously repeated code.
3581 * public/admin/test-configurations.php:
3583 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
3585 <rdar://problem/15704893> perf dashboard should show baseline numbers
3587 Reviewed by Stephanie Lewis.
3589 * public/admin/bug-trackers.php:
3590 (associated_repositories): Return an array of HTMLs instead of echo'ing as expected by AdministrativePage.
3593 * public/admin/platforms.php:
3594 (merge_list): Ditto.
3596 * public/admin/test-configurations.php: Added.
3597 (add_run): Adds a "synthetic" test run and a corresponding build. It doesn't create run_iterations and
3598 build_revisions as they're not meaningful for baseline / target numbers.
3599 (delete_run): Deletes a synthetic test run and its build. It verifies that the specified build has exactly
3600 one test run so that we don't accidentally delete a reported test run.
3601 (generate_rows_for_configurations): Generates rows of configuration IDs and types.
3602 (generate_rows_for_test_runs): Ditto for test runs. It also emits the form to add new "synthetic" test runs
3603 and delete existing ones.
3605 * public/admin/tests.php: We wrongfully assumed there is exactly one test configuration for each metric
3606 on each platform; there could be configurations of distinct types such as "current" and "baseline".
3607 Thus, update all test configurations for a given metric when updating config_is_in_dashboard.
3609 * public/api/runs.php: Remove the NotImplemented when we have multiple test configurations.
3610 (fetch_runs_for_config): "Synthetic" test runs created on test-configurations page are missing revision
3611 data so we need to left-outer-join (instead of inner-join) build_revisions. To avoid making the query
3612 unreadable, don't join revision_repository here. Instead, fetch the list of repositories upfront and
3613 resolve names in parse_revisions_array. This actually reduces the query time by ~10%.
3615 (parse_revisions_array): Skip an empty array created for "synthetic" test runs.
3617 * public/include/admin-header.php:
3618 (AdministrativePage::render_table): Now custom columns support sub columns. e.g. a configuration column may
3619 have id and type sub columns, and each custom column could generate multiple rows.
3621 Any table with sub columns now generates two rows for thead. We generate td's in in the first row without
3622 sub columns with rowspan of 2, and generate ones with sub columns with colspan set to the sub column count.
3623 We then proceed to generate the second header row with sub column names.
3625 When generating the actual content, we first generate all custom columns as they may have multiple rows in
3626 which case regular columns need rowspan set to the maximum number of rows.
3628 Once we've generated the first row, we proceed to generate subsequent rows for those custom columns that
3631 (AdministrativePage::render_custom_cells): Added. This function is responsible for generating table cells
3632 for a given row in a given custom column. It generates an empty td when the custom column doesn't have
3633 enough rows. It also generates empty an td when it doesn't have enough columns in some rows except when
3634 the entire row consists of exactly one cell for a custom column with sub columns, in which case the cell is
3635 expanded to occupy all sub columns.
3637 * public/include/manifest.php:
3638 (ManifestGenerator::platforms): Don't add the metric more than once.
3640 * public/include/test-name-resolver.php:
3641 (TestNameResolver::__construct): We had wrongfully assumed that we have exactly one test configuration on
3642 each platform for each metric like tests.php. Fixed that. Also fetch the list of aggregators to compute the
3643 full metric name later.
3644 (TestNameResolver::map_metrics_to_tests): Populate $this->id_to_metric.
3645 (TestNameResolver::test_id_for_full_name): Simplified the code using array_get.
3646 (TestNameResolver::full_name_for_test): Added.
3647 (TestNameResolver::full_name_for_metric): Added.
3648 (TestNameResolver::configurations_for_metric_and_platform): Renamed as it returns multiple configurations.
3650 * public/js/helper-classes.js:
3651 (TestBuild): Use the build time as the maximum time when revision information is missing for "synthetic"
3652 test runs created to set baseline and target points.
3654 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
3656 Build fix after r57928. Removed a superfluous close parenthesis.
3658 * public/api/runs.php:
3660 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
3662 Unreviewed build & typo fixes.
3664 * public/admin/platforms.php:
3665 * tests/admin-platforms.js:
3667 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>