1 2015-06-13 Ryosuke Niwa <rniwa@webkit.org>
3 Perf dashboard's v2 UI shouldn't hide auto-detected outliers
4 https://bugs.webkit.org/show_bug.cgi?id=145940
6 Reviewed by Darin Adler.
8 Don't fallback to the default strategies for moving averages and envelope when one is not specified.
9 Also deleted the code to mark points outside the envelop as outliers.
13 2015-06-12 Ryosuke Niwa <rniwa@webkit.org>
15 Unreviewed build fix for merging platforms.
17 * public/admin/platforms.php:
19 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
21 Unreviewed build fix. Some builder names are really long.
25 2015-05-22 Ryosuke Niwa <rniwa@webkit.org>
27 Show results and status before revisions for A/B testing results
28 https://bugs.webkit.org/show_bug.cgi?id=145327
30 Reviewed by Chris Dumez.
32 Place the results and the status columns before the columns for revisions.
33 Also show the absolute difference as well as the relative difference between the averages of A and B.
36 (App.TestGroupPane._populate):
37 (App.TestGroupPane._computeStatisticalSignificance):
38 * public/v2/index.html:
40 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
42 Build fix after r184591.
44 * public/v2/manifest.js:
46 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
48 Build fix. Use POSIX timestamp instead of human readable string for the commit time.
50 * public/include/build-requests-fetcher.php:
52 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
54 UI to associate bugs with an analysis task is crappy
55 https://bugs.webkit.org/show_bug.cgi?id=145198
57 Reviewed by Andreas Kling.
59 Make the UI less crappy by linkifying bug numbers and adding an explicit button to disassociate
60 a bug and a separate select view with a text field to associate a new bug instead of implicitly
61 updating or deleting the existing record based on what the user had typed.
63 * init-database.sql: Removed the constraint that each bug tracker should appear exactly once for
64 a given analysis task since it's perfectly reasonable for a given task to be associated with
67 * public/privileged-api/associate-bug.php:
68 (main): Only remove the bug specified by newly added bugToDelete instead of implicitly deleting
69 one that matches the analysis task and the bug tracker when the bug number is falsey.
71 * public/v2/analysis.js:
73 (App.BugAdapter.deleteRecord): Added. Uses the privileged API to delete the record.
78 (App.AnalysisTaskController.actions.addBug): Added.
79 (App.AnalysisTaskController.actions.deleteBug): Added.
80 (App.AnalysisTaskController.associateBug): Deleted.
82 * public/v2/index.html: Updated the templates.
84 * public/v2/manifest.js:
85 (App.BugTracker.urlFromBugNumber): Added.
87 2015-05-20 Ryosuke Niwa <rniwa@webkit.org>
89 A/B testing rootSets should provide commit times as well as revisions
90 https://bugs.webkit.org/show_bug.cgi?id=145207
92 Reviewed by Andreas Kling.
94 Some continuous build systems need the commit time as well as the revision number / hash so provide one
95 in the root sets but maintain the backwards compatibility with buildbots that use revision number directly.
97 * public/include/build-requests-fetcher.php:
98 (BuildRequestsFetcher::fetch_roots_for_set): Made the revision info an associative array that contains
99 the revision number as well as the commit time.
100 * tools/sync-with-buildbot.py:
101 (schedule_request): Removed "replacement" which was a superfluous copy of "roots". Use "revision" values
102 when the JSON configuration refers to "root". This is necessary in buildbot instances that require WebKit
103 revision to be specified on its own field instead of it being a JSON that contains "revision" and "time".
105 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
107 Build fix. Don't fall into an infinite loop when value (renamed from bytes) is zero.
109 * public/v2/manifest.js:
110 (App.Manifest.Ember.Controller.extend.):
111 (App.Manifest.Ember.Controller.extend):
113 2015-05-19 Ryosuke Niwa <rniwa@webkit.org>
115 Don't show unit (bytes) separaetly from SI suffixes (K, M, etc...)
116 https://bugs.webkit.org/show_bug.cgi?id=145181
118 Rubber-stamped by Chris Dumez.
120 Show 'MB' in each y-axis label instead of showing 'bytes' separately and suffixing each label with just 'M'
121 for clarity. This change also reduces the code complexity.
125 (App.AnalysisTaskController._chartDataChanged):
126 (App.TestGroupPane._createConfigurationSummary):
128 (RunsData.unitFromMetricName): Use 'B' instead of 'bytes' as the unit.
130 * public/v2/interactive-chart.js: Removed the support for showing units separately.
131 (App.InteractiveChartComponent._constructGraphIfPossible):
132 (App.InteractiveChartComponent._relayoutDataAndAxes)
134 * public/v2/manifest.js:
135 (App.Manifest._makeFormatter): Renamed from _formatBytes. Support more SI suffixes such as micro and mili.
136 Now takes the unit as the first argument. Adjust the base unit if it's 'ms'.
137 (App.Manifest._formatFetchedData): Removed unit and formatWithUnit now that all all formatters would
138 automatically include unit.
140 2015-05-18 Ryosuke Niwa <rniwa@webkit.org>
142 REGRESSION: v2 UI reports a higher memory usage
143 https://bugs.webkit.org/show_bug.cgi?id=145151
145 Reviewed by Chris Dumez.
147 The bug was caused by v2 UI using 1000 to divide the number of bytes instead of by 1024 as done in v1.
148 Fixed the bug by manually implementing the formatter as done in v1.
150 * public/v2/manifest.js:
151 (App.Manfiest._formatBytes): Added.
152 (App.Manifest._formatFetchedData): Use _formatByte instead of format('s').
154 2015-05-11 Ryosuke Niwa <rniwa@webkit.org>
156 Unreviewed build fix. Add "Duration" as a time metric.
158 * public/js/helper-classes.js:
160 (RunsData.unitFromMetricName):
162 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
164 Perf dashboard treats Speedometer and JetStream as smaller is better
165 https://bugs.webkit.org/show_bug.cgi?id=144711
167 Reviewed by Chris Dumez.
169 Added the support for "Score" metric.
171 * public/js/helper-classes.js:
174 (RunsData.unitFromMetricName):
175 (RunsData.isSmallerBetter):
177 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
179 Build fix after r183232.
181 * public/include/json-header.php:
183 2015-04-23 Ryosuke Niwa <rniwa@webkit.org>
185 Perf dashboard should automatically detect regressions
186 https://bugs.webkit.org/show_bug.cgi?id=141443
188 Reviewed by Anders Carlsson.
190 Added a node.js script detect-changes.js to detect potential regressions and progressions
191 on the graphs tracked on v2 dashboards.
193 * init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
194 columns to analysis_tasks to keep the segmentation and test range selection strategies used
195 to create an analysis task.
197 * public/api/analysis-tasks.php:
198 (format_task): Include task_segmentation and analysis_tasks in the results.
200 * public/include/json-header.php:
201 (remote_user_name): Returns null when the privileged API is authenticated as a slave instead
202 of a CSRF prevention token.
203 (should_authenticate_as_slave): Added.
204 (ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
205 and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
206 to a CSRF attack, we don't need to check a CSRF token.
208 * public/privileged-api/create-analysis-task.php:
209 (main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
210 analysis task. Also add or find segmentation and test range selection strategies if specified.
212 * public/privileged-api/create-test-group.php:
213 (main): Use ensure_privileged_api_data_and_token_or_slave.
215 * public/privileged-api/generate-csrf-token.php:
218 (App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.
220 * public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
221 (Array.prototype.find): Added a polyfill to be used in node.js.
222 (RunsData.fetchRuns):
223 (RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
224 (RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
225 in detect-changes.js.
226 (RunsData.unitFromMetricName): Ditto.
227 (RunsData.isSmallerBetter): Ditto.
228 (RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
230 (TimeSeries): When commit times are identical, order points based on build time. This is needed
231 for when we trigger two builds at two different OS versions with the same WebKit revision since
232 OS versions don't change the commit times.
233 (TimeSeries.prototype.findPointByIndex): Added.
234 (TimeSeries.prototype.rawValues): Added.
236 * public/v2/js/statistics.js:
237 (Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
238 description of this strategy instead of the default probability. Also fixed a bug that debugging
239 code was referring to non-existent variables.
240 (Statistics.executeStrategy): Moved from App.Pane (app.js).
242 * public/v2/manifest.js:
243 (App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
244 used in detect-changes.js.
246 * tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
247 the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
248 It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
249 (main): Loads the settings JSON specified in the argument.
250 (fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
251 (mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
252 (configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
253 and computes various values for when statistically significant changes are detected later.
254 (analyzeConfiguration): Finds potential regressions and progression in the last X days where X
255 is the specified maximum number of days using the specified strategies. Sort the resultant ranges
256 in chronological order and create a new analysis task for the very last change we detected. We'll
257 eventually create an analysis task for all detected changes since we're repeating the analysis in
258 fetchManifestAndAnalyzeData after some time.
259 (computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
260 segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
261 tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
262 tasks for the same range (e.g. humans may create one before the script gets to do it).
263 (createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
264 testing if available, and notify another server with a HTML message as specified.
265 (findStrategyByLabel):
266 (changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
267 test or values are getting smaller in a larger-is-better test and vice versa.
268 (summarizeRange): Create a human readable string that summarizes the change detected. e.g.
269 "Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
273 (postNotification): Recursively replaces $title and $massage in the specified JSON template.
274 (instantiateNotificationTemplate):
277 2015-04-20 Ryosuke Niwa <rniwa@webkit.org>
279 Perf dashboard should have UI to set status on analysis tasks
280 https://bugs.webkit.org/show_bug.cgi?id=143977
282 Reviewed by Chris Dumez.
284 Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
285 as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
286 The latter will be a useful metric once we start automatically creating analysis tasks.
288 * init-database.sql: Added two columns to analysis_tasks table.
289 * public/api/analysis-tasks.php: Include the added columns in the JSON.
290 * public/include/db.php:
291 (Database::to_database_boolean): Added.
292 * public/include/json-header.php:
293 (require_match_one_of_values): Added.
294 * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
296 * public/v2/analysis.js:
297 (App.AnalysisTask.result): Added.
298 (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
299 and we want to differentiate null from false in order to differentiate the null-ness of the value.
300 (App.AnalysisTask.saveStatus): Added.
301 (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
304 (App.AnalysisTaskController.analysisResultOptions): Added.
305 (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
306 (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
307 been created if 'no change' is selected.
308 (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
309 (App.AnalysisTaskController.actions.saveStatus): Added.
310 * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
311 'result' and 'needed' values of the analysis task.
313 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
315 Unreviewed build fix. Updated config.json after recent changes.
319 2015-04-10 Ryosuke Niwa <rniwa@webkit.org>
321 Make the analysis page more useful
322 https://bugs.webkit.org/show_bug.cgi?id=143617
324 Reviewed by Chris Dumez.
326 * public/api/analysis-tasks.php:
327 (fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
328 with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
329 * public/v2/analysis.js:
330 (App.AnalysisTask.formattedCreatedAt): Added.
331 (App.AnalysisTask._addLeadingZero): Added.
332 (App.AnalysisTask.buildRequestCount): Added.
333 (App.AnalysisTask.finishedBuildRequestCount): Added.
334 (App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
335 (App.AnalysisTask.testGroups):
336 (App.AnalysisTask.triggerable):
337 (App.AnalysisTask.label):
339 * public/v2/app.css: Tweaked style rules for the analysis page.
342 (App.buildPopup): Sort the list of platforms by name.
343 (App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
344 (App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
345 such as "Bugzilla" with the corresponding text field.
347 * public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
348 showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
349 for the accompanying graph.
351 2015-04-09 Ryosuke Niwa <rniwa@webkit.org>
353 Perf dashboard should automatically select ranges for A/B testing
354 https://bugs.webkit.org/show_bug.cgi?id=143580
356 Reviewed by Chris Dumez.
358 Added a new statistics option for picking a A/B test range selection strategy.
359 The selected ranges are shown in the graph using the same UI to show analysis tasks.
362 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
363 charts page used by the dashboard since we've added a new parameter at the end.
364 (App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
365 (App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
366 (App.Pane._cloneStrategy): Copy isSegmentation.
367 (App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
368 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
369 selection strategy is picked by the user.
370 (App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
371 Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
372 the return value from the moving average time series to a dictionary that contains the moving
373 average time series, a dictionary of anomalies, and an array of test ranges.
374 (App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
375 (App.ChartsController._serializePaneList): Ditto for serialization.
376 (App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
377 test range selection strategy.
379 * public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.
381 * public/v2/index.html: Added UI for selecting a test range selection strategy.
383 * public/v2/interactive-chart.js:
384 (App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.
386 * public/v2/js/statistics.js:
387 (Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
388 (Statistics.TestRangeSelectionStrategies): Added.
390 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
392 The results of A/B testing should state statistical significance
393 https://bugs.webkit.org/show_bug.cgi?id=143552
395 Reviewed by Chris Dumez.
397 Added statistical comparisons between results for each configuration on analysis task page using
398 Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.
401 (App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
402 root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
404 (App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
405 Welch's t-test. Report the probability by which two samples do not come from the same distribution.
406 (App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
407 Also renamed "items" to "requests" for clarity.
409 * public/v2/index.html: Added the template for showing statistical comparisons.
411 * public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
412 for clarity. Also factored out the functions to convert from one-sided probability to two-sided
413 probability and vice versa.
414 (Statistics.supportedConfidenceIntervalProbabilities):
415 (Statistics.confidenceIntervalDelta):
416 (Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
417 the probability that two values are sampled from distinct distributions using Welch's t-test.
418 (Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
419 (.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
420 (.oneSidedToTwoSidedProbability): Extracted.
421 (.twoSidedToOneSidedProbability): Extracted.
422 (Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
423 now that computeWelchsT takes two-sided probability.
425 2015-04-08 Ryosuke Niwa <rniwa@webkit.org>
427 Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
431 (App.Pane.refetchRuns):
433 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
435 Perf dashboard should have a way of marking outliers
436 https://bugs.webkit.org/show_bug.cgi?id=143466
438 Reviewed by Chris Dumez.
440 Address kling's in-person comment to notify users when the new run status is saved in the database.
443 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
444 * public/v2/chart-pane.css: Fixed a typo.
446 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
448 Perf dashboard should have a way of marking outliers
449 https://bugs.webkit.org/show_bug.cgi?id=143466
451 Reviewed by Chris Dumez.
453 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
454 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
456 * init-database.sql: Added run_marked_outlier column to test_runs table.
458 * public/admin/tests.php:
460 * public/api/runs.php:
461 (main): Only emit Cache-Control and Expires headers in v1 UI.
462 (RunsGenerator::format_run): Emit markedOutlier.
464 * public/include/admin-header.php:
466 * public/include/db.php:
467 (Database::is_true): Made it static.
469 * public/include/manifest.php:
470 (Manifest::platforms):
472 * public/index.html: Call into /api/runs/ with ?cache=true.
474 * public/privileged-api/update-run-status.php: Added.
475 (main): Updates the newly added column in test_runs table.
479 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
480 (App.Pane._didFetchRuns): Renamed from _updateChartData.
481 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
482 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
483 the interactive chart component only observes changes to chartData and not individual properties of it.
484 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
485 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
486 clone chartData here.
488 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
489 invoking App.Pane._setNewChartData.
490 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
491 opening the pane for marking points as outliers would be annoying.
492 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
493 (App.PaneController.selectedMeasurement): Added.
494 (App.PaneController.showOutlierTitle): Added.
495 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
496 mark the selected point as an outlier via the newly added privileged API.
498 * public/v2/chart-pane.css: Updated styles.
501 (PrivilegedAPI._post): Report the semantic errors.
502 (Measurement.prototype.markedOutlier): Added.
503 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
504 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
505 whether the time series should include measurements marked as outliers or not.
506 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
507 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
508 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
510 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
511 mark individual points as outliers.
513 * public/v2/interactive-chart.js:
514 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
515 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
516 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
517 with the arrow key navigation support, this is no longer an issue.
519 * public/v2/manifest.js:
520 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
521 updates the time series in this chart data in order to include or exclude outliers.
523 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
525 Perf dashboard should be able to trigger A/B testing jobs for iOS
526 https://bugs.webkit.org/show_bug.cgi?id=143398
528 Reviewed by Chris Dumez.
530 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
532 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
534 * public/api/triggerables.php:
535 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
536 * public/v2/analysis.js:
537 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
539 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
540 some of the data points. This will happen when we modify the list of projects we build for iOS.
541 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
542 attempts to create an invalid test group; when there is already another test group of the same or when
543 only either configuration specifies the revision for some repository.
544 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
545 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
546 * tools/sync-with-buildbot.py:
547 (find_request_updates):
548 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
549 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
550 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
551 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
553 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
555 Add time series segmentation algorithms as moving averages
556 https://bugs.webkit.org/show_bug.cgi?id=143362
558 Reviewed by Chris Dumez.
560 This patch implements two preliminary time series segmentation algorithms as moving averages.
562 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
563 If Welch's t-test implicates a statistically significance difference, then split the segment into two
564 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
565 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
566 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
568 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
569 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
570 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
571 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
572 through i = n. However, we also don't want to split every data point into a separate segment so we need
573 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
574 models discussed in [2] for simplicity. We will tune this cost function further in the future.
576 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
577 space is exponential with respect to the size of the time series since we could split at each data point.
578 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
579 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
580 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
581 exploring much of the problem space.
583 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
584 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
585 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
586 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
587 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
588 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
589 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
591 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
592 a nonstationary time series", Physical Review E 69, 021108 (2004)
594 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
595 Lithuanian Mathematical Journal, vol 46, 2006
597 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
598 * public/v2/js/statistics.js:
599 (Statistics.testWelchsT):
600 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
601 of each value array between which Welch's t-statistic is computed. This generalization helps the
602 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
603 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
604 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
605 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
606 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
608 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
609 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
611 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
613 REGRESSION: Perf dashboard sometimes fails to update zooming level
614 https://bugs.webkit.org/show_bug.cgi?id=143359
616 Reviewed by Darin Adler.
618 The bug was caused by various bugs that ended up in an exception.
621 (App.Pane._handleFetchErrors): Removed superfluous console.log.
622 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
623 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
624 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
625 to # when Ember.js fails to attach event listeners on time.
626 * public/v2/interactive-chart.js:
627 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
628 the containing element's size is 0.
629 (App.InteractiveChartComponent._updateBrush): Ditto.
631 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
633 Perf dashboard should have UI to test out anomaly detection strategies
634 https://bugs.webkit.org/show_bug.cgi?id=143290
636 Reviewed by Benjamin Poulain.
638 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
640 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
641 as well as Welch's t-test that compares the last five points to the prior twenty points.
643 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
644 performance tests although they compare medians instead of means.
646 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
649 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
650 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
651 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
652 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
653 Only report the first data point when multiple consecutive data points are detected as anomalies.
654 * public/v2/chart-pane.css: Updated styles.
655 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
656 * public/v2/js/statistics.js:
657 (Statistics.testWelchsT): Added. Implements Welch's t-test.
658 (.sampleMeanAndVarianceForValues): Added.
659 (.createWesternElectricRule): Added.
660 (.countValuesOnSameSide): Added.
661 (Statistics.AnomalyDetectionStrategy): Added.
663 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
665 REGRESSION: Searching commits can highlight wrong data points
666 https://bugs.webkit.org/show_bug.cgi?id=143272
668 Reviewed by Antti Koivisto.
670 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
671 return commit times with only second precision. This resulted in the frontend code to match a commit
672 with the data point that included the next commit when the millisecond component of commit's timestamp
673 wasn't identically 0.
675 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
676 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
677 so miliseconds component was only preserved in /api/commits.
679 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
680 it returns time in milisecond precision.
682 * public/api/commits.php:
683 (fetch_commits_between): Use Database::to_js_time for format commit times.
684 (format_commit): Ditto.
685 * public/include/db.php:
686 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
688 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
690 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
692 Perf dashboard should show relative change in values
693 https://bugs.webkit.org/show_bug.cgi?id=143252
695 Reviewed by Antti Koivisto.
697 When a range of values are selected, show the percentage difference between the start and the end
698 in addition to the absolute value difference. When a single point is selected, show the relative
699 difference with respect to the previous point. Use two significant figures and always show plus sign
700 when the difference is positive.
702 * public/v2/app.js: Compute and format the relative difference.
703 * public/v2/chart-pane.css: Don't let commits view shrink itself when they're all collapsed.
704 * public/v2/index.html: Show the relative difference.
706 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
708 REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
709 https://bugs.webkit.org/show_bug.cgi?id=143254
711 Reviewed by Antti Koivisto.
713 The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
714 or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
715 so that the interactive chart component will observe a change to 'chartData'.
718 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.
720 2015-03-19 Ryosuke Niwa <rniwa@webkit.org>
722 Unreviewed build fixes.
724 * public/include/manifest.php:
725 (Manifest::generate): These should be {} instead of [] when they're empty.
727 (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
728 * public/v2/manifest.js:
729 (App.Metric.fullName): Fixed the typo.
730 * tests/admin-regenerate-manifest.js: Fixed the test.
732 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
734 Commit the erroneously reverted change.
736 * public/api/runs.php:
737 (RunsGenerator::results):
739 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
741 Loading the perf dashboard takes multiple seconds
742 https://bugs.webkit.org/show_bug.cgi?id=141860
744 Reviewed by Andreas Kling.
746 This patch introduces the caches of JSON files returned by /api/ in /data/ directory. It also records
747 the last time test_runs rows associated with the requested platforms and metrics are inserted, updated,
748 or removed in the caches as well as the manifest JSON files ("last modified time"). Because the manifest
749 is regenerated each time a new test result is reported, the front end can compare last modified time in
750 the manifest file with that in a /api/runs JSON cache to detect the stale-ness.
752 More concretely, the front end first optimistically fetches the JSON in /data/. If the cache doesn't exit
753 or the last modified time in the cache doesn't match with that in the manifest file, it would fetch it
754 again via /api/runs. In the case the cache did exist, we render the charts based on the cache meanwhile.
755 This dramatically reduces the perceived latency for the page load since charts are drawn immediately using
756 the cache and we would only re-render the charts as new up-to-date JSON comes in.
758 This patch also changes the format of runs JSONs by pushing the exiting properties into 'configurations'
759 and adding 'lastModified' and 'elapsedTime' at the top level.
761 * init-database.sql: Added config_runs_last_modified to test_configurations table as well as a trigger to
762 auto-update this column upon changes to test_runs table.
764 * public/admin/test-configurations.php:
765 (add_run): Regenerate the manifest file to invalidate the /api/runs JSON cache.
768 * public/api/runs.php:
769 (main): Fetch all columns of test_configurations table including config_runs_last_modified. Also generate
770 the cache in /data/ directory.
771 (RunsGenerator::__construct): Compute the last modified time for this (platform, metric) pair.
772 (RunsGenerator::results): Put the old content in 'configurations' property and include 'lastModified' and
773 'elapsedTime' properties. 'elapsedTime' is added for debugging purposes.
774 (RunsGenerator::add_runs):
775 (RunsGenerator::parse_revisions_array):
777 * public/include/db.php:
779 (generate_data_file): Added based on ManifestGenerator::store.
780 (Database::to_js_time): Extracted from RunsGenerator::add_runs to share code.
782 * public/include/json-header.php:
783 (echo_success): Renamed from success_json. Return the serialized JSON instead of echo'ing it so that we can
784 generate caches in /api/runs/.
787 * public/include/manifest.php:
788 (ManifestGenerator::generate): Added 'elapsedTime' property for the time taken to generate the manifest.
789 It seems like we're generating it in 200-300ms for now so that's good.
790 (ManifestGenerator::store): Uses generate_data_file.
791 (ManifestGenerator::platforms): Added 'lastModified' array to each platform entry. This array contains the
792 last modified time for each (platform, metric) pair.
795 (fetchTest): Updated per the format change in runs JSON.
798 (App.Pane._fetch): Fetch the cached JSON first. Refetch the uncached version if instructed as such.
799 (App.Pane._updateChartData): Extracted from App.Pane._fetch.
800 (App.Pane._handleFetchErrors): Ditto.
803 (RunsData.fetchRuns): Takes the fourth argument indicating whether we should fetch the cached version or not.
804 The cached JSON is located in /data/ with the same filename. When fetching a cached JSON results in 404,
805 fulfill the promise with null as the result instead of rejecting it. The only client of this function which
806 sets useCache to true is App.Manifest.fetchRunsWithPlatformAndMetric, and it handles this special case.
808 * public/v2/manifest.js:
809 (App.DateArrayTransform): Added. Handles the array of last modified dates in platform objects.
810 (App.Platform.lastModifiedTimeForMetric): Added. Returns the last modified date in the manifest JSON.
811 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes "useCache" like RunsData.fetchRuns. Set shouldRefetch
812 to true if response is null (the cache didn't exit) or the cache is out-of-date.
813 (App.Manifest._formatFetchedData): Extracted from App.Manifest.fetchRunsWithPlatformAndMetric.
816 (initializeDatabase): Avoid splitting function definitions in the middle.
818 * tests/api-report.js: Added tests to verify that reporting new test results updates the last modified time
819 in test_configurations.
821 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
823 REGRESSION(r180333): Analysis tasks can't be associated with bugs
824 https://bugs.webkit.org/show_bug.cgi?id=141858
826 Reviewed by Andreas Kling.
828 Added back the erroneously removed table to associate bugs. Also moved "details-table-container" div outside
829 of the chart-details partial template as it needs to wrap associate bugs in analysis task pages.
831 * public/v2/chart-pane.css:
832 * public/v2/index.html:
834 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
836 Selecting revisions for A/B testing is hard
837 https://bugs.webkit.org/show_bug.cgi?id=141824
839 Reviewed by Andreas Kling.
841 Update the revisions used in A/B testing based on the selection in the overview chart. This allows users to
842 intuitively select revisions based on points shown in the chart. Removed the old select elements used to
843 select A/B testing points manually.
845 Also renamed 'testSets' to 'configurations', 'roots' to 'rootConfigurations', and 'revisions' in each root's
846 sets to 'options' for clarity.
848 * public/v2/app.css: Reorganized style rules.
851 (App.AnalysisTaskController):
852 (App.AnalysisTaskController._taskUpdated): Merged updateTestGroupPanes.
853 (App.AnalysisTaskController._chartDataChanged): Renamed from paneDomain. It's now an observer instead of
854 a property, which sets 'overviewDomain' property as well as other properties.
855 (App.AnalysisTaskController.updateRootConfigurations): Renamed from updateRoots.
856 (App.AnalysisTaskController._updateRootsBySelectedPoints): Added. Select roots based on the selected points
857 in the overview chart.
859 * public/v2/chart-pane.css: Added arrows next to the configuration names (e.g. 'A') to indicate whether
860 individual build requests / test results are shown or not.
862 * public/v2/index.html: Removed the select element per configuration column. Also moved the select element
863 for the number of runs as it doesn't belong in the same table as the one that lists repositories and roots.
865 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
867 Unreviewed test fixes after r179037, r179591, and r179763.
869 * tests/admin-regenerate-manifest.js:
870 * tests/admin-reprocess-report.js:
872 2015-02-19 Ryosuke Niwa <rniwa@webkit.org>
874 Relationship between A/B testing results are unclear
875 https://bugs.webkit.org/show_bug.cgi?id=141810
877 Reviewed by Andreas Kling.
879 Show a "reference chart" indicating which two points have been tested in each test group pane.
881 Now the chart shown at the top of an analysis task page is called the "overview pane", and we use the pane
882 and the domain used in this chart to show charts in each test group.
884 Also renamed an array of revisions used in the A/B test results tables from 'revisions' to 'revisionList'.
886 * public/v2/analysis.js:
887 (App.TestGroup._fetchTestResults): Renamed from _fetchChartData. Set 'testResults' instead of 'chartData'
888 since this is the results of A/B testing results, not the data for charts shown next to them.
890 * public/v2/app.css: Added CSS rules for reference charts.
893 (App.AnalysisTaskController.paneDomain): Set 'overviewPane' and 'overviewDomain' on each test group pane.
894 (App.TestGroupPane._populate): Updated per 'chartData' to 'testResults' rename.
895 (App.TestGroupPane._updateReferenceChart): Get the chart data via the overview pane and find points that
896 identically matches root sets. If one of configuration used a set of revisions for which no measurement
897 was made in the original chart, don't show the reference chart as that would be misleading / confusing.
898 (App.TestGroupPane._computeRepositoryList): Updated per 'chartData' to 'testResults' rename.
899 (App.TestGroupPane._createConfigurationSummary): Ditto. Also renamed 'revisions' to 'revisionList'.
900 In addition, renamed 'buildNumber' to 'buildLabel' and prefixed it with "Build ".
903 (Measurement.prototype.revisionForRepository): Added.
904 (Measurement.prototype.commitTimeForRepository): Cleanup.
905 (TimeSeries.prototype.findPointByRevisions): Added. Finds a point based on a set of revisions.
907 * public/v2/index.html: Added the reference chart. Streamlined the status label for each build request
908 by including the build number in the title attribute instead of in the markup.
910 * public/v2/interactive-chart.js:
911 (App.InteractiveChartComponent._updateDomain): Fixed a typo introduced as a consequence of r179913.
912 (App.InteractiveChartComponent._computeYAxisDomain): Expand the y-axis to show the highlighted points.
913 (App.InteractiveChartComponent._highlightedItemsChanged): Adjust the y-axis as needed.
915 2015-02-18 Ryosuke Niwa <rniwa@webkit.org>
917 Analysis task pages are unusable
918 https://bugs.webkit.org/show_bug.cgi?id=141786
920 Reviewed by Andreas Kling.
922 This patch makes following improvements to analysis task pages:
923 1. Making the main chart interactive. This change required the use of App.Pane as well as moving the code to
924 compute the data for the details pane from PaneController.
925 2. Moving the form to add a new test group to the top of test groups instead of the bottom of them.
926 3. Grouping the build requests in each test group by root sets instead of the order by which they were ran.
927 This change required the creation of App.TestGroupPane as well as its methods.
928 4. Show a box plot for each root set configuration as well as each build request. This change required
929 App.BoxPlotComponent.
930 5. Show revisions of each repository (e.g. WebKit) for each root set and build request.
932 * public/api/build-requests.php:
933 (main): Update per the rename of BuildRequestsFetcher::root_sets to BuildRequestsFetcher::root_sets_by_id.
935 * public/api/test-groups.php:
936 (main): Include root sets and roots in the response.
939 * public/include/build-requests-fetcher.php:
940 (BuildRequestsFetcher::root_sets_by_id): Renamed from root_sets.
941 (BuildRequestsFetcher::root_sets): Added.
942 (BuildRequestsFetcher::roots): Added.
943 (BuildRequestsFetcher::fetch_roots_for_set): Takes a boolean argument $resolve_ids. This flag is only set to
944 true in /api/build-requests/ (as done prior to this patch) to use repository names as identifiers since
945 tools/sync-with-buildbot.py can't convert repository names to their ids.
947 * public/v2/analysis.js:
949 (App.RootSet): Added.
950 (App.RootSet.revisionForRepository): Added.
951 (App.TestGroup.rootSets): Deleted the code to compute root set ids from build requests now that the JSON
952 response at /api/test-groups will include them.
953 (App.BuildRequest): Ditto. Also deleted 'configLetter' property, which has been moved to a proxy created by
954 _createConfigurationSummary.
955 (App.BuildRequest.statusLabel): Use 'Completed' as the human readable label for 'completed' status.
956 (App.BuildRequest.aggregateStatuses): Added. Generates a human readable status for a set of build requests.
958 * public/v2/app.css: Updated style rules for analysis task pages.
961 (App.Pane): This class is now used in analysis task pages to make the main chart interactive.
962 (App.Pane._updateDetails): Moved from App.PaneController.
964 (App.PaneController._updateCanAnalyze): Updated the code per the move of selectedPoints.
966 (App.AnalysisTaskController): Added 'details'.
967 (App.AnalysisTaskController._taskUpdated):
968 (App.AnalysisTaskController.paneDomain):Renamed from _fetchedRuns.
969 (App.AnalysisTaskController.updateTestGroupPanes): Added. Creates App.TestGroupPane for each test group.
970 (App.AnalysisTaskController.actions.toggleShowRequestList): Added.
972 (App.TestGroupPane): Added.
973 (App.TestGroupPane._populate): Added. Group build requests by root sets and create a summary for each group.
974 (App.TestGroupPane._computeRepositoryList): Added. Returns a sorted list of repositories which is the union
975 of all repositories appearing in root sets and builds associated with A/B testing results.
976 (App.TestGroupPane._groupRequestsByConfigurations): Added. Groups build requests by root sets.
977 (App.TestGroupPane._createConfigurationSummary): Added. Creates a summary for a group of build requests that
978 use the same root set. We start by wrapping "raw" build requests in a proxy with formatted values,
979 build numbers, etc... obtained from the fetched chart data. The list of revisions shown in the group summary
980 is a union of revisions in the root set and the first build request in the group. We null-out revision info
981 for a build request if it is identical to the one in the summary. The range of values is expanded as needed
982 by the values in the group as well as 95% percentile confidence interval.
984 (App.BoxPlotComponent): Added. Controls a box plot shown for each test group summary and build request.
985 (App.BoxPlotComponent.didInsertElement): Added. Inserts a SVG element as well as two indicator rects to show
986 the mean and the confidence interval.
987 (App.BoxPlotComponent._updateBars): Added. Updates the dimensions of the indicator rects.
988 (App.BoxPlotComponent.valueChanged): Added. Computes the relative dimensions of the indicator rects and
989 calls _updateBars to update the rects.
991 * public/v2/chart-pane.css: Added some style rules to be used in the details pane in analysis task pages.
994 (Measurement.prototype.formattedRevisions):
995 (Measurement.formatRevisionRange): Renamed from Measurement.prototype._formatRevisionRange so that it can be
996 called in _createConfigurationSummary.
998 * public/v2/index.html: Updated the templates for analysis task pages. Moved the form to create a new test
999 group above all test groups, and replaced the list of data points by "details" pane used in the charts page.
1000 Also made the fetching of chartData no longer block showing of test groups.
1002 * public/v2/interactive-chart.js:
1003 (App.InteractiveChartComponent._updateDomain): Added an early exit to fix a newly revealed race condition.
1004 (App.InteractiveChartComponent._domainChanged): Ditto.
1005 (App.InteractiveChartComponent._updateSelectionToolbar): Made it respect 'zoomable' boolean property.
1007 * public/v2/js/statistics.js:
1008 (Statistics.min): Added.
1009 (Statistics.max): Added.
1011 * public/v2/manifest.js:
1012 (App.Manifest.fetchRunsWithPlatformAndMetric): Added formatWithDeltaAndUnit to be used in _createConfigurationSummary.
1014 2015-02-14 Ryosuke Niwa <rniwa@webkit.org>
1016 Build URL on new perf dashboard doesn't resolve $builderName
1017 https://bugs.webkit.org/show_bug.cgi?id=141583
1019 Reviewed by Darin Adler.
1021 Support $builderName in the build URL template.
1023 * public/js/helper-classes.js:
1024 (TestBuild.buildUrl): Replaced $builderName with the builder name.
1026 * public/v2/manifest.js:
1027 (App.Metric.fullName): Fixed the typo. We need &ni, not &in.
1028 (App.BuilderurlFromBuildNumber): Replaced $builderName with the builder name.
1030 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
1032 Unreviewed build fix after r179591.
1034 * public/api/commits.php:
1036 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
1038 The status of a A/B testing request always eventually becomes "Failed"
1039 https://bugs.webkit.org/show_bug.cgi?id=141523
1041 Reviewed by Andreas Kling.
1043 The bug was caused by /api/build-requests always setting the status of a build request to 'failed' when
1044 'failedIfNotCompleted' was sent by the buildbot sync'er.
1046 Fixed the bug by only setting the status to 'failed' if it wasn't set to 'completed'.
1048 * public/api/build-requests.php:
1051 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
1053 Unreviewed, remove empty directories.
1055 * public/data: Removed.
1057 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
1059 Perf dashboard should show the results of A/B testing
1060 https://bugs.webkit.org/show_bug.cgi?id=141500
1062 Reviewed by Chris Dumez.
1064 Added the support for fetching test_runs for a specific test group in /api/runs/, and used it in the
1065 analysis task page to fetch results for each test group.
1067 Merged App.createChartData into App.Manifest.fetchRunsWithPlatformAndMetric so that App.BuildRequest
1068 can use the formatter.
1070 * public/api/runs.php:
1071 (fetch_runs_for_config_and_test_group): Added.
1072 (fetch_runs_for_config): Just return the fetched rows since main will format them with RunsGenerator.
1073 (main): Use fetch_runs_for_config_and_test_group to fetch rows when a test group id is specified. Also
1074 use RunsGenerator to format results.
1075 (RunsGenerator): Added.
1076 (RunsGenerator::__construct): Added.
1077 (RunsGenerator::add_runs): Added.
1078 (RunsGenerator::format_run): Moved.
1079 (RunsGenerator::parse_revisions_array): Moved.
1081 * public/v2/analysis.js:
1082 (App.TestGroup): Fixed a typo. The property on a test group that refers to an analysis task is "task".
1083 (App.TestGroup._fetchChartData): Added. Fetches all A/B testing results for this group.
1084 (App.BuildRequest.configLetter): Renamed from config since this returns a letter that identifies the
1085 configuration associated with this build request such as "A" and "B".
1086 (App.BuildRequest.statusLabel): Added the missing label for failed build requests.
1087 (App.BuildRequest.url): Added. Returns the URL associated with this build request.
1088 (App.BuildRequest._meanFetched): Added. Retrieve the mean and the build number for this request via
1092 (App.Pane._fetch): Set chartData directly here.
1093 (App.Pane._updateMovingAverageAndEnvelope): Renamed from _computeChartData. No longer sets chartData
1094 now that it's done in App.Pane._fetch.
1095 (App.AnalysisTaskController._fetchedRuns): Updated per createChartData merge.
1097 * public/v2/data.js:
1098 (Measurement.prototype.buildId): Added.
1099 (TimeSeries.prototype.findPointByBuild): Added.
1101 * public/v2/index.html: Fixed a bug that build status URL was broken. We can't use link-to helper since
1102 url is not an Ember routed path.
1104 * public/v2/manifest.js:
1105 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes testGroupId as the third argument. Merged
1106 App.createChartData here so that App.BuildRequest can use the formatter
1108 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
1110 v2 UI should adjust the number of ticks on dashboards based on screen size
1111 https://bugs.webkit.org/show_bug.cgi?id=141502
1113 Reviewed by Chris Dumez.
1115 * public/v2/interactive-chart.js:
1116 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Compute the number of ticks based on the
1119 2015-02-11 Ryosuke Niwa <rniwa@webkit.org>
1121 New perf dashboard shows too much space around interesting data points
1122 https://bugs.webkit.org/show_bug.cgi?id=141487
1124 Reviewed by Chris Dumez.
1126 Revise the y-axis range adjustment algorithm in r179913. Instead of showing the entire moving average,
1127 show the current time series excluding points in the series outside the moving average envelope.
1130 (App.Pane._computeChartData): Don't deal with missing moving average or enveloping strategy here.
1131 (App.Pane._computeMovingAverageAndOutliers): Set isOutliner to true on all data points in the current
1132 time series if the point lies outside the moving average envelope. Don't expose the moving average or
1133 the envelope computed for this purpose if they're not set by the user.
1135 * public/v2/data.js:
1136 (TimeSeries.prototype.minMaxForTimeRange): Takes a boolean argument, ignoreOutlier. When the flag is set
1137 to true, min/max computation will ignore any point in the series with non-falsy "isOutliner" property.
1139 * public/v2/interactive-chart.js:
1140 (App.InteractiveChartComponent._constructGraphIfPossible): Unsupport hideMovingAverage and hideEnvelope.
1141 (App.InteractiveChartComponent._computeYAxisDomain): Removed the commented out code. Also moved the code
1142 to deal with showFullYAxis here.
1143 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Rewrote the code. Takes ignoreOutliners as an
1144 argument instead of directly inspecting showFullYAxis.
1146 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
1148 New perf dashboard shouldn't always show outliners
1149 https://bugs.webkit.org/show_bug.cgi?id=141445
1151 Reviewed by Chris Dumez.
1153 Use the simple moving average with an average difference envelope to compute the y-axis range to show
1154 to avoid expanding it spuriously to show one off outlier.
1157 (App.Pane): Don't show the full y-axis range by default.
1158 (App.Pane._computeChartData): Use the first strategies for the moving average and the enveloping if
1159 one is not specified by the user but without showing them in the charts.
1160 (App.Pane._computeMovingAverage): Takes moving average and enveloping strategies as arguments instead
1161 of retrieving via chosenMovingAverageStrategy and chosenEnvelopingStrategy.
1163 (App.ChartsController._parsePaneList): Added showFullYAxis as a query string argument to each pane.
1164 (App.ChartsController._serializePaneList): Ditto.
1166 * public/v2/chart-pane.css: Added a CSS rule for when y-axis is clickable.
1168 * public/v2/index.html: Pass in showFullYAxis as an argument to the main interactive chart.
1170 * public/v2/interactive-chart.js:
1171 (App.InteractiveChartComponent._constructGraphIfPossible): Add an event listener on y-axis labels when
1172 the chart is interactive so that toggle showFullYAxis. Also hide the moving average and/or the envelope
1173 if they are not specified by the user (i.e. only used to adjust y-axis range).
1174 (App.InteractiveChartComponent._updateDomain): Don't exit early if y-axis domains are different even if
1175 x-axis domain remained the same. Without this change, the charts would never redraw.
1176 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Use the moving average instead of the current
1177 time series to compute the y-axis range if showFullYAxis is false. When showFullYAxis is true, expand
1178 y-axis all the way down to 0 or the minimum value in the current time series whichever is smaller.
1180 * public/v2/js/statistics.js:
1181 (Statistics.MovingAverageStrategies): Use a wider window in Simple Moving Average by default.
1183 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
1185 Unreviewed build fix.
1188 (set get App.Pane.Ember.Object.extend):
1190 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
1192 New perf dashboard should have the ability to overlay moving average with an envelope
1193 https://bugs.webkit.org/show_bug.cgi?id=141438
1195 Reviewed by Andreas Kling.
1197 This patch adds three kinds of moving average strategies and two kinds of enveloping strategies:
1199 Simple Moving Average - The moving average x̄_i of x_i is computed as the arithmetic mean of values
1200 from x_(i - n) though x_(i + m) where n is a non-negative integer and m is a positive integer. It takes
1201 n, backward window size, and m, forward window size, as an argument.
1203 Cumulative Moving Average - x̄_i is computed as the arithmetic mean of all values x_0 though x_i.
1204 That is, x̄_1 = x_1 and x̄_i = ((i - 1) * M_(i - 1) + x_i) / i for all i > 1.
1206 Exponential Moving Average - x̄_i is computed as the weighted average of x_i and x̄_(i - 1) with α as
1207 an argument specifying x_i's weight. To be precise, x̄_1 = x_1 and x̄_i = α * x_i + (α - 1) x̄_(i-1).
1210 Average Difference - The enveloping delta d is computed as the arithmetic mean of the difference
1211 between each x_i and x̄_i.
1213 Moving Average Standard Deviation - d is computed like the standard deviation except the deviation
1214 for each term is measured from the moving average instead of the sample arithmetic mean. i.e. it uses
1215 the average of (x_i - x̄_i)^2 as the "sample variance" instead of the conventional (x_i - x̄)^2 where
1216 x̄ is the sample mean of all x_i's. This change was necessary since our time series is non-stationary.
1219 Each strategy is cloned for an App.Pane instance so that its parameterList can be configured per pane.
1220 The configuration of the currently chosen strategies is saved in the query string for convenience.
1222 Also added the "stat pane" to choose a moving average strategy and a enveloping strategy in each pane.
1224 * public/v2/app.css: Specify the fill color for all SVG groups in the pane toolbar icons.
1227 (App.Pane._fetch): Delegate the creation of 'chartData' to _computeChartData.
1228 (App.Pane.updateStatisticsTools): Added. Clones moving average and enveloping strategies for this pane.
1229 (App.Pane._cloneStrategy): Added. Clones a strategy for a new pane.
1230 (App.Pane._configureStrategy): Added. Finds and configures a strategy from the configuration retrieved
1231 from the query string via ChartsController.
1232 (App.Pane._computeChartData): Added. Creates chartData from fetchedData.
1233 (App.Pane._computeMovingAverage): Added. Computes the moving average and the envelope.
1234 (App.Pane._executeStrategy): Added.
1235 (App.Pane._updateStrategyConfigIfNeeded): Pushes the strategy configurations to the query string via
1237 (App.ChartsController._parsePaneList): Merged the query string arguments for the range and point
1238 selections, and added two new arguments for the moving average and the enveloping configurations.
1239 (App.ChartsController._serializePaneList): Ditto.
1240 (App.ChartsController._scheduleQueryStringUpdate): Observes strategy configurations.
1241 (App.PaneController.actions.toggleBugsPane): Hides the stat pane.
1242 (App.PaneController.actions.toggleSearchPane): Hides the stat pane.
1243 (App.PaneController.actions.toggleStatPane): Added.
1245 * public/v2/chart-pane.css: Added CSS rules for the new stat pane. Also added .foreground class for the
1246 current (as opposed to baseline and target) time series for when it's the most foreground graph without
1247 moving average and its envelope overlapping on top of it.
1249 * public/v2/index.html: Added the templates for the stat pane and the corresponding icon (Σ).
1251 * public/v2/interactive-chart.js:
1252 (App.InteractiveChartComponent.chartDataDidChange): Unset _totalWidth and _totalHeight to avoid exiting
1253 early inside _updateDimensionsIfNeeded when chartData changes after the initial layout.
1254 (App.InteractiveChartComponent.didInsertElement): Attach event listeners here instead of inside
1255 _constructGraphIfPossible since that could be called multiple times on the same SVG element.
1256 (App.InteractiveChartComponent._constructGraphIfPossible): Clear down the old SVG element we created
1257 but don't bother removing individual paths and circles. Added the code to show the moving average time
1258 series when there is one. Also add "foreground" class on SVG elements for the current time series when
1259 we're not showing the moving average. chart-pane.css has been updated to "dim down" the current time
1260 series when "foreground" is not set.
1261 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Take the moving average time series into
1262 account when computing the y-axis range.
1263 (App.InteractiveChartComponent._brushChanged): Removed 'selectionIsLocked' argument as it's useless.
1265 * public/v2/js/statistics.js:
1266 (Statistics.MovingAverageStrategies): Added.
1267 (Statistics.EnvelopingStrategies): Added.
1269 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1271 The delta value in the chart pane sometimes doens't show '+' for a positive delta
1272 https://bugs.webkit.org/show_bug.cgi?id=141340
1274 Reviewed by Andreas Kling.
1276 The bug was caused by computeStatus prefixing the value delta with '+' if it's greater than 0 after
1277 it had already been formatted. Fixed the bug by using a formatter that always emits a sign symbol.
1280 (App.Pane.computeStatus):
1281 (App.createChartData):
1283 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1285 Unreviewed build fix. currentPoint wasn't defined when selectedPoints was used to find points.
1288 (App.PaneController._updateDetails):
1290 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1292 Unreviewed. Commit the forgotten change.
1294 * public/include/manifest.php:
1296 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
1298 New perf dashboard should have multiple dashboard pages
1299 https://bugs.webkit.org/show_bug.cgi?id=141339
1301 Reviewed by Chris Dumez.
1303 Added the support for multiple dashboard pages. Also added the status of the latest data point.
1304 e.g. "5% better than target"
1306 * public/v2/app.css: Tweaked the styles to work around the fact Ember.js creates empty script elements.
1307 Also hid the border lines around charts on the dashboard page for a cleaner look.
1310 (App.IndexRoute): Added. Navigate to /dashboard/<defaultDashboardName> once the manifest.json is loaded.
1311 (App.IndexRoute.beforeModel): Added.
1312 (App.DashboardRoute): Added.
1313 (App.DashboardRoute.model): Added. Return the dashboard specified by the name.
1314 (App.CustomDashboardRoute): Added. This route is used for a customized dashboard specified by "grid".
1315 (App.CustomDashboardRoute.model): Create a dashboard model from "grid" query parameter.
1316 (App.CustomDashboardRoute.renderTemplate): Use the dashboard template.
1317 (App.DashboardController): Renamed from App.IndexController.
1318 (App.DashboardController.modelChanged): Renamed from gridChanged. Removed the code to deal with "grid"
1319 and "defaultDashboard" as these are taken care of by newly added routers.
1320 (App.DashboardController.computeGrid): Renamed from updateGrid. No longer updates "grid" since this is
1321 now done in actions.toggleEditMode.
1322 (App.DashboardController.actions.toggleEditMode): Navigate to CustomDashboardRoute when start editing
1323 an existing dashboard.
1325 (App.Pane.computeStatus): Moved from App.PaneController so that to be called in App.Pane.latestStatus.
1326 Also moved the code to compute the delta with respect to the previous data point from _updateDetails.
1327 (App.Pane._relativeDifferentToLaterPointInTimeSeries): Ditto.
1328 (App.Pane.latestStatus): Added. Used by the dashboard template to show the status of the latest result.
1330 (App.createChartData): Added deltaFormatter to show less significant digits for differences.
1332 (App.PaneController._updateDetails): Updated per changes to computeStatus.
1334 * public/v2/chart-pane.css: Added style rules for the status labels on the dashboard.
1336 * public/v2/data.js:
1337 (TimeSeries.prototype.lastPoint): Added.
1339 * public/v2/index.html: Prefetch manifest.json as soon as possible, show the latest data points' status
1340 on the dashboard, and enumerate all predefined dashboards.
1342 * public/v2/interactive-chart.js:
1343 (App.InteractiveChartComponent._relayoutDataAndAxes): Slightly adjust the offset at which we show unit
1344 for the dashboard page.
1346 * public/v2/manifest.js:
1347 (App.Dashboard): Inherit from App.NameLabelModel now that each predefined dashboard has a name.
1348 (App.MetricSerializer.normalizePayload): Parse all predefined dashboards instead of a single dashboard.
1349 IDs are generated for each dashboard for forward compatibility.
1351 (App.Manifest.dashboardByName): Added.
1352 (App.Manifest.defaultDashboardName): Added.
1353 (App.Manifest._fetchedManifest): Create dashboard model objects for all predefined ones.
1355 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1357 Move commits viewer to the end of details view
1358 https://bugs.webkit.org/show_bug.cgi?id=141315
1360 Rubber-stamped by Andreas Kling.
1362 Show the difference instead of the old value per kling's request.
1365 (App.PaneController._updateDetails):
1366 * public/v2/index.html:
1368 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1370 Move commits viewer to the end of details view
1371 https://bugs.webkit.org/show_bug.cgi?id=141315
1373 Reviewed by Andreas Kling.
1375 Improved the way list of commits are shown per kling's request.
1378 (App.PaneController._updateDetails): Always show the old value even when a single point is selected.
1380 * public/v2/chart-pane.css: Updated the style for the commits viewer.
1382 * public/v2/commits-viewer.js:
1383 (App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
1384 (App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.
1386 * public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
1387 moved the commits viewers out of the details tables so that they don't interleave revision data.
1389 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1391 New perf dashboard should compare results to baseline and target
1392 https://bugs.webkit.org/show_bug.cgi?id=141286
1394 Reviewed by Chris Dumez.
1396 Compare the selected value against baseline and target values as done in v1. e.g. "5% below target"
1397 Also use d3.format to format the selected value to show four significant figures.
1400 (App.Pane.searchCommit):
1401 (App.Pane._fetch): Create time series here via createChartData so that _computeStatus can use them
1402 to compute the status text without having to recreate them.
1403 (App.createChartData): Added.
1404 (App.PaneController._updateDetails): Use 3d.format on current and old values.
1405 (App.PaneController._computeStatus): Added. Computes the status text.
1406 (App.PaneController._relativeDifferentToLaterPointInTimeSeries): Added.
1407 (App.AnalysisTaskController._fetchedManifest): Use createChartData as done in App.Pane._fetch. Also
1408 format the values using chartData.formatter.
1410 * public/v2/chart-pane.css: Enlarge the status text. Show the status text in red if it's worse than
1411 the baseline and in blue if it's better than the target.
1413 * public/v2/data.js:
1414 (TimeSeries.prototype.findPointAfterTime): Added.
1416 * public/v2/index.html: Added a new tbody for the status text and the selected value. Also fixed
1417 the bug that we were not showing the old value's unit.
1419 * public/v2/interactive-chart.js:
1420 (App.InteractiveChartComponent._constructGraphIfPossible): Use chartData.formatter. Also cleaned up
1421 the code to show the baseline and the target lines.
1423 * public/v2/manifest.js:
1424 (App.Manifest.fetchRunsWithPlatformAndMetric): Added smallerIsBetter.
1426 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
1428 Unreviewed build fix.
1431 (App.IndexController.gridChanged): Use store.createRecord to create a custom dashboard as required by Ember.js
1433 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1435 New perf dashboard doesn't preserve the number of days when clicking on a dashboard chart
1436 https://bugs.webkit.org/show_bug.cgi?id=141280
1438 Reviewed by Chris Dumez.
1440 Fixed the bug by passing in "since" as a query parameter to the charts page.
1442 Also fixed the styling issue that manifests when a JSON fetching fails on "Dashboard" page.
1444 * public/v2/app.css: Fixed CSS rules for error messages shown in the place of charts.
1446 (App.IndexController): Changed the default number of days from one month to one week.
1447 (App.IndexController._sharedDomainChanged): Set "since" property on the controller.
1448 * public/v2/index.html: Pass in "since" property on the controller as a query parameter.
1450 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1452 New perf dashboard erroneously clears zoom when poping history items
1453 https://bugs.webkit.org/show_bug.cgi?id=141278
1455 Reviewed by Chris Dumez.
1457 The bug was caused by _sharedZoomChanged updating overviewSelection without updating mainPlotDomain.
1459 Updating overviewSelection resulted in _overviewSelectionChanged, which observes changes to overviewSelection,
1460 to schedule a call to propagateZoom, which in turn overrode "sharedZoom" we just parsed from the query string.
1463 (App.PaneController._overviewSelectionChanged): Don't schedule propagateZoom if the selected domain is already
1464 shown in the main plot.
1465 (App.PaneController._sharedZoomChanged): Set both overviewSelection and mainPlotDomain to avoid overriding
1466 "sharedZoom" via propagateZoom inside _overviewSelectionChanged.
1468 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1470 New perf dashboard shows null as the aggregator name if no aggregation is done
1471 https://bugs.webkit.org/show_bug.cgi?id=141256
1473 Reviewed by Chris Dumez.
1475 Don't show the aggregator name if there isn't one.
1477 * public/v2/manifest.js:
1480 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1482 Unreviewed build fix after r179611.
1484 * public/v2/interactive-chart.js:
1486 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1488 Perf dashboard doesn’t show the right unit for Safari UI tests
1489 https://bugs.webkit.org/show_bug.cgi?id=141238
1491 Reviewed by Darin Adler.
1493 Safari UI tests use custom metrics that end with "Time". This patch teaches the perf dashboard how to
1494 get the unit for a given metric based on the suffix of the metric name instead of hard-coding the mapping
1495 between metrics and their units.
1497 * public/js/helper-classes.js:
1498 (PerfTestRuns): Use the suffix of the metric name to compute the unit.
1499 * public/v2/manifest.js:
1500 (App.Manifest.fetchRunsWithPlatformAndMetric): Ditto. Also set "useSI" property iff for "bytes".
1501 * public/v2/interactive-chart.js:
1502 (App.InteractiveChartComponent._constructGraphIfPossible): Respect useSI. Use toPrecision(3) otherwise.
1503 (App.InteractiveChartComponent._relayoutDataAndAxes): Place the unit vertically on the left of ticks.
1505 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1507 Interactive chart component provides two duplicate API for highlighting points
1508 https://bugs.webkit.org/show_bug.cgi?id=141234
1510 Reviewed by Chris Dumez.
1512 Prior to this patch, the interactive chart component supported highlightedItems for finding commits
1513 on the main charts page and markedPoints to show the two end points in the analysis task page.
1515 This patch merges markedPoints into highlightedItems.
1518 (App.AnalysisTaskController._fetchedRuns): Use highlightedItems.
1519 * public/v2/chart-pane.css:
1520 * public/v2/index.html: Ditto.
1521 * public/v2/interactive-chart.js:
1522 (App.InteractiveChartComponent._constructGraphIfPossible): Make this._highlights an array instead of
1523 array of arrays. Also call _highlightedItemsChanged at the end to fix the bug that we never highlight
1524 items if highlightedItems was set before the initial layout.
1525 (App.InteractiveChartComponent._relayoutDataAndAxes):
1526 (App.InteractiveChartComponent._updateHighlightPositions): Now that highlights are circles instead of
1527 vertical lines, just set cx and cy as done for other "dots".
1528 (App.InteractiveChartComponent._highlightedItemsChanged): Exit early only if _clippedContainer wasn't
1529 already set; i.e. _constructGraphIfPossible hasn't been called. Also updated the logic to accommodate
1530 the fact this._highlights is an array of elements instead of an array of arrays of elements. Finally,
1531 set the radius of highlight circles here.
1533 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1535 Don’t use repository names as id’s.
1536 https://bugs.webkit.org/show_bug.cgi?id=141226
1538 Reviewed by Chris Dumez.
1540 Not using repository names as their id's reduces the need to fetch the entire repositories table.
1541 Since names of repositories are available in manifest.json, we can resolve their names in the front end.
1543 * Websites/perf.webkit.org/public/api/runs.php:
1544 (parse_revisions_array): No longer uses $repository_id_to_name.
1545 (main): No longer populates $repository_id_to_name.
1547 * Websites/perf.webkit.org/public/api/triggerables.php:
1548 (main): Don't resolve repository names.
1550 * Websites/perf.webkit.org/public/include/manifest.php:
1551 (ManifestGenerator::repositories): Use repositories ids as keys in the result and include their names.
1552 (ManifestGenerator::bug_trackers): Don't resolve repository names.
1554 * Websites/perf.webkit.org/public/js/helper-classes.js:
1555 (TestBuild): Renamed repositoryName to repositoryId.
1556 (TestBuild.revision): Ditto.
1557 (TestBuild.formattedRevisions): Ditto. Continue to use the repository name in the formatted result
1558 since this is the text shown to human.
1560 * Websites/perf.webkit.org/public/v2/app.js:
1561 (App.pane.searchCommit): Renamed repositoryName to repositoryId.
1562 (App.PaneController._updateDetails): Ditto.
1563 (App.AnalysisTaskController.updateRoots): Ditto.
1565 * Websites/perf.webkit.org/public/v2/data.js:
1566 (Measurement): Ditto.
1567 (Measurement.prototype.commitTimeForRepository): Ditto.
1568 (Measurement.prototype.formattedRevisions): Ditto.
1570 * Websites/perf.webkit.org/public/v2/index.html: Use the repository name and the repository id as
1571 select element's label and value respectively.
1573 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1575 Unreviewed build fix. Declare $repository_id_to_name in the global scope.
1577 * public/api/runs.php:
1579 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1581 /api/runs.php should have main function
1582 https://bugs.webkit.org/show_bug.cgi?id=141220
1584 Reviewed by Benjamin Poulain.
1586 Wrapped the code inside main function for clarity.
1588 * public/api/runs.php:
1590 2015-01-27 Ryosuke Niwa <rniwa@webkit.org>
1592 Unreviewed build fix. "eta" isn't set on a in-progress build on a newly added builder.
1594 * tools/sync-with-buildbot.py:
1595 (find_request_updates):
1597 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
1599 Perf dashboard always assigns the result of A/B testing with build request 1
1600 https://bugs.webkit.org/show_bug.cgi?id=140382
1602 Reviewed by Darin Adler.
1604 The bug was caused by the expression array_get($report, 'jobId') or array_get($report, 'buildRequest')
1605 which always evaluated to 1 when the report contained jobId. Fixed the bug by cascading array_get instead.
1607 Also fixed a typo as well as a bug that reports were never associated with builds.
1609 * public/include/report-processor.php:
1610 (ReportProcessor::process): Don't use "or" to find the non-null value since that always evaluates to 1
1611 instead of the first non-null value.
1612 (ReportProcessor::resolve_build_id): Fixed the typo by adding the missing "$this->".
1613 (ReportProcessor::commit): Associate the report with the corresponding build as intended.
1615 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
1617 Unreviewed typo fix. The prefix in triggerable_configurations is "trigconfig", not "trigrepo".
1619 * public/admin/tests.php:
1621 2015-01-10 Ryosuke Niwa <rniwa@webkit.org>
1623 Unreviewed build fix. Removed the stale code.
1625 * public/admin/triggerables.php:
1627 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
1629 Perf dashboard should have the ability to post A/B testing builds
1630 https://bugs.webkit.org/show_bug.cgi?id=140317
1632 Rubber-stamped by Simon Fraser.
1634 This patch adds the support for triggering A/B testing from the perf dashboard.
1636 We add a few new tables to the database. "build_triggerables", which represents a set of builders
1637 that accept A/B testing. "triggerable_repositories" associates each "triggerable" with a fixed set
1638 of repositories for which an arbitrary revision can be specified for A/B testing.
1639 "triggerable_configurations" specifies a triggerable available on a given test on a given platform.
1640 "roots" table which specifies the revision used in a given root set in each repository.
1642 * init-database.sql: Added "build_triggerables", "triggerable_repositories",
1643 "triggerable_configurations", and "roots" tables. Added references to "build_triggerables",
1644 "platforms", and "tests" tables as well as columns to store status, status url, and creation time
1645 to build_requests table. Also made each test group's name unique in a given analysis task as it
1646 would be confusing to have multiple test groups of the same name.
1648 * public/admin/tests.php: Added the UI and the code to associate a test with a triggerable.
1650 * public/admin/triggerables.php: Added. Manages the list of triggerables as well as repositories
1651 for which a specific revision can be set in an A/B testing on a given triggerable.
1653 * public/api/build-requests.php: Added. Returns the list of open build requests on a specified
1654 triggerable. Also updates the status' and the status urls of specified build requests when
1655 buildRequestUpdates is provided in the raw POST data.
1658 * public/api/runs.php:
1659 (fetch_runs_for_config): Don't include results associated with a build request, meaning they are
1660 results of an A/B testing.
1662 * public/api/test-groups.php:
1663 (main): Use the newly added BuildRequestsFetcher. Also merged fetch_test_groups_for_task back.
1665 * public/api/triggerables.php: Added.
1666 (main): Returns a list of triggerables or a triggerable associated with a given analysis task.
1668 * public/include/admin-header.php:
1670 * public/include/build-requests-fetcher.php: Added. Extracted from public/api/test-groups.php.
1671 (BuildRequestsFetcher): This class abstracts the process of fetching a list of builds requests
1672 and root sets used in those requests.D
1673 (BuildRequestsFetcher::__construct):
1674 (BuildRequestsFetcher::fetch_for_task):
1675 (BuildRequestsFetcher::fetch_for_group):
1676 (BuildRequestsFetcher::fetch_incomplete_requests_for_triggerable):
1677 (BuildRequestsFetcher::has_results):
1678 (BuildRequestsFetcher::results):
1679 (BuildRequestsFetcher::results_with_resolved_ids):
1680 (BuildRequestsFetcher::results_internal):
1681 (BuildRequestsFetcher::root_sets):
1682 (BuildRequestsFetcher::fetch_roots_for_set):
1684 * public/include/db.php:
1685 (Database::prefixed_column_names): Don't return "$prefix_" when there are no columns.
1686 (Database::insert_row): Support taking an empty array for values. This is useful in "root_sets"
1687 table since it only has the primary key, id, column.
1688 (Database::select_or_insert_row):
1689 (Database::update_or_insert_row):
1690 (Database::update_row): Added.
1691 (Database::_select_update_or_insert_row): Takes an extra argument specifying whether a new row
1692 should be inserted when no row matches the specified criteria. This is used while updating
1693 build_requests' status and url in public/api/build-requests.php since we shouldn't be inserting
1694 new build requests in that API.
1695 (Database::select_rows): Also use "1 == 1" in the select query when the query criteria is empty.
1696 This is used in public/api/triggerables.php when no analysis task is specified.
1698 * public/include/json-header.php:
1699 (find_triggerable_for_task): Added. Finds a triggerable available on a given test. We return the
1700 triggerable associated with the closest ancestor of the test. Since issuing a new query for each
1701 ancestor test is expensive, we retrieve triggerable for all ancestor tests at once and manually
1702 find the closest ancestor with a triggerable.
1704 * public/include/report-processor.php:
1705 (ReportProcessor::process):
1706 (ReportProcessor::resolve_build_id): Associate a build request with the newly created build
1707 if jobId or buildRequest is specified.
1709 * public/include/test-name-resolver.php:
1710 (TestNameResolver::map_metrics_to_tests): Store the entire metric row instead of its name so that
1711 test_exists_on_platform can use it. The last diff in public/admin/tests.php adopts this change.
1712 (TestNameResolver::test_exists_on_platform): Added. Returns true iff the test has ever run on
1715 * public/include/test-path-resolver.php: Added.
1716 (TestPathResolver): This class abstracts the ancestor chains of a test. It retrieves the entire
1717 "tests" table to do this since there could be arbitrary number of ancestors for a given test.
1718 This class is a lot more lightweight than TestNameResolver, which retrieves a whole bunch of tables
1719 in order to compute full test metric names.
1720 (TestPathResolver::__construct):
1721 (TestPathResolver::ancestors_for_test): Returns the ordered list of ancestors from the closest to
1722 the highest (a test without a parent).
1723 (TestPathResolver::path_for_test): Returns a test "path", the ordered list of test names from
1724 the highest ancestor to the test itself.
1725 (TestPathResolver::ensure_id_to_test_map): Fetches "tests" table to construct id_to_test_map.
1727 * public/privileged-api/create-test-group.php: Added. An API to create A/B testing groups.
1729 (commit_sets_from_root_sets): Given a dictionary of repository names to a pair of revisions
1730 for sets A and B respectively, returns a pair of arrays, each of which contains the corresponding
1731 set of "commits" for sets A and B respectively. e.g. {"WebKit": [1, 2], "Safari": [3, 4]} will
1732 result in [[WebKit commit at r1, Safari commit at r3], [WebKit commit at r2, Safari commit at r4]].
1734 * public/v2/analysis.js:
1735 (App.AnalysisTask.testGroups): Takes arguments so that set('testGroups') will invalidate the cache.
1736 (App.AnalysisTask.triggerable): Added. Retrieves the triggerable associated with the task lazily.
1737 (App.TestGroup.rootSets): Added. Returns the list of root set ids used in this A/B testing group.
1738 (App.TestGroup.create): Added. Creates a new A/B testing group.
1739 (App.Triggerable): Added.
1740 (App.TriggerableAdapter): Added.
1741 (App.TriggerableAdapter.buildURL): Added.
1742 (App.BuildRequest.testGroup): Renamed from group.
1743 (App.BuildRequest.orderLabel): Added. One-based index to be used in labels.
1744 (App.BuildRequest.config): Added. Returns either 'A' or 'B' depending on the configuration used
1745 in this build request.
1746 (App.BuildRequest.status): Added.
1747 (App.BuildRequest.statusLabel): Added. Returns a human friendly label for the current status.
1748 (App.BuildRequest): Removed buildNumber, buildBuilder, as well as buildTime as they're unused.
1751 (App.AnalysisTaskController.testGroups): Added.
1752 (App.AnalysisTaskController.possibleRepetitionCounts): Added.
1753 (App.AnalysisTaskController.updateRoots): Renamed from roots. This is also no longer a property
1754 but an observer that updates "roots" property. Filter out the repositories that are not accepted
1755 by the associated triggerable as they will be ignored.
1756 (App.AnalysisTaskController.actions.createTestGroup): Added.
1758 * public/v2/index.html: Updated the UI, and added a form element to trigger createTestGroup action.
1760 * tools/sync-with-buildbot.py: Added. This scripts posts new builds on buildbot and reports back
1761 the status of those builds to the perf dashboard. A similar script can be written to support
1762 other continuous builds systems.
1763 (main): Fetches the list of pending builds as well as currently running or completed builds from
1764 a buildbot, and report new statuses of builds requests to the perf dashboard. It will then schedule
1765 a single new build on each builder with no pending builds, and marks the set of open build requests
1766 that have been scheduled to run on the buildbot but not found in the first step as stale.
1767 (load_config): Loads a JSON that contains the configurations for each builder. e.g.
1770 "platform": "mac-mavericks",
1771 "test": ["Parser", "html5-full-render.html"],
1772 "builder": "Trunk Syrah Production Perf AB Tests",
1774 "forcescheduler": "force-mac-mavericks-release-perf",
1775 "webkit_revision": "$WebKit",
1776 "jobid": "$buildRequest"
1781 (find_request_updates): Return a list of build request status updates to make based on the pending
1782 builds as well as in-progress and completed builds on each builder on the buildbot. When a build is
1783 completed, we use the special status "failedIfNotCompleted" which results in "failed" status only
1784 if the build request had not been completed. This is necessary because a failed build will not
1785 report its failed-ness back to the perf dashboard in some cases; e.g. lost slave or svn up failure.
1786 (update_and_fetch_build_requests): Submit the build request status updates and retrieve the list
1787 of open requests the perf dashboard has.
1788 (find_stale_request_updates): Compute the list of build requests that have been scheduled on the
1789 buildbot but not found in find_request_updates. These build requests are lost. e.g. a master reboot
1790 or human canceling a build may trigger such a state.
1791 (schedule_request): Schedules a build with the arguments specified in the configuration JSON after
1792 replacing repository names with their revisions and buildRequest with the build request id.
1793 (config_for_request): Finds a builder for the test and the platform of a build request.
1794 (fetch_json): Fetches a JSON from the specified URL, optionally with BasicAuth.
1795 (property_value_from_build): Returns the value of a specific property in a buildbot build.
1796 (request_id_from_build): Returns the build request id of a given buildbot build if there is one.
1798 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
1800 Cache-control should be set only on api/runs
1801 https://bugs.webkit.org/show_bug.cgi?id=140312
1803 Reviewed by Andreas Kling.
1805 Some JSON APIs such as api/analysis-tasks can't be cached even for a short period of time (e.g. a few minutes)
1806 since they can be modified by the user on demand. Since only api/runs.php takes a long time to generate JSONs,
1807 just set cache-control there instead of json-header.php which is used by other JSON APIs.
1809 Also set date_default_timezone_set in db.php since we never use non-UTC timezone in our scripts.
1811 * public/api/analysis-tasks.php:
1812 * public/api/runs.php: Set the cache control headers.
1813 * public/api/test-groups.php:
1814 * public/include/db.php: Set the default timezone to UTC.
1815 * public/include/json-header.php: Don't set the cache control headers.
1817 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
1819 api/report-commit should authenticate with a slave name and password
1820 https://bugs.webkit.org/show_bug.cgi?id=140308
1822 Reviewed by Benjamin Poulain.
1824 Use a slave name and a password to authenticate new commit reports.
1826 * public/api/report-commits.php:
1828 * public/include/json-header.php:
1829 (verify_slave): Renamed and repurposed from verify_builder in report-commits.php. Now authenticates with
1830 a slave name and a password instead of a builder name and a password.
1831 * tests/api-report-commits.js: Updated tests.
1832 * tools/pull-svn.py:
1833 (main): Renamed variables.
1834 (submit_commits): Submits slaveName and slavePassword instead of builderName and builderPassword.
1836 2014-12-19 Ryosuke Niwa <rniwa@webkit.org>
1838 Perf dashboard should support authentication via a slave password
1839 https://bugs.webkit.org/show_bug.cgi?id=139837
1841 Reviewed by Andreas Kling.
1843 For historical reasons, perf dashboard conflated builders and build slaves. As a result we ended up
1844 having to add multiple builders with the same password when a single build slave is shared among them.
1846 This patch introduces the concept of build_slave into the perf dashboard to end this madness.
1848 * init-database.sql: Added build_slave table as well as references to it in builds and reports.
1850 * public/admin/build-slaves.php: Added.
1852 * public/admin/builders.php: Added the support for updating passwords.
1854 * public/include/admin-header.php:
1855 (update_field): Takes an extra argument when a new value needs to be supplied by the caller instead of
1856 being retrieved from $_POST.
1857 (AdministrativePage::render_table): Use array_get to retrieve a value out of the database row since
1858 the raw may not exist (e.g. new_password).
1859 (AdministrativePage::render_form_to_add): Added the support for post_insertion. Don't render the form
1860 control here when this flag evaluates to TRUE.
1862 * public/include/report-processor.php:
1863 (ReportProcessor::process): Added the logic to authenticate with slaveName and slavePassword if those
1864 values are present in the report. In addition, try authenticating builderName with slavePassword if
1865 builderPassword is not specified. When neither password is specified, exit with BuilderNotFound.
1866 Also insert the slave or the builder whichever is missing after we've successfully authenticated.
1867 (ReportProcessor::construct_build_data): Takes a builder ID and an optional slave ID instead of
1869 (ReportProcessor::store_report): Store the slave ID with the report.
1870 (ReportProcessor::resolve_build_id): Exit with MismatchingBuildSlave when the slave associated with
1871 the matching build is different from what's being reported.
1873 * tests/api-report.js: Added a bunch of tests to test the new features of /api/report.
1876 2014-12-18 Ryosuke Niwa <rniwa@webkit.org>
1878 New perf dashboard should not duplicate author information in each commit
1879 https://bugs.webkit.org/show_bug.cgi?id=139756
1881 Reviewed by Darin Adler.
1883 Instead of each commit having author name and email, make it reference a newly added committers table.
1884 Also replace "email" by "account" since some repositories don't use emails as account names.
1886 This improves the keyword search performance in commits.php since LIKE now runs on committers table,
1887 which only contains as many rows as there are accounts in each repository, instead of commits table
1888 which contains every commit ever happened in each repository.
1890 To migrate an existing database into match the new schema, run:
1894 INSERT INTO committers (committer_repository, committer_name, committer_email)
1895 (SELECT DISTINCT commit_repository, commit_author_name, commit_author_email
1896 FROM commits WHERE commit_author_email IS NOT NULL);
1898 ALTER TABLE commits ADD COLUMN commit_committer integer REFERENCES committers ON DELETE CASCADE;
1900 UPDATE commits SET commit_committer = committer_id FROM committers
1901 WHERE commit_repository = committer_repository AND commit_author_email = committer_email;
1903 ALTER TABLE commits DROP COLUMN commit_author_name CASCADE;
1904 ALTER TABLE commits DROP COLUMN commit_author_email CASCADE;
1908 * init-database.sql: Added committers table, and replaced author columns in commits table by a foreign
1909 reference to committers. Also added the missing drop table statements.
1911 * public/api/commits.php:
1912 (main): Fetch the corresponding committers row for a single commit. Also wrap a single commit by
1913 an array here instead of doing it in format_commit.
1914 (fetch_commits_between): Updated queries to JOIN commits with committers.
1915 (format_commit): Takes both commit and committers rows. Also don't wrap the result in an array as that
1916 is now done in main.
1918 * public/api/report-commits.php:
1919 (main): Store the reported committer information or update the existing entry if there is one.
1921 * tests/admin-regenerate-manifest.js: Fixed tests.
1923 * tests/api-report-commits.js: Ditto. Also added a test for updating an existing committer entry.
1925 * tools/pull-svn.py: Renamed email to account.
1927 (fetch_commit_and_resolve_author):
1929 (resolve_author_name_from_account):
1930 (resolve_author_name_from_email): Deleted.
1932 2014-12-17 Ryosuke Niwa <rniwa@webkit.org>
1934 Unreviewed build fix.
1936 * public/v2/index.html: Include js files we extracted in r177424.
1938 2014-12-16 Ryosuke Niwa <rniwa@webkit.org>
1940 Unreviewed. Adding the forgotten svnprop.
1942 * tools/pull-svn.py: Added property svn:executable.
1944 2014-12-16 Ryosuke Niwa <rniwa@webkit.org>
1946 Split InteractiveChartComponent and CommitsViewerComponent into separate files
1947 https://bugs.webkit.org/show_bug.cgi?id=139716
1949 Rubber-stamped by Benjamin Poulain.
1951 Refactored InteractiveChartComponent and CommitsViewerComponent out of app.js into commits-viewer.js
1952 and interactive-chart.js respectively since app.js has gotten really large.
1955 * public/v2/commits-viewer.js: Added.
1956 * public/v2/interactive-chart.js: Added.
1958 2014-12-02 Ryosuke Niwa <rniwa@webkit.org>
1960 New perf dashboard's chart UI is buggy
1961 https://bugs.webkit.org/show_bug.cgi?id=139214
1963 Reviewed by Chris Dumez.
1965 The bugginess was caused by weird interactions between charts and panes. Rewrote the code to fix it.
1967 Superfluous selectionChanged and domainChanged "event" actions were removed from the interactive chart
1968 component. This is not how Ember.js components should interact to begin with. The component now exposes
1969 selectedPoints and always updates selection instead of sharedSelection.
1972 (App.ChartsController.present): Added. We can't call Date.now() in various points in our code as that
1973 would lead to infinite mutual recursions since X-axis domain values wouldn't match up.
1974 (App.ChartsController.updateSharedDomain): This function was completely useless. The overview's start
1975 and end time should be completely determined by "since" and the present time.
1976 (App.ChartsController._startTimeChanged): Ditto.
1977 (App.ChartsController._scheduleQueryStringUpdate):
1978 (App.ChartsController._updateQueryString): Set "zoom" only if it's different from the shared domain.
1980 (App.domainsAreEqual): Moved from InteractiveChartComponent._xDomainsAreSame.
1982 (App.PaneController.actions.createAnalysisTask): Use selectedPoints property set by the chart.
1983 (App.PaneController.actions.overviewDomainChanged): Removed; only needed to call updateSharedDomain.
1984 (App.PaneController.actions.rangeChanged): Removed. _showDetails (renamed to _updateDetails) directly
1985 observes the changes to selectedPoints property as it gets updated by the main chart.
1986 (App.PaneController._overviewSelectionChanged): This was previously a dead code. Now it's used again
1987 with a bug fix. When the overview selection is cleared, we use the same domain in the main chart and
1989 (App.PaneController._sharedDomainChanged): Fixed a but that it erroneously updates the overview domain
1990 when domain arrays aren't identical. This was causing a subtle race with other logic.
1991 (App.PaneController._sharedZoomChanged): Ditto. Also don't set mainPlotDomain here as any changes to
1992 overviewSelection will automatically propagate to the main plot's domain as they're aliased.
1993 (App.PaneController._currentItemChanged): Merged into _updateDetails (renamed from _showDetails).
1994 (App.PaneController._updateDetails): Previously, this function took points and inspected _hasRange to
1995 see if those two points correspond to a range or a single data point. Rewrote all that logic by
1996 directly observing selectedPoints and currentItem properties instead of taking points and relying on
1997 an instance variable, which was a terrible API.
1998 (App.PaneController._updateCanAnalyze): Use selectedPoints property. Since this property is only set
1999 when the main plot has a selected range, we don't have to check this._hasRange anymore.
2001 (App.InteractiveChartComponent._updateDomain): No longer sends domainChanged "event" action.
2002 (App.InteractiveChartComponent._sharedSelectionChanged): Removed. This is a dead code.
2003 (App.InteractiveChartComponent._updateSelection):
2004 (App.InteractiveChartComponent._xDomainsAreSame): Moved to App.domainsAreEqual.
2005 (App.InteractiveChartComponent._setCurrentSelection): Update the selection only if needed. Also set
2006 selectedPoints property.
2008 (App.AnalysisTaskController._fetchedRuns):
2009 (App.AnalysisTaskController._rootChangedForTestSet):
2011 * public/v2/index.html:
2012 Removed non-functional sharedSelection and superfluous selectionChanged and domainChanged actions.
2014 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
2016 Unreviewed. Fixed syntax errors.
2018 * init-database.sql:
2019 * public/api/commits.php:
2021 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
2023 The dashboard on new perf monitor should be configurable
2024 https://bugs.webkit.org/show_bug.cgi?id=138994
2026 Reviewed by Benjamin Poulain.
2028 For now, make it configurable via config.json. We should eventually make it configurable via
2029 an administrative page but this will do for now.
2031 * config.json: Added the empty dashboard configuration.
2033 * public/include/manifest.php: Include the dashboard configuration in the manifest file.
2036 (App.IndexController): Removed defaultTable since this is now dynamically obtained via App.Manifest.
2037 (App.IndexController.gridChanged): Use App.Dashboard to parse the dashboard configuration.
2038 Also obtain the default configuration from App.Manifest.
2039 (App.IndexController._normalizeTable): Moved to App.Dashboard.
2041 * public/v2/manifest.js:
2042 (App.Repository.urlForRevision): Fixed the position of the open curly bracket.
2043 (App.Repository.urlForRevisionRange): Ditto.
2044 (App.Dashboard): Added.
2045 (App.Dashboard.table): Extracted from App.IndexController.gridChanged.
2046 (App.Dashboard.rows): Ditto.
2047 (App.Dashboard.headerColumns): Ditto.
2048 (App.Dashboard._normalizeTable): Moved from App.IndexController._normalizeTable.
2049 (App.MetricSerializer.normalizePayload): Synthesize a dashboard record from the configuration.
2050 Since there is exactly one dashboard object per app, it's okay to hard code an id here.
2051 (App.Manifest._fetchedManifest): Set defaultDashboard to the one and only one dashboard we have.
2053 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
2055 There should be a way to associate bugs with analysis tasks
2056 https://bugs.webkit.org/show_bug.cgi?id=138977
2058 Reviewed by Benjamin Poulain.
2060 Updated associate-bug.php to match the new database schema.
2062 * public/include/json-header.php:
2063 (require_format): Removed the call to camel_case_words_separated_by_underscore since the name is
2064 already camel-cased in require_existence_of. This makes the function usable elsewhere.
2066 * public/privileged-api/associate-bug.php:
2067 (main): Changed the API to take run, bugTracker, and number to match the new database schema.
2068 Also verify that those values are integers using require_format.
2070 * public/v2/analysis.js:
2071 (App.AnalysisTask.label): Added. Concatenates the task's name with the bug numbers.
2072 (App.Bug.label): Added.
2073 (App.BugAdapter): Added.
2074 (App.BugAdapter.createRecord): Use PrivilegedAPI instead of the builtin ajax call.
2075 (App.BuildRequest): Inherit from newly added App.Model, which is set to DS.Model right now.
2077 * public/v2/app.css: Renamed .test-groups to .analysis-group. Also added new rules for the table
2078 containing the bug information.
2081 (App.InteractiveChartComponent._rangesChanged): Added label to range bar objects.
2082 (App.AnalysisTaskRoute):
2083 (App.AnalysisTaskController): Replaced the functionality of App.AnalysisTaskViewModel.
2084 (App.AnalysisTaskController._fetchedManifest): Added.
2085 (App.AnalysisTaskController.actions.associateBug): Added.
2087 * public/v2/chart-pane.css: Renamed .bugs-pane to .analysis-pane.
2089 * public/v2/data.js:
2090 (Measurement.prototype.associateBug): Deleted.
2092 * public/v2/index.html: Renamed .bugs-pane to .analysis-pane and .test-groups to .analysis-group.
2093 Added a table show the bug information. Also hide the chart until chartData is available.
2095 * public/v2/manifest.js:
2098 2014-11-20 Ryosuke Niwa <rniwa@webkit.org>
2100 Fix misc bugs and typos in app.js
2101 https://bugs.webkit.org/show_bug.cgi?id=138946
2103 Reviewed by Benjamin Poulain.
2106 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged):
2107 (App.ChartsController.init):
2108 (App.buildPopup): Renamed from App.BuildPopup.
2109 (App.InteractiveChartComponent._constructGraphIfPossible): Fixed the bug that we were calling
2110 remove() on the wrong object (an array as opposed to elements in the array).
2111 (App.InteractiveChartComponent._highlightedItemsChanged): Check the length of _highlights as
2112 _highlights is always an array and evalutes to true.
2114 2014-11-20 Ryosuke Niwa <rniwa@webkit.org>
2116 New perf dashboard should provide UI to create a new analysis task
2117 https://bugs.webkit.org/show_bug.cgi?id=138910
2119 Reviewed by Benjamin Poulain.
2121 This patch reverts some parts of r175006 and re-introduces bugs associated with analysis tasks.
2122 I'll add UI to show and edit bug numbers associated with an analysis task in a follow up patch.
2124 With this patch, we can create a new analysis task by selection a range of points and opening
2125 "analysis pane" (renamed from "bugs pane"). Each analysis task created is represented by a yellow bar
2126 in the chart hyperlinked to the analysis task.
2128 * init-database.sql: Redefined the bugs to be associated with an analysis task instead of a test run.
2130 * public/api/analysis-tasks.php: Added the support for querying analysis tasks for a specific metric
2131 on a specific platform. Also retrieve and return all bugs associated with analysis tasks.
2133 (fetch_and_push_bugs_to_tasks): Added. Fetches all bugs associated with an array of analysis tasks
2134 and adds the associated bugs to each task in the array.
2137 * public/api/runs.php: Reverted changes made in r175006.
2138 (fetch_runs_for_config):
2141 * public/api/test-groups.php:
2142 (fetch_test_groups_for_task): Use the newly added Database::select_rows.
2144 * public/include/db.php:
2145 (Database::select_first_or_last_row):
2146 (Database::select_rows): Extracted from select_first_or_last_row.
2148 * public/v2/analysis.js:
2149 (App.AnalysisTask): Added "bugs" property.
2150 (App.Bug): Added now that bugs are regular data store objects.
2153 (App.Pane._fetch): Calls this.fetchAnalyticRanges to fetch analysis tasks as well as test runs.
2154 (App.Pane.fetchAnalyticRanges): Added. Fetches analysis tasks for the current metric on the current
2155 platform that are associated with a specific range of runs.
2156 (App.PaneController.actions.toggleBugsPane): Updated per showingBugsPane to showingAnalysisPane rename.
2157 (App.PaneController.actions.associateBug): Deleted.
2158 (App.PaneController.actions.createAnalysisTask): Replaced the pre-condition checks with assertions as
2159 this action should never be triggered when the pre-condition is not met. Also re-fetch analysis tasks
2160 once we've created one.
2161 (App.PaneController.toggleSearchPane): Updated per showingBugsPane to showingAnalysisPane rename.
2162 (App.PaneController._detailsChanged): Ditto. Removed selectedSinglePoint since it's no longer used.
2163 (App.PaneController._showDetails): Call _updateCanAnalyze to update the status of "Analyze" button.
2164 (App.PaneController._updateBugs): Deleted.
2165 (App.PaneController._updateMarkedPoints): Deleted.
2166 (App.PaneController._updateCanAnalyze): Added. Disables the button to create an analysis task when
2167 the name is missing or when at most one point is selected.
2169 (App.InteractiveChartComponent._constructGraphIfPossible): Update the locations of range rects.
2170 (App.InteractiveChartComponent._relayoutDataAndAxes): Ditto.
2171 (App.InteractiveChartComponent._mousePointInGraph): Don't return a point unless the mouse cursor is
2172 on our svg element to avoid locking the current item when a bar shown for an analysis task is clicked.
2173 (App.InteractiveChartComponent._rangesChanged): Added. Creates an array of objects representing
2174 clickable bars for analysis tasks.
2175 (App.InteractiveChartComponent._updateRangeBarRects): Computes the inline style used by each clickable
2176 bar for analysis tasks to place them at the right location.
2177 (App.InteractiveChartComponent.actions.openRange): Added. Forwards the action to the parent controller.
2179 * public/v2/chart-pane.css:
2180 (.chart .extent): Use the same color as the vertical indicator in the highlight behind the selection.
2181 (.chart .rangeBar): Added.
2183 * public/v2/data.js:
2184 (TimeSeries.prototype.nextPoint): Added. Used by _rangesChanged.
2186 * public/v2/index.html: Renamed "bugs pane" to "analysis pane" and removed the UI to associate bugs.
2187 This ability will be reinstated in a follow up patch. Also added a container div and spans for analysis
2188 task bars in the interactive chart component.
2190 2014-11-19 Ryosuke Niwa <rniwa@webkit.org>
2192 Fix typos in r176203.
2195 (App.ChartsController.actions.addPaneByMetricAndPlatform):
2196 (App.AnalysisTaskRoute):
2198 2014-11-18 Ryosuke Niwa <rniwa@webkit.org>
2200 Unreviewed. Updated the install instruction.
2204 2014-11-17 Ryosuke Niwa <rniwa@webkit.org>
2206 App.Manifest shouldn't use App.__container__.lookup
2207 https://bugs.webkit.org/show_bug.cgi?id=138768
2209 Reviewed by Andreas Kling.
2211 Removed the hack to find the store object via App.__container__.lookup.
2212 Pass around the store object instead.
2215 (App.DashboardRow._createPane): Add "store" property to the pane.
2216 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Ditto.
2217 (App.IndexController.gridChanged): Ditto.
2218 (App.IndexController.actions.addRow): Ditto.
2219 (App.IndexController.init): Ditto.
2220 (App.Pane._fetch): Ditto.
2221 (App.ChartsController._parsePaneList): Ditto.
2222 (App.ChartsController._updateQueryString): Ditto.
2223 (App.ChartsController.actions.addPaneByMetricAndPlatform): Ditto.
2224 (App.BuildPopup): Ditto.
2225 (App.AnalysisTaskRoute.model): Ditto.
2226 (App.AnalysisTaskViewModel._taskUpdated): Ditto.
2228 * public/v2/manifest.js:
2229 (App.Manifest.fetch): Removed the code to find the store object.
2231 2014-11-08 Ryosuke Niwa <rniwa@webkit.org>
2233 Fix Ember.js warnings the new perf dashboard
2234 https://bugs.webkit.org/show_bug.cgi?id=138531
2236 Reviewed by Darin Adler.
2238 Fixed various warnings.
2241 (App.InteractiveChartComponent._relayoutDataAndAxes): We can't use "rem". Use this._rem as done for x.
2242 * public/v2/data.js:
2243 (PrivilegedAPI._post): Removed the superfluous console.log.
2244 (CommitLogs.fetchForTimeRange): Ditto.
2245 * public/v2/index.html: Added tbody as required by the HTML specification.
2247 2014-11-07 Ryosuke Niwa <rniwa@webkit.org>
2249 Fix typos in r175768.
2252 (App.AnalysisTaskViewModel.roots):
2254 2014-11-07 Ryosuke Niwa <rniwa@webkit.org>
2256 Introduce the concept of analysis task to perf dashboard
2257 https://bugs.webkit.org/show_bug.cgi?id=138517
2259 Reviewed by Andreas Kling.
2261 Introduced the concept of an analysis task, which is created for a range of measurements for a given metric on
2262 a single platform and used to bisect regressions in the range.
2264 Added a new page to see the list of active analysis tasks and a page to view the contents of an analysis task.
2266 * init-database.sql: Added a bunch of tables to store information about analysis tasks.
2267 analysis_tasks - Represents each analysis task. Associated with a platform and a metric and possibly with two
2268 test runs. Analysis tasks not associated with test runs are used for try new patches.
2269 analysis_test_groups - A test group in an analysis task represents a bunch of related A/B testing results.
2270 root_sets - A root set represents a set of roots (or packages) installed in each A/B testing.
2271 build_requests - A build request represents a single pending build for A/B testing.
2273 * public/api/analysis-tasks.php: Added. Returns the specified analysis task or all analysis tasks in an array.
2277 * public/api/test-groups.php: Added. Returns analysis task groups for the specified analysis task or returns
2278 the specified analysis task group as well as build requests associated with them.
2280 (fetch_test_groups_for_task):
2281 (fetch_build_requests_for_task):
2282 (fetch_build_requests_for_group):
2283 (format_test_group):
2284 (format_build_request):
2286 * public/include/json-header.php:
2287 (remote_user_name): Extracted from compute_token so that we can use it in create-analysis-task.php.
2290 * public/privileged-api/associate-bug.php:
2291 (main): Fixed a typo.
2293 * public/privileged-api/create-analysis-task.php: Added. Creates a new analysis task for a given test run range.
2296 (ensure_config_from_runs):
2298 * public/privileged-api/generate-csrf-token.php: Use remote_user_name.
2300 * public/v2/analysis.js: Added. Various Ember data store models to represent analysis tasks and related objects.
2302 (App.AnalysisTask.create):
2304 (App.TestGroupAdapter):
2305 (App.AnalysisTaskSerializer):
2306 (App.TestGroupSerializer):
2309 * public/v2/app.css: Added style rules for the analysis page.
2312 (App.Pane._fetch): Use fetchRunsWithPlatformAndMetric, which has been refactored into App.Manifest.
2314 (App.PaneController.actions.toggleBugsPane): Show bugs pane even when there are no bug trackers or there is not
2315 exactly one selected point as we can still create an analysis task.
2316 (App.PaneController.actions.associateBug): Renamed singlySelectedPoint to selectedSinglePoint to be more
2317 grammatical and also alert'ed the error message when there is one.
2318 (App.PaneController.actions.createAnalysisTask): Added. Creates a new analysis task and opens it in a new tab.
2319 Since window.open only works during the click, we open the new "window" preemptively and navigates or closes it
2320 once XHR request has completed.
2321 (App.PaneController._detailsChanged): Changes due to singlySelectedPoint to selectedSinglePoint rename.
2322 (App.PaneController._updateBugs): Fixed a bug that we were showing bugs in the previous point when a single point
2323 is selected in the details pane.
2325 (App.AnalysisRoute): Added.
2326 (App.AnalysisTaskRoute): Added.
2327 (App.AnalysisTaskViewModel): Added.
2328 (App.AnalysisTaskViewModel._taskUpdated): Fetch runs for the associated platform and metric.
2329 (App.AnalysisTaskViewModel._fetchedRuns): Setup the chart data to show.
2330 (App.AnalysisTaskViewModel.testSets): The computed property used to update roots for all repositories/projects.
2331 (App.AnalysisTaskViewModel._rootChangedForTestSet): Updates root selections for all repositories/projects when
2332 the user selects an option for all roots in A or B configuration.
2333 (App.AnalysisTaskViewModel.roots): The computed property used to show root choices for each repository/project.
2335 * public/v2/chart-pane.css: Added style rules for details view in the analysis task page.
2337 * public/v2/data.js:
2338 (Measurement.prototype._formatRevisionRange): Don't prefix a revision number with "At " when there is no previous
2339 point so that we can use it in App.AnalysisTaskViewModel.roots.
2340 (TimeSeries.prototype.findPointByMeasurementId): Added.
2341 (TimeSeries.prototype.seriesBetweenPoints): Added.
2343 * public/v2/index.html: Use Metric.fullName since the same value is needed in the analysis task page. Also added
2344 a button to create an analysis task, and made bugs pane button always enabled since we can an analysis task even
2345 when multiple points are selected. Finally, added a new template for the analysis task page.
2347 * public/v2/manifest.js:
2348 (App.Metric.fullName): Added to share code between the charts page and the analysis task page.
2349 (App.Manifest.fetchRunsWithPlatformAndMetric): Extracted from App.Pane._fetch to be reused in
2350 App.AnalysisTaskViewModel._taskUpdated.
2352 2014-10-28 Ryosuke Niwa <rniwa@webkit.org>
2354 Remove App.PaneController.bugsChangeCount in the new perf dashboard
2355 https://bugs.webkit.org/show_bug.cgi?id=138111
2357 Reviewed by Darin Adler.
2360 (App.PaneController.bugsChangeCount): Removed.
2361 (App.PaneController.actions.associateBug): Call _updateMarkedPoints instead of incrementing bugsChangeCount.
2362 (App.PaneController._updateMarkedPoints): Extracted from App.InteractiveChartComponent._updateDotsWithBugs.
2363 Finds the list of current run's points that are associated with bugs.
2364 (App.InteractiveChartComponent._updateMarkedDots): Renamed from _updateDotsWithBugs.
2365 * public/v2/chart-pane.css:
2366 (.chart .marked): Renamed from .hasBugs.
2367 * public/v2/index.html: Specify chartPointRadius and markedPoints.
2369 2014-10-27 Ryosuke Niwa <rniwa@webkit.org>
2371 REGRESSION: commit logs are not shown sometimes on the new dashboard UI
2372 https://bugs.webkit.org/show_bug.cgi?id=138099
2374 Reviewed by Benjamin Poulain.
2376 The bug was caused by _currentItemChanged not passing the previous point in the list of points and also
2377 _showDetails inverting the order of the current and old measurements.
2380 (App.PaneController._currentItemChanged): Pass in the previous point to _showDetails when there is one.
2381 (App.PaneController._showDetails): Since points are ordered chronologically, the last point is the
2382 current (latest) measurement and the first point is the oldest measurement.
2383 (App.CommitsViewerComponent.commitsChanged): Don't show a single measurement as a range for clarity.
2385 2014-10-18 Ryosuke Niwa <rniwa@webkit.org>
2387 Perf dashboard should provide a way to associate bugs with a test run
2388 https://bugs.webkit.org/show_bug.cgi?id=137857
2390 Reviewed by Andreas Kling.
2392 Added a "privileged" API, /privileged-api/associate-bug, to associate a bug with a test run.
2393 /privileged-api/ is to be protected by an authentication mechanism such as DigestAuth over https by
2394 the Apache configuration.
2397 The Cross Site Request (CSRF) Forgery prevention for privileged APIs work as follows. When a user is
2398 about to make a privileged API access, the front end code obtains a CSRF token generated by POST'ing
2399 to privileged-api/generate-csrf-token; the page sets a randomly generated salt and an expiration time
2400 via the cookie and returns a token computed from those two values as well as the remote username.
2402 The font end code then POST's the request along with the returned token. The server side code verifies
2403 that the specified token can be generated from the salt and the expiration time set in the cookie, and
2404 the token hasn't expired.
2407 * init-database.sql: Added bug_url to bug_trackers table, and added bugs table. Each bug tracker will
2408 have zero or exactly one bug associated with a test run.
2410 * public/admin/bug-trackers.php: Added the support for editing bug_url.
2411 * public/api/runs.php:
2412 (fetch_runs_for_config): Modified the query to fetch bugs associated with test_runs.
2413 (parse_bugs_array): Added. Parses the aggregated bugs and creates a dictionary that maps a tracker id to
2414 an associated bug if there is one.
2415 (format_run): Calls parse_bugs_array.
2417 * public/include/json-header.php: Added helper functions to deal for CSRF prevention.
2418 (ensure_privileged_api_data): Added. Dies immediately if the request's method is not POST or doesn't
2419 have a valid JSON payload.
2420 (ensure_privileged_api_data_and_token): Ditto. Also checks that the CSRF prevention token is valid.
2421 (compute_token): Computes a CSRF token using the REMOTE_USER (e.g. set via BasicAuth), the salt, and
2422 the expiration time stored in the cookie.
2423 (verify_token): Returns true iff the specified token matches what compute_token returns from the cookie.
2425 * public/include/manifest.php:
2426 (ManifestGenerator::bug_trackers): Include bug_url as bugUrl in the manifest. Also use tracker_id instead
2427 of tracker_name as the key in the manifest. This requires changes to both v1 and v2 front end.
2429 * public/index.html:
2430 (Chart..showTooltipWithResults): Updated for the manifest format changed mentioned above.
2432 * public/privileged-api/associate-bug.php: Added.
2433 (main): Added. Associates or dissociates a bug with a test run inside a transaction. It prevent a CSRF
2434 attack via ensure_privileged_api_data_and_token, which calls verify_token.
2436 * public/privileged-api/generate-csrf-token.php: Added. Generates a CSRF token valid for one hour.
2438 * public/v2/app.css:
2439 (.disabled .icon-button:hover g): Used by the "bugs" icon when a range of points or no points are
2440 selected in a chart.
2443 (App.PaneController.actions.toggleBugsPane): Added. Toggles the visibility of the bugs pane when exactly
2444 one point is selected in the chart. Also hides the search pane when making the bugs pane visible since
2445 they would overlap on each other if both of them are shown.
2446 (App.PaneController.actions.associateBug): Makes a privileged API request to associate the specified bug
2447 with the currently selected point (test run). Updates the bug information in "details" and colors of dots
2448 in the charts to reflect new states. Because chart data objects aren't real Ember objects for performance
2449 reasons, we have to use a dirty hack of modifying a dummy counter bugsChangeCount.
2450 (App.PaneController.actions.toggleSearchPane): Renamed from toggleSearch. Also hides the bugs pane when
2451 showing the search pane.
2452 (App.PaneController.actions.rangeChanged): Takes all selected points as the second argument instead of
2453 taking start and end points as the second and the third arguments so that _showDetails can enumerate all
2454 bugs in the selected range.
2456 (App.PaneController._detailsChanged): Added. Hide the bugs pane whenever a new point is selected.
2457 Also update singlySelectedPoint, which is used by toggleBugsPane and associateBug.
2458 (App.PaneController._currentItemChanged): Updated for the _showDetails change.
2459 (App.PaneController._showDetails): Takes an array of selected points in place of old arguments.
2460 Simplified the code to compute the revision information. Calls _updateBugs to format the associated bugs.
2461 (App.PaneController._updateBugs): Sets details.bugTrackers to a dictionary that maps a bug tracker id to
2462 a bug tracker proxy with an array of (bugNumber, bugUrl) pairs and also editedBugNumber, which is used by
2463 the bugs pane to associate or dissociate a bug number, if exactly one point is selected.
2465 (App.InteractiveChartComponent._updateDotsWithBugs): Added. Sets hasBugs class on dots as needed.
2466 (App.InteractiveChartComponent._setCurrentSelection): Finds and passes all points in the selected range
2467 to selectionChanged action instead of just finding the first and the last points.
2469 * public/v2/chart-pane.css: Updated the style.
2471 * public/v2/data.js:
2472 (PrivilegedAPI): Added. A wrapper for privileged APIs' CSRF tokens.
2473 (PrivilegedAPI.sendRequest): Makes a privileged API call. Fetches a new CSRF token if needed.
2474 (PrivilegedAPI._generateTokenInServerIfNeeded): Makes a request to privileged-api/generate-csrf-token if
2475 we haven't already obtained a CSRF token or if the token has already been expired.
2476 (PrivilegedAPI._post): Makes a single POST request to /privileged-api/* with a JSON payload.
2478 (Measurement.prototype.bugs): Added.
2479 (Measurement.prototype.hasBugs): Returns true iff bugs has more than one bug number.
2480 (Measurement.prototype.associateBug): Associates a bug with a test run via privileged-api/associate-bug.
2482 * public/v2/index.html: Added the bugs pane. Also added a list of bugs associated with the current run in
2485 * public/v2/manifest.js:
2486 (App.BugTracker.bugUrl):
2487 (App.BugTracker.newBugUrl): Added.
2488 (App.BugTracker.repositories): Added. This was a missing back reference to repositories.
2489 (App.MetricSerializer.normalizePayload): Now parses/loads the list of bug trackers from the manifest.
2490 (App.Manifest.repositoriesWithReportedCommits): Now initialized to an empty array instead of null.
2491 (App.Manifest.bugTrackers): Added.
2492 (App.Manifest._fetchedManifest): Sets App.Manifest.bugTrackers. Also sorts the list of repositories by
2493 their respective ids to make the ordering stable.
2495 2014-10-14 Ryosuke Niwa <rniwa@webkit.org>
2497 Remove unused jobs table
2498 https://bugs.webkit.org/show_bug.cgi?id=137724
2500 Reviewed by Daniel Bates.
2502 Removed jobs table in the database as well as related code.
2504 * init-database.sql:
2505 * public/admin/jobs.php: Removed.
2506 * public/admin/tests.php:
2507 * public/include/admin-header.php:
2509 2014-10-13 Ryosuke Niwa <rniwa@webkit.org>
2511 New perf dashboard should have an ability to search commits by a keyword
2512 https://bugs.webkit.org/show_bug.cgi?id=137675
2514 Reviewed by Geoffrey Garen.
2516 /api/commits/ now accepts query parameters to search a commit by a keyword. Its output format changed to
2517 include "authorEmail" and "authorName" directly as columns instead of including an "author" object.
2518 This API change allows fetch_commits_between to generate results without processing Postgres query results.
2520 In the front end side, we've added a search pane in pane controller, and the interactive chart component
2521 now has a concept of highlighted items which is used to indicate commits found by the search pane.
2523 * public/api/commits.php:
2524 (main): Extract query parameters: keyword, from, and to and use that to fetch appropriate commits.
2525 (fetch_commits_between): Moved some code from main. Now takes a search term as the third argument.
2526 We look for a commit if its author name or email contains the keyword or if its revision matches the keyword.
2527 (format_commit): Renamed from format_commits. Now only formats one commit.
2529 * public/include/db.php:
2530 (Database::query_and_fetch_all): Now returns array() when the query results is empty (instead of false).
2532 * public/v2/app.css: Renamed .close-button to .icon-button since it's used by a search button as well.
2535 (App.Pane.searchCommit): Added. Finds the commits by a search term and assigns 'highlightedItems',
2536 which is a hash table that contains highlighted items' measurements' ids as keys.
2537 (App.PaneController.actions.toggleSearch): Toggles the visibility of the search pane. Also sets
2538 the default commit repository.
2539 (App.PaneController.actions.searchCommit): Delegates the work to App.Pane.searchCommit.
2540 (App.InteractiveChartComponent._constructGraphIfPossible): Fixed a bug that we weren't removing old this._dots.
2541 Added the code to initialize this._highlights.
2542 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Updates dimensions of highlight lines.
2543 (App.InteractiveChartComponent._updateHighlightPositions): Added. Ditto.
2544 (App.InteractiveChartComponent._highlightedItemsChanged): Adds vertical lines for highlighted items and deletes
2545 the existing lines for the old highlighted items.
2546 (App.CommitsViewerComponent.commitsChanged): Updated the code per JSON API change mentioned above.
2547 Also fixed a bug that the code tries to update the commits viewer even if the viewer had already been destroyed.
2549 * public/v2/chart-pane.css: Added style for the search pane and the search button.
2551 * public/v2/data.js: Turned FetchCommitsForTimeRange into a class: CommitLogs.
2552 (CommitLogs): Added.
2553 (CommitLogs.fetchForTimeRange): Renamed from FetchCommitsForTimeRange. Takes a search term as an argument.
2554 (CommitLogs._cachedCommitsBetween): Extracted from FetchCommitsForTimeRange.
2555 (CommitLogs._cacheConsecutiveCommits): Ditto.
2556 (FetchCommitsForTimeRange._cachedCommitsByRepository): Deleted.
2557 (Measurement.prototype.commitTimeForRepository): Extracted from formattedRevisions.
2558 (Measurement.prototype.formattedRevisions): Uses formattedRevisions. Deleted the unused code for commitTime.
2560 * public/v2/index.html: Added the search pane and the search button. Also removed the unused attribute binding
2561 for showingDetails since this property is no longer used.
2563 * public/v2/manifest.js:
2564 (App.Manifest.repositories): Added.
2565 (App.Manifest.repositoriesWithReportedCommits): Ditto. Used by App.PaneController.actions.toggleSearch to find
2566 the default repository to search.
2567 (App.Manifest._fetchedManifest): Populates repositories and repositoriesWithReportedCommits.
2569 2014-10-13 Ryosuke Niwa <rniwa@webkit.org>
2571 Unreviewed build fix after r174555.
2573 * public/include/manifest.php:
2574 (ManifestGenerator::generate): Assign an empty array to $repositories_with_commit when there are no commits.
2575 * tests/admin-regenerate-manifest.js: Fixed the test case.
2577 2014-10-09 Ryosuke Niwa <rniwa@webkit.org>
2579 New perf dashboard UI tries to fetch commits all the time
2580 https://bugs.webkit.org/show_bug.cgi?id=137592
2582 Reviewed by Andreas Kling.
2584 Added hasReportedCommits boolean to repository meta data in manifest.json, and used that in
2585 the front end to avoid issuing HTTP requests to fetch commit logs for repositories with
2586 no reported commits as they are all going to fail.
2588 Also added an internal cache to FetchCommitsForTimeRange in the front end to avoid fetching
2589 the same commit logs repeatedly. There are two data structures we cache: commitsByRevision
2590 which maps a given commit revision/hash to a commit object; and commitsByTime which is an array
2591 of commits sorted chronologically by time.
2593 * public/include/manifest.php:
2596 (App.CommitsViewerComponent.commitsChanged):
2598 * public/v2/data.js:
2599 (FetchCommitsForTimeRange):
2600 (FetchCommitsForTimeRange._cachedCommitsByRepository):
2602 * public/v2/manifest.js:
2605 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2607 Another unreviewed build fix after r174477.
2609 Don't try to insert a duplicated row into build_commits as it results in a database constraint error.
2611 This has been caught by a test in /api/report. I don't know why I thought all tests were passing.
2613 * public/include/report-processor.php:
2615 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2617 Unreviewed build fix after r174477.
2619 * init-database.sql: Removed build_commits_index since it's redundant with build_commit's primary key.
2620 Also fixed a syntax error that we were missing "," after line that declared build_commit column.
2622 * public/api/runs.php: Fixed the query so that test_runs without commits data will be retrieved.
2623 This is necessary for baseline and target values manually added via admin pages.
2625 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2627 Add v2 UI for the perf dashboard
2628 https://bugs.webkit.org/show_bug.cgi?id=137537
2630 Rubber-stamped by Andreas Kling.
2633 * public/v2/app.css: Added.
2634 * public/v2/app.js: Added.
2635 * public/v2/chart-pane.css: Added.
2636 * public/v2/data.js: Added.
2637 * public/v2/index.html: Added.
2638 * public/v2/js: Added.
2639 * public/v2/js/d3: Added.
2640 * public/v2/js/d3/LICENSE: Added.
2641 * public/v2/js/d3/d3.js: Added.
2642 * public/v2/js/d3/d3.min.js: Added.
2643 * public/v2/js/ember-data.js: Added.
2644 * public/v2/js/ember.js: Added.
2645 * public/v2/js/handlebars.js: Added.
2646 * public/v2/js/jquery.min.js: Added.
2647 * public/v2/js/statistics.js: Added.
2648 * public/v2/manifest.js: Added.
2649 * public/v2/popup.js: Added.
2651 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2653 Remove superfluously duplicated code in public/api/report-commits.php.
2655 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2657 Perf dashboard should store commit logs
2658 https://bugs.webkit.org/show_bug.cgi?id=137510
2660 Reviewed by Darin Adler.
2662 For the v2 version of the perf dashboard, we would like to be able to see commit logs in the dashboard itself.
2664 This patch replaces "build_revisions" table with "commits" and "build_commits" relations to store commit logs,
2665 and add JSON APIs to report and retrieve them. It also adds a tools/pull-svn.py to pull commit logs from
2666 a subversion directory. The git version of this script will be added in a follow up patch.
2669 In the new database schema, each revision in each repository is represented by exactly one row in "commits"
2670 instead of one row for each build in "build_revisions". "commits" and "builds" now have a proper many-to-many
2671 relationship via "build_commits" relations.
2673 In order to migrate an existing instance of this application, run the following SQL commands:
2677 INSERT INTO commits (commit_repository, commit_revision, commit_time)
2678 (SELECT DISTINCT ON (revision_repository, revision_value)
2679 revision_repository, revision_value, revision_time FROM build_revisions);
2681 INSERT INTO build_commits (commit_build, build_commit) SELECT revision_build, commit_id
2682 FROM commits, build_revisions
2683 WHERE commit_repository = revision_repository AND commit_revision = revision_value;
2685 DROP TABLE build_revisions;
2690 The helper script to submit commit logs can be used as follows:
2692 python ./tools/pull-svn.py "WebKit" https://svn.webkit.org/repository/webkit/ https://perf.webkit.org
2693 feeder-slave feeder-slave-password 60 "webkit-patch find-users"
2695 The above command will pull the subversion server at https://svn.webkit.org/repository/webkit/ every 60 seconds
2696 to retrieve at most 10 commits, and submits the results to https://perf.webkit.org using "feeder-slave" and
2697 "feeder-slave-password" as the builder name and the builder password respectively.
2699 The last, optional, argument is the shell command to convert a subversion account to the corresponding username.
2700 e.g. "webkit-patch find-users rniwa@webkit.org" yields "Ryosuke Niwa" <rniwa@webkit.org> in the stdout.
2703 * init-database.sql: Replaced "build_revisions" relation with "commits" and "build_commits" relations.
2705 * public/api/commits.php: Added. Retrieves a list of commits based on arguments in its path of the form
2706 /api/commits/<repository-name>/<filter>. The behavior of this API depends on <filter> as follows:
2708 - Not specified - It returns every single commit for a given repository.
2709 - Matches "oldest" - It returns the commit with the oldest timestamp.
2710 - Matches "latest" - It returns the commit with the latest timestamp.
2711 - Matches "last-reported" - It returns the commit with the latest timestamp added via report-commits.php.
2712 - Is entirely alphanumeric - It returns the commit whose revision matches the filter.
2713 - Is of the form <alphanumeric>:<alphanumeric> or <alphanumeric>-<alphanumeric> - It retrieves the list
2714 of commits added via report-commits.php between two timestamps retrieved from commits whose revisions
2715 match the two alphanumeric values specified. Because it retrieves commits based on their timestamps,
2716 the list may contain commits that do not appear as neither hash's ancestor in git/mercurial.
2718 (commit_from_revision):
2719 (fetch_commits_between):
2722 * public/api/report-commits.php: Added. A JSON API to report new subversion, git, or mercurial commits.
2723 See tests/api-report-commits.js for examples on how to use this API.
2725 * public/api/runs.php: Updated the query to use "commit_builds" and "commits" relations instead of
2726 "build_revisions". Regrettably, the new query is 20% slower but I'm going to wait until the new UI is ready
2727 to optimize this and other JSON APIs.
2729 * public/include/db.php:
2730 (Database::select_or_insert_row):
2731 (Database::update_or_insert_row): Added.
2732 (Database::_select_update_or_insert_row): Extracted from select_or_insert_row. Try to update first and then
2733 insert if the update fails for update_or_insert_row. Preserves the old behavior when $should_update is false.
2735 (Database::select_first_row):
2736 (Database::select_last_row): Added.
2737 (Database::select_first_or_last_row): Extracted from select_first_row. Fixed a bug that we were asserting
2738 $order_by to be not alphanumeric/underscore. Retrieve the last row instead of the first if $descending_order.
2740 * public/include/report-processor.php:
2741 (ReportProcessor::resolve_build_id): Store commits instead of build_revisions. We don't worry about the race
2742 condition for adding "build_commits" rows since we shouldn't have a single tester submitting the same result
2743 concurrently. Even if it happened, it will only result in a PHP error and the database will stay consistent.
2746 (pathToTests): Don't call path.resolve with "undefined" testName; It throws an exception in the latest node.js.
2748 * tests/api-report-commits.js: Added.
2749 * tests/api-report.js: Fixed a test per build_revisions to build_commits/commits replacement.
2752 * tools/pull-svn.py: Added. See above for how to use this script.
2754 (determine_first_revision_to_fetch):
2755 (fetch_revision_from_dasbhoard):
2756 (fetch_commit_and_resolve_author):
2759 (resolve_author_name_from_email):
2762 2014-09-30 Ryosuke Niwa <rniwa@webkit.org>
2764 Update Install.md for Mavericks and fix typos
2765 https://bugs.webkit.org/show_bug.cgi?id=137276
2767 Reviewed by Benjamin Poulain.
2769 Add the instruction to copy php.ini to enable the Postgres extension in PHP.
2771 Also use perf.webkit.org as the directory name instead of WebKitPerfMonitor.
2773 Finally, init-database.sql is no longer located inside database directory.
2777 2014-08-11 Ryosuke Niwa <rniwa@webkit.org>
2779 Report run id's in api/runs.php for the new dashboard UI
2780 https://bugs.webkit.org/show_bug.cgi?id=135813
2782 Reviewed by Andreas Kling.
2784 Include run_id in the generated JSON.
2786 * public/api/runs.php:
2787 (fetch_runs_for_config): Don't sort results by time since that has been done in the front end for ages now.
2790 2014-08-11 Ryosuke Niwa <rniwa@webkit.org>
2792 Merging platforms mixes baselines and targets into reported data
2793 https://bugs.webkit.org/show_bug.cgi?id=135260
2795 Reviewed by Andreas Kling.
2797 When merging two platforms, move test configurations of a different type (baseline, target)
2798 as well as of different metric (Time, Runs).
2800 Also avoid fetching the entire table of runs just to see if there are no remaining runs.
2801 It's sufficient to detect one such test_runs object.
2803 * public/admin/platforms.php:
2806 2014-07-30 Ryosuke Niwa <rniwa@webkit.org>
2808 Merging platforms mixes baselines and targets into reported data
2809 https://bugs.webkit.org/show_bug.cgi?id=135260
2811 Reviewed by Geoffrey Garen.
2813 Make sure two test configurations we're merging are of the same type (e.g. baseline, target, current).
2814 Otherwise, we'll erroneously mix up runs for baseline, target, and current (reported values).
2816 * public/admin/platforms.php:
2818 2014-07-23 Ryosuke Niwa <rniwa@webkit.org>
2820 Build fix after r171361.
2822 * public/js/helper-classes.js:
2823 (.this.formattedBuildTime):
2825 2014-07-22 Ryosuke Niwa <rniwa@webkit.org>
2827 Perf dashboard spends 2s processing JSON data during the page loads
2828 https://bugs.webkit.org/show_bug.cgi?id=135152
2830 Reviewed by Andreas Kling.
2832 In the Apple internal dashboard, we were spending as much as 2 seconds
2833 converting raw JSON data into proper JS objects while loading the dashboard.
2835 This caused the apparent unresponsiveness of the dashboard despite of the fact
2836 charts themselves updated almost instantaneously.
2838 * public/index.html:
2839 * public/js/helper-classes.js:
2840 (TestBuild): Compute the return values of formattedTime and formattedBuildTime
2841 lazily as creating new Date objects and running string replace is expensive.
2842 (TestBuild.formattedTime):
2843 (TestBuild.formattedBuildTime):
2844 (PerfTestRuns.setResults): Added. Pushing each result was the biggest bottle neck.
2845 (PerfTestRuns.addResult): Deleted.
2847 2014-07-18 Ryosuke Niwa <rniwa@webkit.org>
2849 Perf dashboard shouldn't show the full git hash
2850 https://bugs.webkit.org/show_bug.cgi?id=135083
2852 Reviewed by Benjamin Poulain.
2854 Detect Git/Mercurial hash by checking the length.
2856 If it's a hash, use the first 8 characters in the label
2857 while retaining the full length to be used in hyperlinks.
2859 * public/js/helper-classes.js:
2860 (.this.formattedRevisions):
2863 2014-05-29 Ryosuke Niwa <rniwa@webkit.org>
2865 Add an instruction on how to backup the database.
2866 https://bugs.webkit.org/show_bug.cgi?id=133391
2868 Rubber-stamped by Andreas Kling.
2872 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
2874 Build fix after r166479. 'bytes' is now abbreviated as 'B'.
2876 * public/js/helper-classes.js:
2877 (PerfTestRuns.smallerIsBetter):
2879 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
2883 * public/common.css:
2885 * public/index.html:
2889 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2891 WebKitPerfMonitor: There should be a way to add all metrics of a suite without also adding subtests
2892 https://bugs.webkit.org/show_bug.cgi?id=131157
2894 Reviewed by Andreas Kling.
2896 Split "all metrics" into all metrics of a test suite and all subtests of the suite.
2897 This allows, for example, adding all metrics such as Arithmetic and Geometric for
2898 a given test suite without also adding its subtests.
2900 * public/index.html:
2904 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2906 WebKitPerfMonitor: Tooltips cannot be pinned after using browser's back button
2907 https://bugs.webkit.org/show_bug.cgi?id=131155
2909 Reviewed by Andreas Kling.
2911 The bug was caused by Chart.attach binding event listeners on plot container on each call.
2912 This resulted in the click event handler toggling the visiblity of the tooltip twice upon
2913 click when attach() has been called even number of times, keeping the tooltip invisible.
2915 Fixed the bug by extracting the code to bind event listeners outside of Chart.attach as
2916 a separate function, bindPlotEventHandlers, and calling it exactly once when Chart.attach
2917 is called for the first time.
2919 * public/index.html:
2921 (Chart..bindPlotEventHandlers):
2923 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2925 WebKitPerfMonitor: Tooltips can be cut off at the top
2926 https://bugs.webkit.org/show_bug.cgi?id=130960
2928 Reviewed by Andreas Kling.
2930 * public/common.css:
2931 (#title): Removed the gradients, box shadows, and border from the header.
2932 (#title h1): Reduce the font size.
2933 (#title ul): Use line-height to vertically align the navigation bar instead of specifying a padding atop.
2934 * public/index.html:
2935 (.tooltop:before): Added. Identical to .tooltop:after except it's upside down (arrow facing up).
2936 (.tooltip.inverted:before): Show the arrow facing up when .inverted is set.
2937 (.tooltip.inverted:before): Hide the arrow facing down when .inverted is set.
2938 * public/js/helper-classes.js:
2939 (Tooltip.show): Show the tooltip below the point if placing it above the point results in the top of the
2940 tooltip extending above y=0.
2942 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2944 WebKitPerfMonitor: Y-axis adjustment is too aggressive
2945 https://bugs.webkit.org/show_bug.cgi?id=130937
2947 Reviewed by Andreas Kling.
2949 Previously, adjusted min. and max. were defined as the two standards deviations away from EWMA of measured
2950 results. This had two major problems:
2951 1. Two standard deviations can be too small to show the confidence interval for results.
2952 2. Sometimes baseline and target can be more than two standards deviations away.
2954 Fixed the bug by completely rewriting the algorithm to compute the interval. Instead of blindly using two
2955 standard deviations as margins, we keep adding quarter the standard deviation on each side until more than 90%
2956 of points lie in the interval or we've expanded 4 standard deviations. Once this condition is met, we reduce
2957 the margin on each side separately to reduce the empty space on either side.
2959 A more rigorous approach would involve computing least squared value of results with respect to intervals
2960 but that seems like an overkill for a simple UI problem; it's also computationally expensive.
2962 * public/index.html:
2963 (Chart..adjustedIntervalForRun): Extracted from computeYAxisBoundsToFitLines.
2964 (Chart..computeYAxisBoundsToFitLines): Compute the min. and max. adjusted intervals out of adjusted intervals
2965 for each runs (current, baseline, and target) so that at least one point from each set of results is shown.
2966 We wouldn't see the difference between measured values versus baseline and target values otherwise.
2967 * public/js/helper-classes.js:
2968 (PerfTestResult.unscaledConfidenceIntervalDelta): Returns the default value if the confidence
2969 interval delta cannot be computed.
2970 (PerfTestResult.isInUnscaledInterval): Added. Returns true iff the confidence intervals lies
2971 within the given interval.
2972 (PerfTestRuns..filteredResults): Extracted from unscaledMeansForAllResults now that PerfTestRuns.min and
2973 PerfTestRuns.max need to use both mean and confidence interval delta for each result.
2974 (PerfTestRuns..unscaledMeansForAllResults):
2975 (PerfTestRuns.min): Take the confidence interval delta into account.
2976 (PerfTestRuns.max): Ditto.
2977 (PerfTestRuns.countResults): Returns the number of results in the given time frame (> minTime).
2978 (PerfTestRuns.countResultsInInterval): Returns the number of results whose confidence interval lie within the
2980 (PerfTestRuns.exponentialMovingArithmeticMean): Fixed the typo so that it actually computes the EWMA.
2982 2014-03-31 Ryosuke Niwa <rniwa@webkit.org>
2984 Some CSS tweaks after r166477 and r166479,
2986 * public/index.html:
2988 2014-03-30 Ryosuke Niwa <rniwa@webkit.org>
2990 WebKitPerfMonitor: Sometimes text inside panes overlap
2991 https://bugs.webkit.org/show_bug.cgi?id=130956
2993 Reviewed by Gyuyoung Kim.
2995 Revamped the pane UI. Now build info uses table element instead of plane text with BRs. The computed status of
2996 the latest result against baseline/target such as "3% until target" is now shown above the current value. This
2997 reduces the total height of the pane and fits more information per screen capita on the dashboard.
2999 * public/index.html: Updated and added a bunch of CSS rules for the new look.
3000 (.computeStatus): Don't append the build info here. The build info is constructed as a separate table now.
3001 (.createSummaryRowMarkup): Use th instead of td for "Current", "Baseline", and "Target" in the summary table.
3002 (.buildLabelWithLinks): Construct table rows instead of br separated lines of text. This streamlines the look
3003 of the build info shown in a chart pane and a tooltip.
3004 (Chart): Made .status a table.
3005 (Chart.populate): Prepend status.text, which contains text such as "3% until target", into the summary rows
3006 right above "Current" value, and populate .status with buildLabelWithLinks manually instead of status.text
3007 now that status.text no longer contains it.
3008 (Chart..showTooltipWithResults): Wrap buildLabelWithLinks with a table element.
3010 * public/js/helper-classes.js:
3011 (TestBuild.formattedRevisions): Don't include repository names in labels since repository names are now added
3012 by buildLabelWithLinks inside th elements. Also place spaces around '-' between two different OS X versions.
3013 e.g. "OS X 10.8 - OS X 10.9" instead of "OS X 10.8-OS X 10.9".
3014 (PerfTestRuns): Use "/s" for "runs/s" and "B" for "bytes" to make text shorter in .status and .summaryTable.
3015 (PerfTestRuns..computeScalingFactorIfNeeded): Avoid placing a space between 'M' and a unit starting with a
3016 capital letter; e.g. "MB" instead of "M B".
3018 2014-03-30 Ryosuke Niwa <rniwa@webkit.org>
3020 WebKitPerfMonitor: Header and number-of-days slider takes up too much space
3021 https://bugs.webkit.org/show_bug.cgi?id=130957
3023 Reviewed by Gyuyoung Kim.
3025 Moved the slider into the header. Also reduced the spacing between the header and platform names.
3026 This reclaims 50px × width of the screen real estate.
3028 * public/common.css:
3029 (#title): Reduced the space below the header from 20px to 10px.
3030 * public/index.html:
3031 (#numberOfDaysPicker): Removed the rounded border around the number-of-days slider.
3032 (#dashboard > tbody > tr > td): Added a 1.5em padding at the bottom.
3033 (#dashboard > thead th): That allows us to remove the padding at the top here. This reduces the wasted screen
3034 real estate between the header and the platform names.
3036 2014-03-10 Zoltan Horvath <zoltan@webkit.org>
3038 Update the install guidelines for perf.webkit.org
3039 https://bugs.webkit.org/show_bug.cgi?id=129895
3041 Reviewed by Ryosuke Niwa.
3043 The current install guideline for perf.webkit.org discourages the use of the installed
3044 Server application. I've actualized the documentation for Mavericks, and modified the
3045 guideline to include the instructions for Server.app also.
3049 2014-03-08 Zoltan Horvath <zoltan@webkit.org>
3051 Update perf.webkit.org json example
3052 https://bugs.webkit.org/show_bug.cgi?id=129907
3054 Reviewed by Andreas Kling.
3056 The current example is not valid json syntax. I fixed the syntax errors and indented the code properly.
3060 2014-01-31 Ryosuke Niwa <rniwa@webkit.org>
3062 Merge database-common.js and utility.js into run-tests.js.
3064 Reviewed by Matthew Hanson.
3066 Now that run-tests is the only node.js script, merged database-common.js and utility.js into it.
3067 Also moved init-database.sql out of the database directory and removed the directory entirely.
3069 * database: Removed.
3070 * database/database-common.js: Removed.
3071 * database/utility.js: Removed.
3072 * init-database.sql: Moved from database/init-database.sql.
3074 (connect): Moved from database-common.js.
3075 (pathToDatabseSQL): Extracted from pathToLocalScript.
3076 (pathToTests): Moved from database-common.js.
3079 (SerializedTaskQueue): Ditto.
3081 (initializeDatabase):
3082 (TestEnvironment.it):
3083 (TestEnvironment.queryAndFetchAll):
3086 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3088 Remove the dependency on node.js from the production code.
3090 Reviewed by Ricky Mondello.
3092 Work towards <rdar://problem/15955053> Upstream SafariPerfMonitor.
3094 Removed node.js dependency from TestRunsGenerator. It was really a design mistake to invoke node.js from php.
3095 It added so much complexity with only theoretical extensibility of adding aggregators. It turns out that
3096 many aggregators we'd like to add are a lot more complicated than ones that could be written under the current
3097 infrastructure, and we need to make the other aspects (e.g. the level of aggregations) a lot more extensible.
3098 Removing and simplifying TestRunsGenerator allows us to implement such extensions in the future.
3100 Also removed the js files that are no longer used.
3102 * config.json: Moved from database/config.json.
3103 * database/aggregate.js: Removed. No longer used.
3104 * database/database-common.js: Removed unused functions, and updated the path to config.json.
3105 * database/process-jobs.js: Removed. No longer used.
3106 * database/sample-data.sql: Removed. We have a much better corpus of data now.
3107 * database/schema.graffle: Removed. It's completely obsolete.
3108 * public/include/db.php: Updated the path to config.json.
3109 * public/include/evaluator.js: Removed.
3111 * public/include/report-processor.php:
3112 (TestRunsGenerator::aggregate): Directly aggregate values via newly added aggregate_values method instead of
3113 storing values into $expressions and calling evaluate_expressions_by_node.
3114 (TestRunsGenerator::aggregate_values): Added.
3115 (TestRunsGenerator::compute_caches): Directly compute the caches.
3117 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3119 Build fix. Don't fail the platform merges even if there are no test configurations to be moved to the new platform.
3121 * public/admin/platforms.php:
3122 * public/include/db.php:
3124 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3126 Zoomed y-axis view is ununsable when the last result is an outlier.
3128 Reviewed by Stephanie Lewis.
3130 Show two standard deviations from the exponential moving average with alpha = 0.3 instead of the mean of
3131 the last result so that the graph looks sane if the last result was an outlier. However, always show
3132 the last result's mean even if it was an outlier.
3134 * public/index.html:
3135 * public/js/helper-classes.js:
3136 (unscaledMeansForAllResults): Extracted from min/max/sampleStandardDeviation.
3137 Also added the ability to cache the unscaled means to avoid recomputation.
3138 (PerfTestRuns.min): Refactored to use unscaledMeansForAllResults.
3139 (PerfTestRuns.max): Ditto.
3140 (PerfTestRuns.sampleStandardDeviation): Ditto.
3141 (PerfTestRuns.exponentialMovingArithmeticMean): Added.
3143 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
3147 * public/admin/tests.php:
3148 * public/js/helper-classes.js:
3150 2014-01-29 Ryosuke Niwa <rniwa@webkit.org>
3152 Use two standard deviations instead as I mentioned in the mailing list.
3154 * public/index.html:
3156 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
3158 The performance dashboard erroneously shows upward arrow for combined metrics.
3160 A single outlier can ruin the zoomed y-axis view.
3162 Rubber-stamped by Antti Koivisto.
3164 * public/index.html:
3165 (computeYAxisBoundsToFitLines): Added adjustedMax and adjustedMin, which are pegged at 4 standard deviations
3166 from the latest results' mean.
3167 (Chart): Renamed shouldStartYAxisAtZero to shouldShowEntireYAxis.
3168 (Chart.attachMainPlot): Use the adjusted max and min when we're not showing the entire y-axis.
3169 (Chart.toggleYAxis):
3170 * public/js/helper-classes.js:
3171 (PerfTestRuns.sampleStandardDeviation): Added.
3172 (PerfTestRuns.smallerIsBetter): 'Combined' is a smaller is better metric.
3174 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
3176 Don't include the confidence interval when computing the y-axis.
3178 Rubber-stamped by Simon Fraser.
3180 * public/js/helper-classes.js:
3184 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
3186 Tiny CSS tweak for tooltips.
3188 * public/index.html:
3190 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
3192 Remove the erroneously repeated code.
3194 * public/admin/test-configurations.php:
3196 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
3198 <rdar://problem/15704893> perf dashboard should show baseline numbers
3200 Reviewed by Stephanie Lewis.
3202 * public/admin/bug-trackers.php:
3203 (associated_repositories): Return an array of HTMLs instead of echo'ing as expected by AdministrativePage.
3206 * public/admin/platforms.php:
3207 (merge_list): Ditto.
3209 * public/admin/test-configurations.php: Added.
3210 (add_run): Adds a "synthetic" test run and a corresponding build. It doesn't create run_iterations and
3211 build_revisions as they're not meaningful for baseline / target numbers.
3212 (delete_run): Deletes a synthetic test run and its build. It verifies that the specified build has exactly
3213 one test run so that we don't accidentally delete a reported test run.
3214 (generate_rows_for_configurations): Generates rows of configuration IDs and types.
3215 (generate_rows_for_test_runs): Ditto for test runs. It also emits the form to add new "synthetic" test runs
3216 and delete existing ones.
3218 * public/admin/tests.php: We wrongfully assumed there is exactly one test configuration for each metric
3219 on each platform; there could be configurations of distinct types such as "current" and "baseline".
3220 Thus, update all test configurations for a given metric when updating config_is_in_dashboard.
3222 * public/api/runs.php: Remove the NotImplemented when we have multiple test configurations.
3223 (fetch_runs_for_config): "Synthetic" test runs created on test-configurations page are missing revision
3224 data so we need to left-outer-join (instead of inner-join) build_revisions. To avoid making the query
3225 unreadable, don't join revision_repository here. Instead, fetch the list of repositories upfront and
3226 resolve names in parse_revisions_array. This actually reduces the query time by ~10%.
3228 (parse_revisions_array): Skip an empty array created for "synthetic" test runs.
3230 * public/include/admin-header.php:
3231 (AdministrativePage::render_table): Now custom columns support sub columns. e.g. a configuration column may
3232 have id and type sub columns, and each custom column could generate multiple rows.
3234 Any table with sub columns now generates two rows for thead. We generate td's in in the first row without
3235 sub columns with rowspan of 2, and generate ones with sub columns with colspan set to the sub column count.
3236 We then proceed to generate the second header row with sub column names.
3238 When generating the actual content, we first generate all custom columns as they may have multiple rows in
3239 which case regular columns need rowspan set to the maximum number of rows.
3241 Once we've generated the first row, we proceed to generate subsequent rows for those custom columns that
3244 (AdministrativePage::render_custom_cells): Added. This function is responsible for generating table cells
3245 for a given row in a given custom column. It generates an empty td when the custom column doesn't have
3246 enough rows. It also generates empty an td when it doesn't have enough columns in some rows except when
3247 the entire row consists of exactly one cell for a custom column with sub columns, in which case the cell is
3248 expanded to occupy all sub columns.
3250 * public/include/manifest.php:
3251 (ManifestGenerator::platforms): Don't add the metric more than once.
3253 * public/include/test-name-resolver.php:
3254 (TestNameResolver::__construct): We had wrongfully assumed that we have exactly one test configuration on
3255 each platform for each metric like tests.php. Fixed that. Also fetch the list of aggregators to compute the
3256 full metric name later.
3257 (TestNameResolver::map_metrics_to_tests): Populate $this->id_to_metric.
3258 (TestNameResolver::test_id_for_full_name): Simplified the code using array_get.
3259 (TestNameResolver::full_name_for_test): Added.
3260 (TestNameResolver::full_name_for_metric): Added.
3261 (TestNameResolver::configurations_for_metric_and_platform): Renamed as it returns multiple configurations.
3263 * public/js/helper-classes.js:
3264 (TestBuild): Use the build time as the maximum time when revision information is missing for "synthetic"
3265 test runs created to set baseline and target points.
3267 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
3269 Build fix after r57928. Removed a superfluous close parenthesis.
3271 * public/api/runs.php:
3273 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
3275 Unreviewed build & typo fixes.
3277 * public/admin/platforms.php:
3278 * tests/admin-platforms.js:
3280 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
3282 <rdar://problem/15704893> perf dashboard should show baseline numbers
3284 Rubber-stamped by Antti Koivisto.
3286 Organize some code into functions in runs.php.
3288 Also added back $paths that was erroneously removed in r57925 from json-header.php.
3290 * public/api/runs.php:
3291 (fetch_runs_for_config): Extracted.
3292 (format_run): Ditto.
3294 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
3296 Merge the upstream json-shared.php as of https://trac.webkit.org/r162693.
3298 * database/config.json:
3299 * public/admin/reprocess-report.php:
3300 * public/api/report.php:
3301 * public/api/runs.php:
3302 * public/include/json-header.php:
3304 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
3306 Commit yet another forgotten change.
3308 Something went horribly wrong with my merge :(
3310 * database/init-database.sql:
3312 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
3314 Commit one more forgotten change. Sorry for making a mess here.
3316 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
3318 Commit the forgotten files.
3320 * public/admin/platforms.php: Added.
3321 * tests/admin-platforms.js: Added.
3323 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
3325 <rdar://problem/15889905> SafariPerfMonitor: there should be a way to merge and hide platforms
3327 Reviewed by Stephanie Lewis.
3329 Added /admin/platforms/ page to hide and merge platforms.
3331 Merging two platforms is tricky because we need to migrate test runs as well as some test configurations.
3332 Recall that each test (e.g. Dromaeo) can have many "test metrics" (e.g. MaxAllocations, EndAllocations),
3333 and they have a distinct "test configuration" for each platform (e.g. MaxAllocation on Mountain Lion), and
3334 each test configuration a distinct "test run" for each build.
3336 In order to merge platform A into platform B, we must migrate all test runs that belong to platform A via
3337 their test configurations into platform B.
3339 Suppose we're migrating a test run R for test configuration T_A in platform A for metric M. Since M exists
3340 independent of platforms, R should continue to relate to M through some test configuration. Unfortunately,
3341 we can't simply move T_A into platform B since we may already have a test configuration T_B for metric M
3342 in platform B, in which case R should relate to T_B instead.
3344 Thus, we first migrate all test runs for which we already have corresponding test configurations in the
3345 new platform. We then migrate the test configurations of the remaining test runs.
3347 * database/init-database.sql: Added platform_hidden.
3349 * public/admin/platforms.php: Added.
3350 (merge_platforms): Added. Implements the algorithm described above.
3351 (merge_list): Added.
3353 * public/admin/tests.php: Disable the checkbox to show a test configuration on the dashboard if its platform
3354 is hidden since it doesn't do anything.
3356 * public/include/admin-header.php: Added the hyperlink to /admin/platforms.
3357 (update_field): Don't bail out if the newly added "update-column" is set to the field name even if $_POST is
3358 missing it since unchecked checkbox doesn't set the value in $_POST.
3359 (AdministrativePage::render_form_control_for_column): Added the support for boolean edit mode. Also used
3360 switch statement instead of repeated if's.
3361 (AdministrativePage::render_table): Emit "update-column" for update_field.
3363 * public/include/db.php: Disable warnings when we're not in the debug mode.
3365 * public/include/manifest.php:
3366 (ManifestGenerator::platforms): Skip platforms that have been hidden.
3369 (TestEnvironment.postJSON):
3370 (TestEnvironment.httpGet):
3371 (TestEnvironment.httpPost): Added.
3372 (sendHttpRequest): Set the content type if specified.
3374 * tests/admin-platforms.js: Added tests.
3376 2014-01-22 Ryosuke Niwa <rniwa@webkit.org>
3378 Extract the code to compute full test names from tests.php.
3380 Reviewed by Stephanie Lewis.
3382 Extracted TestNameResolver out of tests.php. This reduces the number of global variables in tests.php
3383 and paves our way to re-use the code in other pages.
3385 * public/admin/tests.php:
3387 * public/include/db.php:
3388 (array_set_default): Renamed from array_item_set_default and moved from tests.php as it's used in both
3389 tests.php and test-name-resolver.php.
3391 * public/include/test-name-resolver.php: Added.
3392 (TestNameResolver::__construct):
3393 (TestNameResolver::compute_full_name): Moved from tests.php.
3394 (TestNameResolver::map_metrics_to_tests): Ditto.
3395 (TestNameResolver::sort_tests_by_full_name): Ditto.
3396 (TestNameResolver::tests): Added.
3397 (TestNameResolver::test_id_for_full_name): Ditto.
3398 (TestNameResolver::metrics_for_test_id): Ditto.
3399 (TestNameResolver::child_metrics_for_test_id): Ditto.
3400 (TestNameResolver::configuration_for_metric_and_platform): Ditto.
3402 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
3404 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
3406 Reviewed by Stephanie Lewis.
3408 Add the ability to reprocess reports so that I can re-associate wrongfully associated reports.
3410 Added public/admin/reprocess-report.php. It doesn't have any nice UI to find reports and it returns JSON
3411 but that's sufficient to correct the wrongfully processed reports for now.
3413 * public/admin/reprocess-report.php: Added. Takes a report id in $_GET or $_POST and process the report.
3414 We should eventually add a nice UI to find and reprocess reports.
3416 * public/api/report.php: ReportProcessor and TestRunsGenerator have been removed.
3418 * public/include/db.php: Added the forgotten call to prefixed_column_names.
3420 * public/include/report-processor.php: Copied from public/api/report.php.
3421 (ReportProcessor::__construct): Fetch the list of aggregators here for simplicity.
3422 (ReportProcessor::process): Optionally takes $existing_report_id. When this value is specified, we don't
3423 create a new report or authenticate the builder password (the password is never stored in the report).
3424 Also use select_first_row instead of query_and_fetch_all to find the builder for simplicity.
3425 (ReportProcessor::construct_build_data): Extracted from store_report_and_get_build_data.
3426 (ReportProcessor::store_report): Ditto.
3428 * tests/admin-reprocess-report.js: Added.
3430 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
3432 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
3434 Reviewed by Ricky Mondello.
3436 The bug was caused by a build fix r57645. It attempted to treat multiple reports from the same builder
3437 for the same build number as a single build by ignoring build time. This was necessary to associate
3438 multiple reports by a single build - e.g. for different performance test suites - because the scripts
3439 we use to submit results computed its own "build time" when they're called.
3441 An unintended consequence of this change was revealed when we moved a buildbot master to the new machine
3442 last week; new reports were wrongfully associated with old build numbers.
3444 Fixed the bug by not allowing reports made more than 1 day after the initial build time to be assigned
3445 to the same build. Instead, we create a new build object for those reports. Since the longest set of
3446 tests we have only take a couple of hours to run, 24 hours should be more than enough.
3448 * database/init-database.sql: We can no longer constrain that each build number is unique to a builder
3449 or that build number and build time pair is unique. Instead, constrain the uniqueness of the tuple
3450 (builder, build number, build time).
3452 * public/api/report.php:
3453 (ReportProcessor::resolve_build_id): Look for any builds made within the past one day. Create a new build
3454 when no such build exists. This prevents a report from being associated with a very old build of the same
3457 Also check that revision numbers or hashes match when we're adding revision info. This will let us catch
3458 a similar bug in the future sooner.
3460 * tests/api-report.js: Added three test cases.
3462 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
3464 Merged the upstream changes to db.php
3465 See http://trac.webkit.org/browser/trunk/Websites/test-results/public/include/db.php
3467 * public/include/db.php:
3469 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
3471 Update other scripts and tests per previous patch.
3473 * public/include/manifest.php:
3474 * tests/admin-regenerate-manifest.js:
3476 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
3478 Remove metrics_unit.
3480 Reviewed by Ricky Mondello.
3482 This column is no longer used by the front-end code since r48360.
3484 * database/init-database.sql:
3485 * public/admin/tests.php:
3487 2014-01-16 Ryosuke Niwa <rniwa@webkit.org>
3489 Unreviewed build fix.
3491 * public/api/report.php:
3493 2014-01-15 Ryosuke Niwa <rniwa@webkit.org>
3495 <rdar://problem/15832456> Automate DoYouEvenBench (124497)
3497 Reviewed by Ricky Mondello.
3499 Support a new alternative format for aggregated results where we have raw values as well as
3500 the list aggregators so that instead of
3501 "metrics": {"Time": ["Arithmetic"]}
3503 "metrics": {"Time": { "aggregators" : ["Arithmetic"], "current": [300, 310, 320, 330] }}
3505 This allows single JSON generated by run-perf-tests in WebKit to be shared between the perf
3506 dashboard and the generated results page, which doesn't know how to aggregate values.
3508 We need to keep the support for the old format because all other existing performance tests
3509 all rely on the old format. Even if we updated the tests, we need the dashboard to support
3510 the old format during the transition.
3512 * public/api/report.php:
3513 (ReportProcessor::recursively_ensure_tests): Support the new format in addition to the old one.
3514 (ReportProcessor::aggregator_list_if_exists): Replaced is_list_of_aggregators.
3516 * tests/api-report.js: Updated one of aggregator test cases to test the new format.
3518 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
3520 Unreviewed; Tweak the CSS so that chart panes align vertically.
3522 * public/index.html:
3524 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
3526 SafariPerfMonitor should support Combined metric.
3528 * public/js/helper-classes.js:
3529 (PerfTestRuns): Added 'Combined' metric. In general, it could be used for smaller-is-better
3530 value as well but assume it to be greater-is-better for now.
3532 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
3534 Commit the forgotten init-database change to add iteration_relative_time.
3536 * database/init-database.sql:
3538 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
3540 <rdar://problem/13993069> SafariPerfMonitor: Support accepting (relative time, value) pairs
3542 Reviewed by Ricky Mondello.
3544 Add the support for each value to have a relative time. This is necessary for frame rate history
3545 since a frame rate needs to be associated with a time it was sampled.
3547 * database/init-database.sql: Added iteration_relative_time to run_iterations.
3549 * public/api/report.php:
3550 (TestRunsGenerator::test_value_list_to_values_by_iterations): Reject any non-numeral values here.
3551 This code is used to aggregate values but it doesn't make sense to aggregate iteration values
3552 with relative time since taking the average of two frame rates for two subtests taken at two
3553 different times doesn't make any sense.
3554 (TestRunsGenerator::compute_caches): When we encounter an array value while computing sum, mean,
3555 etc..., use the second element since we assume values are of the form (relative time, frame rate).
3556 Also exit early with an error if the number of elements in the array is not a pair.
3557 (TestRunsGenerator::commit): Store the relative time and the frame rate as needed.
3559 * tests/api-report.js: Added a test case. Also modified existing test cases to account for
3560 iteration_relative_time.
3562 2013-05-27 Ryosuke Niwa <rniwa@webkit.org>
3564 <rdar://problem/13654488> SafariPerfMonitor: Support accepting single-value results
3566 Reviewed by Ricky Mondello.
3568 Support that. It's one line change.
3570 * public/api/report.php:
3571 (ReportProcessor.recursively_ensure_tests): When there is exactly one value, wrap it inside an array
3572 to match the convention assumed elsewhere.
3573 * tests/api-report.js: Added a test case.
3575 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3577 SafariPerfMonitor shows popups for points outside of the visible region.
3579 Rubber-stamped by Simon Fraser.
3581 * public/index.html:
3582 (Chart.closestItemForPageXRespectingPlotOffset): renamed from closestItemForPageX.
3583 (Chart.attach): Always use closestItemForPageXRespectingPlotOffset to work around the fact flot
3584 may return an item underneath y-axis labels.
3586 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3588 Tweak the CSS a little to avoid the test name overlapping with the summary table.
3590 * public/index.html:
3592 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3594 Unreviewed. Fix the typo. The anchor element should wrap the svg element, not the other way around.
3596 * public/index.html:
3598 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3600 <rdar://problem/13992266> Should be a toggle to show entire Y-axis range
3601 <rdar://problem/13992271> Should scale Y axis to include error ranges
3603 Reviewed by Ricky Mondello.
3605 Add the feature. Also made adjust y-axis respect confidence interval delta so that the gray shade behind
3606 the main graph doesn't go outside the graph even when the y-axis is adjusted.
3608 * database/config.json:
3609 * public/index.html:
3610 (Chart): Add a SVG arrow to toggle y-axis mode, and bind click on the arrow to toggleYAxis().
3611 (Chart.attachMainPlot): Respect shouldStartYAxisAtZero.
3612 (Chart.toggleYAxis): Toggle the y-axis mode of this chart by toggling shouldStartYAxisAtZero and calling
3614 * public/js/helper-classes.js:
3615 (PerfTestResult.confidenceIntervalDelta):
3616 (PerfTestResult.unscaledConfidenceIntervalDelta): Extracted.
3617 (PerfTestRuns.min): Take confidence interval delta into account.
3618 (PerfTestRuns.max): Ditto.
3619 (PerfTestRuns.hasConfidenceInterval): Not sure why this function was checking the typeof. Just use isNaN.
3621 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
3623 A build fix of the previous. Don't look for a test with NULL parent because NULL != NULL in our beloved SQL.
3625 * public/api/report.php:
3626 (ReportProcessor::recursively_ensure_tests):
3627 * tests/api-report.js: Added a test.
3629 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
3631 Unreviewed build fixes.
3633 * public/api/report.php:
3634 (ReportProcessor::process): Explicitly exit with error when builder name or build time is missing.
3635 Also, tolerate reports without any revision information.
3637 (ReportProcessor::recursively_ensure_tests): When looking for a test, don't forget to compare its
3640 * tests/api-report.js: Added few test cases.
3642 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
3644 Commit another change that was supposed to be committed in r50331.
3647 (TestEnvironment.this.postJSON):
3648 (TestEnvironment.this.httpGet):
3651 2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
3653 Commit the remaining files.