1 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
3 Perf dashboard should have a way of marking outliers
4 https://bugs.webkit.org/show_bug.cgi?id=143466
6 Reviewed by Chris Dumez.
8 Address kling's in-person comment to notify users when the new run status is saved in the database.
11 (App.PaneController._selectedItemIsMarkedOutlierDidChange)
12 * public/v2/chart-pane.css: Fixed a typo.
14 2015-04-07 Ryosuke Niwa <rniwa@webkit.org>
16 Perf dashboard should have a way of marking outliers
17 https://bugs.webkit.org/show_bug.cgi?id=143466
19 Reviewed by Chris Dumez.
21 Added UI to mark a data point as an outlier as well as a button to toggle the visibility of outliers.
22 Added a new privileged API /privileged-api/update-run-status to store this boolean flag.
24 * init-database.sql: Added run_marked_outlier column to test_runs table.
26 * public/admin/tests.php:
28 * public/api/runs.php:
29 (main): Only emit Cache-Control and Expires headers in v1 UI.
30 (RunsGenerator::format_run): Emit markedOutlier.
32 * public/include/admin-header.php:
34 * public/include/db.php:
35 (Database::is_true): Made it static.
37 * public/include/manifest.php:
38 (Manifest::platforms):
40 * public/index.html: Call into /api/runs/ with ?cache=true.
42 * public/privileged-api/update-run-status.php: Added.
43 (main): Updates the newly added column in test_runs table.
47 (App.Pane.refetchRuns): Extracted from App.Pane._fetch.
48 (App.Pane._didFetchRuns): Renamed from _updateChartData.
49 (App.Pane._setNewChartData): Added. Pick the right time series based based on the value of showOutlier.
50 Cloning chartData is necessary when toggling the outlier visibility or using statistics tools because
51 the interactive chart component only observes changes to chartData and not individual properties of it.
52 (App.Pane._highlightPointsMarkedAsOutlier): Added. Highlight points marked as outliers.
53 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Call to _setNewChartData replaced the code to
56 (App.PaneController.actions.toggleShowOutlier): Toggle the visibility of points marked as outliers by
57 invoking App.Pane._setNewChartData.
58 (App.PaneController._detailsChanged): Don't hide the analysis pane when details changed since keep
59 opening the pane for marking points as outliers would be annoying.
60 (App.PaneController._updateCanAnalyze): Update 'cannotMarkOutlier' as well as 'cannotAnalyze'.
61 (App.PaneController.selectedMeasurement): Added.
62 (App.PaneController.showOutlierTitle): Added.
63 (App.PaneController._selectedItemIsMarkedOutlierDidChange): Added. Call out to setMarkedOutlier to
64 mark the selected point as an outlier via the newly added privileged API.
66 * public/v2/chart-pane.css: Updated styles.
69 (PrivilegedAPI._post): Report the semantic errors.
70 (Measurement.prototype.markedOutlier): Added.
71 (Measurement.prototype.setMarkedOutlier): Added. Uses PrivilegedAPI to update the database.
72 (RunsData.prototype.timeSeriesByCommitTime): Added a new argument, includeOutliers, to indicate
73 whether the time series should include measurements marked as outliers or not.
74 (RunsData.prototype.timeSeriesByBuildTime): Ditto.
75 (RunsData.prototype._timeSeriesByTimeInternal): Extracted from timeSeriesByCommitTime and
76 timeSeriesByBuildTime to share code. Now ignores measurements marked as outliers if needed.
78 * public/v2/index.html: Added an icon for showing and hiding outliers. Also added a checkbox to
79 mark individual points as outliers.
81 * public/v2/interactive-chart.js:
82 (App.InteractiveChartComponent._selectClosestPointToMouseAsCurrentItem): Re-enable the distance
83 heuristics that takes vertical closeness into account. This heuristics is more useful when marking
84 some points as outliers. This heuristics was disabled because the behavior was unpredictable but
85 with the arrow key navigation support, this is no longer an issue.
87 * public/v2/manifest.js:
88 (App.Manifest._formatFetchedData): Added showOutlier to the chart data. This function dynamically
89 updates the time series in this chart data in order to include or exclude outliers.
91 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
93 Perf dashboard should be able to trigger A/B testing jobs for iOS
94 https://bugs.webkit.org/show_bug.cgi?id=143398
96 Reviewed by Chris Dumez.
98 Fix various bugs in the perf dashboard so that it can schedule A/B testing jobs for iOS.
100 Also generalized sync-with-buildbot.py slightly to meet the requirements of iOS builders.
102 * public/api/triggerables.php:
103 (main): Avoid spitting a warning when $id_to_triggerable doesn't contain the triggerable.
104 * public/v2/analysis.js:
105 (App.AnalysisTask.triggerable): Log an error when failed to fetch triggerables for debugging purposes.
107 (App.AnalysisTaskController.updateRootConfigurations): Show 'None' when a revision is missing from
108 some of the data points. This will happen when we modify the list of projects we build for iOS.
109 (App.AnalysisTaskController.actions.createTestGroup): Gracefully fail by showing alerts when an user
110 attempts to create an invalid test group; when there is already another test group of the same or when
111 only either configuration specifies the revision for some repository.
112 (App.AnalysisTaskController._updateRootsBySelectedPoints): Fixed a typo: sets[i] -> set.
113 * public/v2/index.html: Don't show the form to create a new test group if it's not available.
114 * tools/sync-with-buildbot.py:
115 (find_request_updates):
116 (schedule_request): iOS builders take a JSON that contains the list of roots. Generate this JSON when
117 a dictionary of the form {rootsExcluding: ["WebKit"]} is specified. Also replaced the way we refer to
118 a revision from $-based text replacements to an explicit dictionary of the form {root: "WebKit"}.
119 (request_id_from_build): Don't hard code the parameter name here. Retrieve the name from the config.
121 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
123 Add time series segmentation algorithms as moving averages
124 https://bugs.webkit.org/show_bug.cgi?id=143362
126 Reviewed by Chris Dumez.
128 This patch implements two preliminary time series segmentation algorithms as moving averages.
130 Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
131 If Welch's t-test implicates a statistically significance difference, then split the segment into two
132 sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
133 probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
134 We repeat this process recursively. See [1] for the evaluation of this particular algorithm.
136 Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
137 segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
138 residual sum of squares in each segment as in linear regressions. That is, for a given segment with
139 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
140 through i = n. However, we also don't want to split every data point into a separate segment so we need
141 to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
142 models discussed in [2] for simplicity. We will tune this cost function further in the future.
144 The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
145 space is exponential with respect to the size of the time series since we could split at each data point.
146 We workaround this problem by first splitting the time series into a manageable smaller grids, and only
147 considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
148 tend to contain a lot more data points than segments, this strategy finds the optimal solution without
149 exploring much of the problem space.
151 Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
152 finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
153 n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
154 the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
155 Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
156 S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
157 min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.
159 [1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
160 a nonstationary time series", Physical Review E 69, 021108 (2004)
162 [2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
163 Lithuanian Mathematical Journal, vol 46, 2006
165 * public/v2/index.html: Show the optional description for the chosen moving average strategy.
166 * public/v2/js/statistics.js:
167 (Statistics.testWelchsT):
168 (Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
169 of each value array between which Welch's t-statistic is computed. This generalization helps the
170 Schwarz criterion segmentation algorithm avoid splitting values array O(n^2) times.
171 (.sampleMeanAndVarianceForValues): Ditto for the generalization.
172 (.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
173 (.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
174 (.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
176 (.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
177 (.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.
179 2015-04-03 Ryosuke Niwa <rniwa@webkit.org>
181 REGRESSION: Perf dashboard sometimes fails to update zooming level
182 https://bugs.webkit.org/show_bug.cgi?id=143359
184 Reviewed by Darin Adler.
186 The bug was caused by various bugs that ended up in an exception.
189 (App.Pane._handleFetchErrors): Removed superfluous console.log.
190 (App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
191 (App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.
192 * public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating
193 to # when Ember.js fails to attach event listeners on time.
194 * public/v2/interactive-chart.js:
195 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
196 the containing element's size is 0.
197 (App.InteractiveChartComponent._updateBrush): Ditto.
199 2015-04-02 Ryosuke Niwa <rniwa@webkit.org>
201 Perf dashboard should have UI to test out anomaly detection strategies
202 https://bugs.webkit.org/show_bug.cgi?id=143290
204 Reviewed by Benjamin Poulain.
206 Added the UI to select anomaly detection strategies. The detected anomalies are highlighted in the graph.
208 Implemented the Western Electric Rules 1 through 4 in http://en.wikipedia.org/wiki/Western_Electric_rules
209 as well as Welch's t-test that compares the last five points to the prior twenty points.
211 The latter is what Mozilla uses (or at least did in the past) to detect performance regressions on their
212 performance tests although they compare medians instead of means.
214 All of these strategies don't quite work for us since our data points are too noisy but this is a good start.
217 (App.Pane.updateStatisticsTools): Clone anomaly detection strategies.
218 (App.Pane._updateMovingAverageAndEnvelope): Highlight anomalies detected by the enabled strategies.
219 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Observe changes to anomaly detection strategies.
220 (App.Pane._computeMovingAverageAndOutliers): Detect anomalies by each strategy and aggregate results.
221 Only report the first data point when multiple consecutive data points are detected as anomalies.
222 * public/v2/chart-pane.css: Updated styles.
223 * public/v2/index.html: Added the pane for selecting anomaly detection strategies.
224 * public/v2/js/statistics.js:
225 (Statistics.testWelchsT): Added. Implements Welch's t-test.
226 (.sampleMeanAndVarianceForValues): Added.
227 (.createWesternElectricRule): Added.
228 (.countValuesOnSameSide): Added.
229 (Statistics.AnomalyDetectionStrategy): Added.
231 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
233 REGRESSION: Searching commits can highlight wrong data points
234 https://bugs.webkit.org/show_bug.cgi?id=143272
236 Reviewed by Antti Koivisto.
238 The bug was caused by /api/commits returning commit times with millisecond precision whereas /api/runs
239 return commit times with only second precision. This resulted in the frontend code to match a commit
240 with the data point that included the next commit when the millisecond component of commit's timestamp
241 wasn't identically 0.
243 This discrepancy was caused by the fact PHP's strtotime only ignores milliseconds and /api/commits
244 was returning timestamp as string instead of parsing via Database::to_js_time as done in /api/runs
245 so miliseconds component was only preserved in /api/commits.
247 Fixed the bug by always using Database::to_js_time to return commit time. Also fixed to_js_time so that
248 it returns time in milisecond precision.
250 * public/api/commits.php:
251 (fetch_commits_between): Use Database::to_js_time for format commit times.
252 (format_commit): Ditto.
253 * public/include/db.php:
254 (Database::to_js_time): Parse and append millisecond component. Ignore sub-milliseconds for simplicity.
256 (CommitLogs.fetchForTimeRange): The commit time is now an integer so don't call "replace" on it.
258 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
260 Perf dashboard should show relative change in values
261 https://bugs.webkit.org/show_bug.cgi?id=143252
263 Reviewed by Antti Koivisto.
265 When a range of values are selected, show the percentage difference between the start and the end
266 in addition to the absolute value difference. When a single point is selected, show the relative
267 difference with respect to the previous point. Use two significant figures and always show plus sign
268 when the difference is positive.
270 * public/v2/app.js: Compute and format the relative difference.
271 * public/v2/chart-pane.css: Don't let commits view shrink itself when they're all collapsed.
272 * public/v2/index.html: Show the relative difference.
274 2015-03-31 Ryosuke Niwa <rniwa@webkit.org>
276 REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
277 https://bugs.webkit.org/show_bug.cgi?id=143254
279 Reviewed by Antti Koivisto.
281 The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
282 or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
283 so that the interactive chart component will observe a change to 'chartData'.
286 (App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.
288 2015-03-19 Ryosuke Niwa <rniwa@webkit.org>
290 Unreviewed build fixes.
292 * public/include/manifest.php:
293 (Manifest::generate): These should be {} instead of [] when they're empty.
295 (Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
296 * public/v2/manifest.js:
297 (App.Metric.fullName): Fixed the typo.
298 * tests/admin-regenerate-manifest.js: Fixed the test.
300 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
302 Commit the erroneously reverted change.
304 * public/api/runs.php:
305 (RunsGenerator::results):
307 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
309 Loading the perf dashboard takes multiple seconds
310 https://bugs.webkit.org/show_bug.cgi?id=141860
312 Reviewed by Andreas Kling.
314 This patch introduces the caches of JSON files returned by /api/ in /data/ directory. It also records
315 the last time test_runs rows associated with the requested platforms and metrics are inserted, updated,
316 or removed in the caches as well as the manifest JSON files ("last modified time"). Because the manifest
317 is regenerated each time a new test result is reported, the front end can compare last modified time in
318 the manifest file with that in a /api/runs JSON cache to detect the stale-ness.
320 More concretely, the front end first optimistically fetches the JSON in /data/. If the cache doesn't exit
321 or the last modified time in the cache doesn't match with that in the manifest file, it would fetch it
322 again via /api/runs. In the case the cache did exist, we render the charts based on the cache meanwhile.
323 This dramatically reduces the perceived latency for the page load since charts are drawn immediately using
324 the cache and we would only re-render the charts as new up-to-date JSON comes in.
326 This patch also changes the format of runs JSONs by pushing the exiting properties into 'configurations'
327 and adding 'lastModified' and 'elapsedTime' at the top level.
329 * init-database.sql: Added config_runs_last_modified to test_configurations table as well as a trigger to
330 auto-update this column upon changes to test_runs table.
332 * public/admin/test-configurations.php:
333 (add_run): Regenerate the manifest file to invalidate the /api/runs JSON cache.
336 * public/api/runs.php:
337 (main): Fetch all columns of test_configurations table including config_runs_last_modified. Also generate
338 the cache in /data/ directory.
339 (RunsGenerator::__construct): Compute the last modified time for this (platform, metric) pair.
340 (RunsGenerator::results): Put the old content in 'configurations' property and include 'lastModified' and
341 'elapsedTime' properties. 'elapsedTime' is added for debugging purposes.
342 (RunsGenerator::add_runs):
343 (RunsGenerator::parse_revisions_array):
345 * public/include/db.php:
347 (generate_data_file): Added based on ManifestGenerator::store.
348 (Database::to_js_time): Extracted from RunsGenerator::add_runs to share code.
350 * public/include/json-header.php:
351 (echo_success): Renamed from success_json. Return the serialized JSON instead of echo'ing it so that we can
352 generate caches in /api/runs/.
355 * public/include/manifest.php:
356 (ManifestGenerator::generate): Added 'elapsedTime' property for the time taken to generate the manifest.
357 It seems like we're generating it in 200-300ms for now so that's good.
358 (ManifestGenerator::store): Uses generate_data_file.
359 (ManifestGenerator::platforms): Added 'lastModified' array to each platform entry. This array contains the
360 last modified time for each (platform, metric) pair.
363 (fetchTest): Updated per the format change in runs JSON.
366 (App.Pane._fetch): Fetch the cached JSON first. Refetch the uncached version if instructed as such.
367 (App.Pane._updateChartData): Extracted from App.Pane._fetch.
368 (App.Pane._handleFetchErrors): Ditto.
371 (RunsData.fetchRuns): Takes the fourth argument indicating whether we should fetch the cached version or not.
372 The cached JSON is located in /data/ with the same filename. When fetching a cached JSON results in 404,
373 fulfill the promise with null as the result instead of rejecting it. The only client of this function which
374 sets useCache to true is App.Manifest.fetchRunsWithPlatformAndMetric, and it handles this special case.
376 * public/v2/manifest.js:
377 (App.DateArrayTransform): Added. Handles the array of last modified dates in platform objects.
378 (App.Platform.lastModifiedTimeForMetric): Added. Returns the last modified date in the manifest JSON.
379 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes "useCache" like RunsData.fetchRuns. Set shouldRefetch
380 to true if response is null (the cache didn't exit) or the cache is out-of-date.
381 (App.Manifest._formatFetchedData): Extracted from App.Manifest.fetchRunsWithPlatformAndMetric.
384 (initializeDatabase): Avoid splitting function definitions in the middle.
386 * tests/api-report.js: Added tests to verify that reporting new test results updates the last modified time
387 in test_configurations.
389 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
391 REGRESSION(r180333): Analysis tasks can't be associated with bugs
392 https://bugs.webkit.org/show_bug.cgi?id=141858
394 Reviewed by Andreas Kling.
396 Added back the erroneously removed table to associate bugs. Also moved "details-table-container" div outside
397 of the chart-details partial template as it needs to wrap associate bugs in analysis task pages.
399 * public/v2/chart-pane.css:
400 * public/v2/index.html:
402 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
404 Selecting revisions for A/B testing is hard
405 https://bugs.webkit.org/show_bug.cgi?id=141824
407 Reviewed by Andreas Kling.
409 Update the revisions used in A/B testing based on the selection in the overview chart. This allows users to
410 intuitively select revisions based on points shown in the chart. Removed the old select elements used to
411 select A/B testing points manually.
413 Also renamed 'testSets' to 'configurations', 'roots' to 'rootConfigurations', and 'revisions' in each root's
414 sets to 'options' for clarity.
416 * public/v2/app.css: Reorganized style rules.
419 (App.AnalysisTaskController):
420 (App.AnalysisTaskController._taskUpdated): Merged updateTestGroupPanes.
421 (App.AnalysisTaskController._chartDataChanged): Renamed from paneDomain. It's now an observer instead of
422 a property, which sets 'overviewDomain' property as well as other properties.
423 (App.AnalysisTaskController.updateRootConfigurations): Renamed from updateRoots.
424 (App.AnalysisTaskController._updateRootsBySelectedPoints): Added. Select roots based on the selected points
425 in the overview chart.
427 * public/v2/chart-pane.css: Added arrows next to the configuration names (e.g. 'A') to indicate whether
428 individual build requests / test results are shown or not.
430 * public/v2/index.html: Removed the select element per configuration column. Also moved the select element
431 for the number of runs as it doesn't belong in the same table as the one that lists repositories and roots.
433 2015-02-20 Ryosuke Niwa <rniwa@webkit.org>
435 Unreviewed test fixes after r179037, r179591, and r179763.
437 * tests/admin-regenerate-manifest.js:
438 * tests/admin-reprocess-report.js:
440 2015-02-19 Ryosuke Niwa <rniwa@webkit.org>
442 Relationship between A/B testing results are unclear
443 https://bugs.webkit.org/show_bug.cgi?id=141810
445 Reviewed by Andreas Kling.
447 Show a "reference chart" indicating which two points have been tested in each test group pane.
449 Now the chart shown at the top of an analysis task page is called the "overview pane", and we use the pane
450 and the domain used in this chart to show charts in each test group.
452 Also renamed an array of revisions used in the A/B test results tables from 'revisions' to 'revisionList'.
454 * public/v2/analysis.js:
455 (App.TestGroup._fetchTestResults): Renamed from _fetchChartData. Set 'testResults' instead of 'chartData'
456 since this is the results of A/B testing results, not the data for charts shown next to them.
458 * public/v2/app.css: Added CSS rules for reference charts.
461 (App.AnalysisTaskController.paneDomain): Set 'overviewPane' and 'overviewDomain' on each test group pane.
462 (App.TestGroupPane._populate): Updated per 'chartData' to 'testResults' rename.
463 (App.TestGroupPane._updateReferenceChart): Get the chart data via the overview pane and find points that
464 identically matches root sets. If one of configuration used a set of revisions for which no measurement
465 was made in the original chart, don't show the reference chart as that would be misleading / confusing.
466 (App.TestGroupPane._computeRepositoryList): Updated per 'chartData' to 'testResults' rename.
467 (App.TestGroupPane._createConfigurationSummary): Ditto. Also renamed 'revisions' to 'revisionList'.
468 In addition, renamed 'buildNumber' to 'buildLabel' and prefixed it with "Build ".
471 (Measurement.prototype.revisionForRepository): Added.
472 (Measurement.prototype.commitTimeForRepository): Cleanup.
473 (TimeSeries.prototype.findPointByRevisions): Added. Finds a point based on a set of revisions.
475 * public/v2/index.html: Added the reference chart. Streamlined the status label for each build request
476 by including the build number in the title attribute instead of in the markup.
478 * public/v2/interactive-chart.js:
479 (App.InteractiveChartComponent._updateDomain): Fixed a typo introduced as a consequence of r179913.
480 (App.InteractiveChartComponent._computeYAxisDomain): Expand the y-axis to show the highlighted points.
481 (App.InteractiveChartComponent._highlightedItemsChanged): Adjust the y-axis as needed.
483 2015-02-18 Ryosuke Niwa <rniwa@webkit.org>
485 Analysis task pages are unusable
486 https://bugs.webkit.org/show_bug.cgi?id=141786
488 Reviewed by Andreas Kling.
490 This patch makes following improvements to analysis task pages:
491 1. Making the main chart interactive. This change required the use of App.Pane as well as moving the code to
492 compute the data for the details pane from PaneController.
493 2. Moving the form to add a new test group to the top of test groups instead of the bottom of them.
494 3. Grouping the build requests in each test group by root sets instead of the order by which they were ran.
495 This change required the creation of App.TestGroupPane as well as its methods.
496 4. Show a box plot for each root set configuration as well as each build request. This change required
497 App.BoxPlotComponent.
498 5. Show revisions of each repository (e.g. WebKit) for each root set and build request.
500 * public/api/build-requests.php:
501 (main): Update per the rename of BuildRequestsFetcher::root_sets to BuildRequestsFetcher::root_sets_by_id.
503 * public/api/test-groups.php:
504 (main): Include root sets and roots in the response.
507 * public/include/build-requests-fetcher.php:
508 (BuildRequestsFetcher::root_sets_by_id): Renamed from root_sets.
509 (BuildRequestsFetcher::root_sets): Added.
510 (BuildRequestsFetcher::roots): Added.
511 (BuildRequestsFetcher::fetch_roots_for_set): Takes a boolean argument $resolve_ids. This flag is only set to
512 true in /api/build-requests/ (as done prior to this patch) to use repository names as identifiers since
513 tools/sync-with-buildbot.py can't convert repository names to their ids.
515 * public/v2/analysis.js:
517 (App.RootSet): Added.
518 (App.RootSet.revisionForRepository): Added.
519 (App.TestGroup.rootSets): Deleted the code to compute root set ids from build requests now that the JSON
520 response at /api/test-groups will include them.
521 (App.BuildRequest): Ditto. Also deleted 'configLetter' property, which has been moved to a proxy created by
522 _createConfigurationSummary.
523 (App.BuildRequest.statusLabel): Use 'Completed' as the human readable label for 'completed' status.
524 (App.BuildRequest.aggregateStatuses): Added. Generates a human readable status for a set of build requests.
526 * public/v2/app.css: Updated style rules for analysis task pages.
529 (App.Pane): This class is now used in analysis task pages to make the main chart interactive.
530 (App.Pane._updateDetails): Moved from App.PaneController.
532 (App.PaneController._updateCanAnalyze): Updated the code per the move of selectedPoints.
534 (App.AnalysisTaskController): Added 'details'.
535 (App.AnalysisTaskController._taskUpdated):
536 (App.AnalysisTaskController.paneDomain):Renamed from _fetchedRuns.
537 (App.AnalysisTaskController.updateTestGroupPanes): Added. Creates App.TestGroupPane for each test group.
538 (App.AnalysisTaskController.actions.toggleShowRequestList): Added.
540 (App.TestGroupPane): Added.
541 (App.TestGroupPane._populate): Added. Group build requests by root sets and create a summary for each group.
542 (App.TestGroupPane._computeRepositoryList): Added. Returns a sorted list of repositories which is the union
543 of all repositories appearing in root sets and builds associated with A/B testing results.
544 (App.TestGroupPane._groupRequestsByConfigurations): Added. Groups build requests by root sets.
545 (App.TestGroupPane._createConfigurationSummary): Added. Creates a summary for a group of build requests that
546 use the same root set. We start by wrapping "raw" build requests in a proxy with formatted values,
547 build numbers, etc... obtained from the fetched chart data. The list of revisions shown in the group summary
548 is a union of revisions in the root set and the first build request in the group. We null-out revision info
549 for a build request if it is identical to the one in the summary. The range of values is expanded as needed
550 by the values in the group as well as 95% percentile confidence interval.
552 (App.BoxPlotComponent): Added. Controls a box plot shown for each test group summary and build request.
553 (App.BoxPlotComponent.didInsertElement): Added. Inserts a SVG element as well as two indicator rects to show
554 the mean and the confidence interval.
555 (App.BoxPlotComponent._updateBars): Added. Updates the dimensions of the indicator rects.
556 (App.BoxPlotComponent.valueChanged): Added. Computes the relative dimensions of the indicator rects and
557 calls _updateBars to update the rects.
559 * public/v2/chart-pane.css: Added some style rules to be used in the details pane in analysis task pages.
562 (Measurement.prototype.formattedRevisions):
563 (Measurement.formatRevisionRange): Renamed from Measurement.prototype._formatRevisionRange so that it can be
564 called in _createConfigurationSummary.
566 * public/v2/index.html: Updated the templates for analysis task pages. Moved the form to create a new test
567 group above all test groups, and replaced the list of data points by "details" pane used in the charts page.
568 Also made the fetching of chartData no longer block showing of test groups.
570 * public/v2/interactive-chart.js:
571 (App.InteractiveChartComponent._updateDomain): Added an early exit to fix a newly revealed race condition.
572 (App.InteractiveChartComponent._domainChanged): Ditto.
573 (App.InteractiveChartComponent._updateSelectionToolbar): Made it respect 'zoomable' boolean property.
575 * public/v2/js/statistics.js:
576 (Statistics.min): Added.
577 (Statistics.max): Added.
579 * public/v2/manifest.js:
580 (App.Manifest.fetchRunsWithPlatformAndMetric): Added formatWithDeltaAndUnit to be used in _createConfigurationSummary.
582 2015-02-14 Ryosuke Niwa <rniwa@webkit.org>
584 Build URL on new perf dashboard doesn't resolve $builderName
585 https://bugs.webkit.org/show_bug.cgi?id=141583
587 Reviewed by Darin Adler.
589 Support $builderName in the build URL template.
591 * public/js/helper-classes.js:
592 (TestBuild.buildUrl): Replaced $builderName with the builder name.
594 * public/v2/manifest.js:
595 (App.Metric.fullName): Fixed the typo. We need &ni, not &in.
596 (App.BuilderurlFromBuildNumber): Replaced $builderName with the builder name.
598 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
600 Unreviewed build fix after r179591.
602 * public/api/commits.php:
604 2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
606 The status of a A/B testing request always eventually becomes "Failed"
607 https://bugs.webkit.org/show_bug.cgi?id=141523
609 Reviewed by Andreas Kling.
611 The bug was caused by /api/build-requests always setting the status of a build request to 'failed' when
612 'failedIfNotCompleted' was sent by the buildbot sync'er.
614 Fixed the bug by only setting the status to 'failed' if it wasn't set to 'completed'.
616 * public/api/build-requests.php:
619 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
621 Unreviewed, remove empty directories.
623 * public/data: Removed.
625 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
627 Perf dashboard should show the results of A/B testing
628 https://bugs.webkit.org/show_bug.cgi?id=141500
630 Reviewed by Chris Dumez.
632 Added the support for fetching test_runs for a specific test group in /api/runs/, and used it in the
633 analysis task page to fetch results for each test group.
635 Merged App.createChartData into App.Manifest.fetchRunsWithPlatformAndMetric so that App.BuildRequest
636 can use the formatter.
638 * public/api/runs.php:
639 (fetch_runs_for_config_and_test_group): Added.
640 (fetch_runs_for_config): Just return the fetched rows since main will format them with RunsGenerator.
641 (main): Use fetch_runs_for_config_and_test_group to fetch rows when a test group id is specified. Also
642 use RunsGenerator to format results.
643 (RunsGenerator): Added.
644 (RunsGenerator::__construct): Added.
645 (RunsGenerator::add_runs): Added.
646 (RunsGenerator::format_run): Moved.
647 (RunsGenerator::parse_revisions_array): Moved.
649 * public/v2/analysis.js:
650 (App.TestGroup): Fixed a typo. The property on a test group that refers to an analysis task is "task".
651 (App.TestGroup._fetchChartData): Added. Fetches all A/B testing results for this group.
652 (App.BuildRequest.configLetter): Renamed from config since this returns a letter that identifies the
653 configuration associated with this build request such as "A" and "B".
654 (App.BuildRequest.statusLabel): Added the missing label for failed build requests.
655 (App.BuildRequest.url): Added. Returns the URL associated with this build request.
656 (App.BuildRequest._meanFetched): Added. Retrieve the mean and the build number for this request via
660 (App.Pane._fetch): Set chartData directly here.
661 (App.Pane._updateMovingAverageAndEnvelope): Renamed from _computeChartData. No longer sets chartData
662 now that it's done in App.Pane._fetch.
663 (App.AnalysisTaskController._fetchedRuns): Updated per createChartData merge.
666 (Measurement.prototype.buildId): Added.
667 (TimeSeries.prototype.findPointByBuild): Added.
669 * public/v2/index.html: Fixed a bug that build status URL was broken. We can't use link-to helper since
670 url is not an Ember routed path.
672 * public/v2/manifest.js:
673 (App.Manifest.fetchRunsWithPlatformAndMetric): Takes testGroupId as the third argument. Merged
674 App.createChartData here so that App.BuildRequest can use the formatter
676 2015-02-12 Ryosuke Niwa <rniwa@webkit.org>
678 v2 UI should adjust the number of ticks on dashboards based on screen size
679 https://bugs.webkit.org/show_bug.cgi?id=141502
681 Reviewed by Chris Dumez.
683 * public/v2/interactive-chart.js:
684 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Compute the number of ticks based on the
687 2015-02-11 Ryosuke Niwa <rniwa@webkit.org>
689 New perf dashboard shows too much space around interesting data points
690 https://bugs.webkit.org/show_bug.cgi?id=141487
692 Reviewed by Chris Dumez.
694 Revise the y-axis range adjustment algorithm in r179913. Instead of showing the entire moving average,
695 show the current time series excluding points in the series outside the moving average envelope.
698 (App.Pane._computeChartData): Don't deal with missing moving average or enveloping strategy here.
699 (App.Pane._computeMovingAverageAndOutliers): Set isOutliner to true on all data points in the current
700 time series if the point lies outside the moving average envelope. Don't expose the moving average or
701 the envelope computed for this purpose if they're not set by the user.
704 (TimeSeries.prototype.minMaxForTimeRange): Takes a boolean argument, ignoreOutlier. When the flag is set
705 to true, min/max computation will ignore any point in the series with non-falsy "isOutliner" property.
707 * public/v2/interactive-chart.js:
708 (App.InteractiveChartComponent._constructGraphIfPossible): Unsupport hideMovingAverage and hideEnvelope.
709 (App.InteractiveChartComponent._computeYAxisDomain): Removed the commented out code. Also moved the code
710 to deal with showFullYAxis here.
711 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Rewrote the code. Takes ignoreOutliners as an
712 argument instead of directly inspecting showFullYAxis.
714 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
716 New perf dashboard shouldn't always show outliners
717 https://bugs.webkit.org/show_bug.cgi?id=141445
719 Reviewed by Chris Dumez.
721 Use the simple moving average with an average difference envelope to compute the y-axis range to show
722 to avoid expanding it spuriously to show one off outlier.
725 (App.Pane): Don't show the full y-axis range by default.
726 (App.Pane._computeChartData): Use the first strategies for the moving average and the enveloping if
727 one is not specified by the user but without showing them in the charts.
728 (App.Pane._computeMovingAverage): Takes moving average and enveloping strategies as arguments instead
729 of retrieving via chosenMovingAverageStrategy and chosenEnvelopingStrategy.
731 (App.ChartsController._parsePaneList): Added showFullYAxis as a query string argument to each pane.
732 (App.ChartsController._serializePaneList): Ditto.
734 * public/v2/chart-pane.css: Added a CSS rule for when y-axis is clickable.
736 * public/v2/index.html: Pass in showFullYAxis as an argument to the main interactive chart.
738 * public/v2/interactive-chart.js:
739 (App.InteractiveChartComponent._constructGraphIfPossible): Add an event listener on y-axis labels when
740 the chart is interactive so that toggle showFullYAxis. Also hide the moving average and/or the envelope
741 if they are not specified by the user (i.e. only used to adjust y-axis range).
742 (App.InteractiveChartComponent._updateDomain): Don't exit early if y-axis domains are different even if
743 x-axis domain remained the same. Without this change, the charts would never redraw.
744 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Use the moving average instead of the current
745 time series to compute the y-axis range if showFullYAxis is false. When showFullYAxis is true, expand
746 y-axis all the way down to 0 or the minimum value in the current time series whichever is smaller.
748 * public/v2/js/statistics.js:
749 (Statistics.MovingAverageStrategies): Use a wider window in Simple Moving Average by default.
751 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
753 Unreviewed build fix.
756 (set get App.Pane.Ember.Object.extend):
758 2015-02-10 Ryosuke Niwa <rniwa@webkit.org>
760 New perf dashboard should have the ability to overlay moving average with an envelope
761 https://bugs.webkit.org/show_bug.cgi?id=141438
763 Reviewed by Andreas Kling.
765 This patch adds three kinds of moving average strategies and two kinds of enveloping strategies:
767 Simple Moving Average - The moving average x̄_i of x_i is computed as the arithmetic mean of values
768 from x_(i - n) though x_(i + m) where n is a non-negative integer and m is a positive integer. It takes
769 n, backward window size, and m, forward window size, as an argument.
771 Cumulative Moving Average - x̄_i is computed as the arithmetic mean of all values x_0 though x_i.
772 That is, x̄_1 = x_1 and x̄_i = ((i - 1) * M_(i - 1) + x_i) / i for all i > 1.
774 Exponential Moving Average - x̄_i is computed as the weighted average of x_i and x̄_(i - 1) with α as
775 an argument specifying x_i's weight. To be precise, x̄_1 = x_1 and x̄_i = α * x_i + (α - 1) x̄_(i-1).
778 Average Difference - The enveloping delta d is computed as the arithmetic mean of the difference
779 between each x_i and x̄_i.
781 Moving Average Standard Deviation - d is computed like the standard deviation except the deviation
782 for each term is measured from the moving average instead of the sample arithmetic mean. i.e. it uses
783 the average of (x_i - x̄_i)^2 as the "sample variance" instead of the conventional (x_i - x̄)^2 where
784 x̄ is the sample mean of all x_i's. This change was necessary since our time series is non-stationary.
787 Each strategy is cloned for an App.Pane instance so that its parameterList can be configured per pane.
788 The configuration of the currently chosen strategies is saved in the query string for convenience.
790 Also added the "stat pane" to choose a moving average strategy and a enveloping strategy in each pane.
792 * public/v2/app.css: Specify the fill color for all SVG groups in the pane toolbar icons.
795 (App.Pane._fetch): Delegate the creation of 'chartData' to _computeChartData.
796 (App.Pane.updateStatisticsTools): Added. Clones moving average and enveloping strategies for this pane.
797 (App.Pane._cloneStrategy): Added. Clones a strategy for a new pane.
798 (App.Pane._configureStrategy): Added. Finds and configures a strategy from the configuration retrieved
799 from the query string via ChartsController.
800 (App.Pane._computeChartData): Added. Creates chartData from fetchedData.
801 (App.Pane._computeMovingAverage): Added. Computes the moving average and the envelope.
802 (App.Pane._executeStrategy): Added.
803 (App.Pane._updateStrategyConfigIfNeeded): Pushes the strategy configurations to the query string via
805 (App.ChartsController._parsePaneList): Merged the query string arguments for the range and point
806 selections, and added two new arguments for the moving average and the enveloping configurations.
807 (App.ChartsController._serializePaneList): Ditto.
808 (App.ChartsController._scheduleQueryStringUpdate): Observes strategy configurations.
809 (App.PaneController.actions.toggleBugsPane): Hides the stat pane.
810 (App.PaneController.actions.toggleSearchPane): Hides the stat pane.
811 (App.PaneController.actions.toggleStatPane): Added.
813 * public/v2/chart-pane.css: Added CSS rules for the new stat pane. Also added .foreground class for the
814 current (as opposed to baseline and target) time series for when it's the most foreground graph without
815 moving average and its envelope overlapping on top of it.
817 * public/v2/index.html: Added the templates for the stat pane and the corresponding icon (Σ).
819 * public/v2/interactive-chart.js:
820 (App.InteractiveChartComponent.chartDataDidChange): Unset _totalWidth and _totalHeight to avoid exiting
821 early inside _updateDimensionsIfNeeded when chartData changes after the initial layout.
822 (App.InteractiveChartComponent.didInsertElement): Attach event listeners here instead of inside
823 _constructGraphIfPossible since that could be called multiple times on the same SVG element.
824 (App.InteractiveChartComponent._constructGraphIfPossible): Clear down the old SVG element we created
825 but don't bother removing individual paths and circles. Added the code to show the moving average time
826 series when there is one. Also add "foreground" class on SVG elements for the current time series when
827 we're not showing the moving average. chart-pane.css has been updated to "dim down" the current time
828 series when "foreground" is not set.
829 (App.InteractiveChartComponent._minMaxForAllTimeSeries): Take the moving average time series into
830 account when computing the y-axis range.
831 (App.InteractiveChartComponent._brushChanged): Removed 'selectionIsLocked' argument as it's useless.
833 * public/v2/js/statistics.js:
834 (Statistics.MovingAverageStrategies): Added.
835 (Statistics.EnvelopingStrategies): Added.
837 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
839 The delta value in the chart pane sometimes doens't show '+' for a positive delta
840 https://bugs.webkit.org/show_bug.cgi?id=141340
842 Reviewed by Andreas Kling.
844 The bug was caused by computeStatus prefixing the value delta with '+' if it's greater than 0 after
845 it had already been formatted. Fixed the bug by using a formatter that always emits a sign symbol.
848 (App.Pane.computeStatus):
849 (App.createChartData):
851 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
853 Unreviewed build fix. currentPoint wasn't defined when selectedPoints was used to find points.
856 (App.PaneController._updateDetails):
858 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
860 Unreviewed. Commit the forgotten change.
862 * public/include/manifest.php:
864 2015-02-06 Ryosuke Niwa <rniwa@webkit.org>
866 New perf dashboard should have multiple dashboard pages
867 https://bugs.webkit.org/show_bug.cgi?id=141339
869 Reviewed by Chris Dumez.
871 Added the support for multiple dashboard pages. Also added the status of the latest data point.
872 e.g. "5% better than target"
874 * public/v2/app.css: Tweaked the styles to work around the fact Ember.js creates empty script elements.
875 Also hid the border lines around charts on the dashboard page for a cleaner look.
878 (App.IndexRoute): Added. Navigate to /dashboard/<defaultDashboardName> once the manifest.json is loaded.
879 (App.IndexRoute.beforeModel): Added.
880 (App.DashboardRoute): Added.
881 (App.DashboardRoute.model): Added. Return the dashboard specified by the name.
882 (App.CustomDashboardRoute): Added. This route is used for a customized dashboard specified by "grid".
883 (App.CustomDashboardRoute.model): Create a dashboard model from "grid" query parameter.
884 (App.CustomDashboardRoute.renderTemplate): Use the dashboard template.
885 (App.DashboardController): Renamed from App.IndexController.
886 (App.DashboardController.modelChanged): Renamed from gridChanged. Removed the code to deal with "grid"
887 and "defaultDashboard" as these are taken care of by newly added routers.
888 (App.DashboardController.computeGrid): Renamed from updateGrid. No longer updates "grid" since this is
889 now done in actions.toggleEditMode.
890 (App.DashboardController.actions.toggleEditMode): Navigate to CustomDashboardRoute when start editing
891 an existing dashboard.
893 (App.Pane.computeStatus): Moved from App.PaneController so that to be called in App.Pane.latestStatus.
894 Also moved the code to compute the delta with respect to the previous data point from _updateDetails.
895 (App.Pane._relativeDifferentToLaterPointInTimeSeries): Ditto.
896 (App.Pane.latestStatus): Added. Used by the dashboard template to show the status of the latest result.
898 (App.createChartData): Added deltaFormatter to show less significant digits for differences.
900 (App.PaneController._updateDetails): Updated per changes to computeStatus.
902 * public/v2/chart-pane.css: Added style rules for the status labels on the dashboard.
905 (TimeSeries.prototype.lastPoint): Added.
907 * public/v2/index.html: Prefetch manifest.json as soon as possible, show the latest data points' status
908 on the dashboard, and enumerate all predefined dashboards.
910 * public/v2/interactive-chart.js:
911 (App.InteractiveChartComponent._relayoutDataAndAxes): Slightly adjust the offset at which we show unit
912 for the dashboard page.
914 * public/v2/manifest.js:
915 (App.Dashboard): Inherit from App.NameLabelModel now that each predefined dashboard has a name.
916 (App.MetricSerializer.normalizePayload): Parse all predefined dashboards instead of a single dashboard.
917 IDs are generated for each dashboard for forward compatibility.
919 (App.Manifest.dashboardByName): Added.
920 (App.Manifest.defaultDashboardName): Added.
921 (App.Manifest._fetchedManifest): Create dashboard model objects for all predefined ones.
923 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
925 Move commits viewer to the end of details view
926 https://bugs.webkit.org/show_bug.cgi?id=141315
928 Rubber-stamped by Andreas Kling.
930 Show the difference instead of the old value per kling's request.
933 (App.PaneController._updateDetails):
934 * public/v2/index.html:
936 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
938 Move commits viewer to the end of details view
939 https://bugs.webkit.org/show_bug.cgi?id=141315
941 Reviewed by Andreas Kling.
943 Improved the way list of commits are shown per kling's request.
946 (App.PaneController._updateDetails): Always show the old value even when a single point is selected.
948 * public/v2/chart-pane.css: Updated the style for the commits viewer.
950 * public/v2/commits-viewer.js:
951 (App.CommitsViewerComponent): Added "visible" property to hide the list of commits.
952 (App.CommitsViewerComponent.actions.toggleVisibility): Added. Toggles "visible" property.
954 * public/v2/index.html: Updated the template for commits viewer to support "visible" property. Also
955 moved the commits viewers out of the details tables so that they don't interleave revision data.
957 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
959 New perf dashboard should compare results to baseline and target
960 https://bugs.webkit.org/show_bug.cgi?id=141286
962 Reviewed by Chris Dumez.
964 Compare the selected value against baseline and target values as done in v1. e.g. "5% below target"
965 Also use d3.format to format the selected value to show four significant figures.
968 (App.Pane.searchCommit):
969 (App.Pane._fetch): Create time series here via createChartData so that _computeStatus can use them
970 to compute the status text without having to recreate them.
971 (App.createChartData): Added.
972 (App.PaneController._updateDetails): Use 3d.format on current and old values.
973 (App.PaneController._computeStatus): Added. Computes the status text.
974 (App.PaneController._relativeDifferentToLaterPointInTimeSeries): Added.
975 (App.AnalysisTaskController._fetchedManifest): Use createChartData as done in App.Pane._fetch. Also
976 format the values using chartData.formatter.
978 * public/v2/chart-pane.css: Enlarge the status text. Show the status text in red if it's worse than
979 the baseline and in blue if it's better than the target.
982 (TimeSeries.prototype.findPointAfterTime): Added.
984 * public/v2/index.html: Added a new tbody for the status text and the selected value. Also fixed
985 the bug that we were not showing the old value's unit.
987 * public/v2/interactive-chart.js:
988 (App.InteractiveChartComponent._constructGraphIfPossible): Use chartData.formatter. Also cleaned up
989 the code to show the baseline and the target lines.
991 * public/v2/manifest.js:
992 (App.Manifest.fetchRunsWithPlatformAndMetric): Added smallerIsBetter.
994 2015-02-05 Ryosuke Niwa <rniwa@webkit.org>
996 Unreviewed build fix.
999 (App.IndexController.gridChanged): Use store.createRecord to create a custom dashboard as required by Ember.js
1001 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1003 New perf dashboard doesn't preserve the number of days when clicking on a dashboard chart
1004 https://bugs.webkit.org/show_bug.cgi?id=141280
1006 Reviewed by Chris Dumez.
1008 Fixed the bug by passing in "since" as a query parameter to the charts page.
1010 Also fixed the styling issue that manifests when a JSON fetching fails on "Dashboard" page.
1012 * public/v2/app.css: Fixed CSS rules for error messages shown in the place of charts.
1014 (App.IndexController): Changed the default number of days from one month to one week.
1015 (App.IndexController._sharedDomainChanged): Set "since" property on the controller.
1016 * public/v2/index.html: Pass in "since" property on the controller as a query parameter.
1018 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1020 New perf dashboard erroneously clears zoom when poping history items
1021 https://bugs.webkit.org/show_bug.cgi?id=141278
1023 Reviewed by Chris Dumez.
1025 The bug was caused by _sharedZoomChanged updating overviewSelection without updating mainPlotDomain.
1027 Updating overviewSelection resulted in _overviewSelectionChanged, which observes changes to overviewSelection,
1028 to schedule a call to propagateZoom, which in turn overrode "sharedZoom" we just parsed from the query string.
1031 (App.PaneController._overviewSelectionChanged): Don't schedule propagateZoom if the selected domain is already
1032 shown in the main plot.
1033 (App.PaneController._sharedZoomChanged): Set both overviewSelection and mainPlotDomain to avoid overriding
1034 "sharedZoom" via propagateZoom inside _overviewSelectionChanged.
1036 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1038 New perf dashboard shows null as the aggregator name if no aggregation is done
1039 https://bugs.webkit.org/show_bug.cgi?id=141256
1041 Reviewed by Chris Dumez.
1043 Don't show the aggregator name if there isn't one.
1045 * public/v2/manifest.js:
1048 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1050 Unreviewed build fix after r179611.
1052 * public/v2/interactive-chart.js:
1054 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1056 Perf dashboard doesn’t show the right unit for Safari UI tests
1057 https://bugs.webkit.org/show_bug.cgi?id=141238
1059 Reviewed by Darin Adler.
1061 Safari UI tests use custom metrics that end with "Time". This patch teaches the perf dashboard how to
1062 get the unit for a given metric based on the suffix of the metric name instead of hard-coding the mapping
1063 between metrics and their units.
1065 * public/js/helper-classes.js:
1066 (PerfTestRuns): Use the suffix of the metric name to compute the unit.
1067 * public/v2/manifest.js:
1068 (App.Manifest.fetchRunsWithPlatformAndMetric): Ditto. Also set "useSI" property iff for "bytes".
1069 * public/v2/interactive-chart.js:
1070 (App.InteractiveChartComponent._constructGraphIfPossible): Respect useSI. Use toPrecision(3) otherwise.
1071 (App.InteractiveChartComponent._relayoutDataAndAxes): Place the unit vertically on the left of ticks.
1073 2015-02-04 Ryosuke Niwa <rniwa@webkit.org>
1075 Interactive chart component provides two duplicate API for highlighting points
1076 https://bugs.webkit.org/show_bug.cgi?id=141234
1078 Reviewed by Chris Dumez.
1080 Prior to this patch, the interactive chart component supported highlightedItems for finding commits
1081 on the main charts page and markedPoints to show the two end points in the analysis task page.
1083 This patch merges markedPoints into highlightedItems.
1086 (App.AnalysisTaskController._fetchedRuns): Use highlightedItems.
1087 * public/v2/chart-pane.css:
1088 * public/v2/index.html: Ditto.
1089 * public/v2/interactive-chart.js:
1090 (App.InteractiveChartComponent._constructGraphIfPossible): Make this._highlights an array instead of
1091 array of arrays. Also call _highlightedItemsChanged at the end to fix the bug that we never highlight
1092 items if highlightedItems was set before the initial layout.
1093 (App.InteractiveChartComponent._relayoutDataAndAxes):
1094 (App.InteractiveChartComponent._updateHighlightPositions): Now that highlights are circles instead of
1095 vertical lines, just set cx and cy as done for other "dots".
1096 (App.InteractiveChartComponent._highlightedItemsChanged): Exit early only if _clippedContainer wasn't
1097 already set; i.e. _constructGraphIfPossible hasn't been called. Also updated the logic to accommodate
1098 the fact this._highlights is an array of elements instead of an array of arrays of elements. Finally,
1099 set the radius of highlight circles here.
1101 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1103 Don’t use repository names as id’s.
1104 https://bugs.webkit.org/show_bug.cgi?id=141226
1106 Reviewed by Chris Dumez.
1108 Not using repository names as their id's reduces the need to fetch the entire repositories table.
1109 Since names of repositories are available in manifest.json, we can resolve their names in the front end.
1111 * Websites/perf.webkit.org/public/api/runs.php:
1112 (parse_revisions_array): No longer uses $repository_id_to_name.
1113 (main): No longer populates $repository_id_to_name.
1115 * Websites/perf.webkit.org/public/api/triggerables.php:
1116 (main): Don't resolve repository names.
1118 * Websites/perf.webkit.org/public/include/manifest.php:
1119 (ManifestGenerator::repositories): Use repositories ids as keys in the result and include their names.
1120 (ManifestGenerator::bug_trackers): Don't resolve repository names.
1122 * Websites/perf.webkit.org/public/js/helper-classes.js:
1123 (TestBuild): Renamed repositoryName to repositoryId.
1124 (TestBuild.revision): Ditto.
1125 (TestBuild.formattedRevisions): Ditto. Continue to use the repository name in the formatted result
1126 since this is the text shown to human.
1128 * Websites/perf.webkit.org/public/v2/app.js:
1129 (App.pane.searchCommit): Renamed repositoryName to repositoryId.
1130 (App.PaneController._updateDetails): Ditto.
1131 (App.AnalysisTaskController.updateRoots): Ditto.
1133 * Websites/perf.webkit.org/public/v2/data.js:
1134 (Measurement): Ditto.
1135 (Measurement.prototype.commitTimeForRepository): Ditto.
1136 (Measurement.prototype.formattedRevisions): Ditto.
1138 * Websites/perf.webkit.org/public/v2/index.html: Use the repository name and the repository id as
1139 select element's label and value respectively.
1141 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1143 Unreviewed build fix. Declare $repository_id_to_name in the global scope.
1145 * public/api/runs.php:
1147 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
1149 /api/runs.php should have main function
1150 https://bugs.webkit.org/show_bug.cgi?id=141220
1152 Reviewed by Benjamin Poulain.
1154 Wrapped the code inside main function for clarity.
1156 * public/api/runs.php:
1158 2015-01-27 Ryosuke Niwa <rniwa@webkit.org>
1160 Unreviewed build fix. "eta" isn't set on a in-progress build on a newly added builder.
1162 * tools/sync-with-buildbot.py:
1163 (find_request_updates):
1165 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
1167 Perf dashboard always assigns the result of A/B testing with build request 1
1168 https://bugs.webkit.org/show_bug.cgi?id=140382
1170 Reviewed by Darin Adler.
1172 The bug was caused by the expression array_get($report, 'jobId') or array_get($report, 'buildRequest')
1173 which always evaluated to 1 when the report contained jobId. Fixed the bug by cascading array_get instead.
1175 Also fixed a typo as well as a bug that reports were never associated with builds.
1177 * public/include/report-processor.php:
1178 (ReportProcessor::process): Don't use "or" to find the non-null value since that always evaluates to 1
1179 instead of the first non-null value.
1180 (ReportProcessor::resolve_build_id): Fixed the typo by adding the missing "$this->".
1181 (ReportProcessor::commit): Associate the report with the corresponding build as intended.
1183 2015-01-23 Ryosuke Niwa <rniwa@webkit.org>
1185 Unreviewed typo fix. The prefix in triggerable_configurations is "trigconfig", not "trigrepo".
1187 * public/admin/tests.php:
1189 2015-01-10 Ryosuke Niwa <rniwa@webkit.org>
1191 Unreviewed build fix. Removed the stale code.
1193 * public/admin/triggerables.php:
1195 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
1197 Perf dashboard should have the ability to post A/B testing builds
1198 https://bugs.webkit.org/show_bug.cgi?id=140317
1200 Rubber-stamped by Simon Fraser.
1202 This patch adds the support for triggering A/B testing from the perf dashboard.
1204 We add a few new tables to the database. "build_triggerables", which represents a set of builders
1205 that accept A/B testing. "triggerable_repositories" associates each "triggerable" with a fixed set
1206 of repositories for which an arbitrary revision can be specified for A/B testing.
1207 "triggerable_configurations" specifies a triggerable available on a given test on a given platform.
1208 "roots" table which specifies the revision used in a given root set in each repository.
1210 * init-database.sql: Added "build_triggerables", "triggerable_repositories",
1211 "triggerable_configurations", and "roots" tables. Added references to "build_triggerables",
1212 "platforms", and "tests" tables as well as columns to store status, status url, and creation time
1213 to build_requests table. Also made each test group's name unique in a given analysis task as it
1214 would be confusing to have multiple test groups of the same name.
1216 * public/admin/tests.php: Added the UI and the code to associate a test with a triggerable.
1218 * public/admin/triggerables.php: Added. Manages the list of triggerables as well as repositories
1219 for which a specific revision can be set in an A/B testing on a given triggerable.
1221 * public/api/build-requests.php: Added. Returns the list of open build requests on a specified
1222 triggerable. Also updates the status' and the status urls of specified build requests when
1223 buildRequestUpdates is provided in the raw POST data.
1226 * public/api/runs.php:
1227 (fetch_runs_for_config): Don't include results associated with a build request, meaning they are
1228 results of an A/B testing.
1230 * public/api/test-groups.php:
1231 (main): Use the newly added BuildRequestsFetcher. Also merged fetch_test_groups_for_task back.
1233 * public/api/triggerables.php: Added.
1234 (main): Returns a list of triggerables or a triggerable associated with a given analysis task.
1236 * public/include/admin-header.php:
1238 * public/include/build-requests-fetcher.php: Added. Extracted from public/api/test-groups.php.
1239 (BuildRequestsFetcher): This class abstracts the process of fetching a list of builds requests
1240 and root sets used in those requests.D
1241 (BuildRequestsFetcher::__construct):
1242 (BuildRequestsFetcher::fetch_for_task):
1243 (BuildRequestsFetcher::fetch_for_group):
1244 (BuildRequestsFetcher::fetch_incomplete_requests_for_triggerable):
1245 (BuildRequestsFetcher::has_results):
1246 (BuildRequestsFetcher::results):
1247 (BuildRequestsFetcher::results_with_resolved_ids):
1248 (BuildRequestsFetcher::results_internal):
1249 (BuildRequestsFetcher::root_sets):
1250 (BuildRequestsFetcher::fetch_roots_for_set):
1252 * public/include/db.php:
1253 (Database::prefixed_column_names): Don't return "$prefix_" when there are no columns.
1254 (Database::insert_row): Support taking an empty array for values. This is useful in "root_sets"
1255 table since it only has the primary key, id, column.
1256 (Database::select_or_insert_row):
1257 (Database::update_or_insert_row):
1258 (Database::update_row): Added.
1259 (Database::_select_update_or_insert_row): Takes an extra argument specifying whether a new row
1260 should be inserted when no row matches the specified criteria. This is used while updating
1261 build_requests' status and url in public/api/build-requests.php since we shouldn't be inserting
1262 new build requests in that API.
1263 (Database::select_rows): Also use "1 == 1" in the select query when the query criteria is empty.
1264 This is used in public/api/triggerables.php when no analysis task is specified.
1266 * public/include/json-header.php:
1267 (find_triggerable_for_task): Added. Finds a triggerable available on a given test. We return the
1268 triggerable associated with the closest ancestor of the test. Since issuing a new query for each
1269 ancestor test is expensive, we retrieve triggerable for all ancestor tests at once and manually
1270 find the closest ancestor with a triggerable.
1272 * public/include/report-processor.php:
1273 (ReportProcessor::process):
1274 (ReportProcessor::resolve_build_id): Associate a build request with the newly created build
1275 if jobId or buildRequest is specified.
1277 * public/include/test-name-resolver.php:
1278 (TestNameResolver::map_metrics_to_tests): Store the entire metric row instead of its name so that
1279 test_exists_on_platform can use it. The last diff in public/admin/tests.php adopts this change.
1280 (TestNameResolver::test_exists_on_platform): Added. Returns true iff the test has ever run on
1283 * public/include/test-path-resolver.php: Added.
1284 (TestPathResolver): This class abstracts the ancestor chains of a test. It retrieves the entire
1285 "tests" table to do this since there could be arbitrary number of ancestors for a given test.
1286 This class is a lot more lightweight than TestNameResolver, which retrieves a whole bunch of tables
1287 in order to compute full test metric names.
1288 (TestPathResolver::__construct):
1289 (TestPathResolver::ancestors_for_test): Returns the ordered list of ancestors from the closest to
1290 the highest (a test without a parent).
1291 (TestPathResolver::path_for_test): Returns a test "path", the ordered list of test names from
1292 the highest ancestor to the test itself.
1293 (TestPathResolver::ensure_id_to_test_map): Fetches "tests" table to construct id_to_test_map.
1295 * public/privileged-api/create-test-group.php: Added. An API to create A/B testing groups.
1297 (commit_sets_from_root_sets): Given a dictionary of repository names to a pair of revisions
1298 for sets A and B respectively, returns a pair of arrays, each of which contains the corresponding
1299 set of "commits" for sets A and B respectively. e.g. {"WebKit": [1, 2], "Safari": [3, 4]} will
1300 result in [[WebKit commit at r1, Safari commit at r3], [WebKit commit at r2, Safari commit at r4]].
1302 * public/v2/analysis.js:
1303 (App.AnalysisTask.testGroups): Takes arguments so that set('testGroups') will invalidate the cache.
1304 (App.AnalysisTask.triggerable): Added. Retrieves the triggerable associated with the task lazily.
1305 (App.TestGroup.rootSets): Added. Returns the list of root set ids used in this A/B testing group.
1306 (App.TestGroup.create): Added. Creates a new A/B testing group.
1307 (App.Triggerable): Added.
1308 (App.TriggerableAdapter): Added.
1309 (App.TriggerableAdapter.buildURL): Added.
1310 (App.BuildRequest.testGroup): Renamed from group.
1311 (App.BuildRequest.orderLabel): Added. One-based index to be used in labels.
1312 (App.BuildRequest.config): Added. Returns either 'A' or 'B' depending on the configuration used
1313 in this build request.
1314 (App.BuildRequest.status): Added.
1315 (App.BuildRequest.statusLabel): Added. Returns a human friendly label for the current status.
1316 (App.BuildRequest): Removed buildNumber, buildBuilder, as well as buildTime as they're unused.
1319 (App.AnalysisTaskController.testGroups): Added.
1320 (App.AnalysisTaskController.possibleRepetitionCounts): Added.
1321 (App.AnalysisTaskController.updateRoots): Renamed from roots. This is also no longer a property
1322 but an observer that updates "roots" property. Filter out the repositories that are not accepted
1323 by the associated triggerable as they will be ignored.
1324 (App.AnalysisTaskController.actions.createTestGroup): Added.
1326 * public/v2/index.html: Updated the UI, and added a form element to trigger createTestGroup action.
1328 * tools/sync-with-buildbot.py: Added. This scripts posts new builds on buildbot and reports back
1329 the status of those builds to the perf dashboard. A similar script can be written to support
1330 other continuous builds systems.
1331 (main): Fetches the list of pending builds as well as currently running or completed builds from
1332 a buildbot, and report new statuses of builds requests to the perf dashboard. It will then schedule
1333 a single new build on each builder with no pending builds, and marks the set of open build requests
1334 that have been scheduled to run on the buildbot but not found in the first step as stale.
1335 (load_config): Loads a JSON that contains the configurations for each builder. e.g.
1338 "platform": "mac-mavericks",
1339 "test": ["Parser", "html5-full-render.html"],
1340 "builder": "Trunk Syrah Production Perf AB Tests",
1342 "forcescheduler": "force-mac-mavericks-release-perf",
1343 "webkit_revision": "$WebKit",
1344 "jobid": "$buildRequest"
1349 (find_request_updates): Return a list of build request status updates to make based on the pending
1350 builds as well as in-progress and completed builds on each builder on the buildbot. When a build is
1351 completed, we use the special status "failedIfNotCompleted" which results in "failed" status only
1352 if the build request had not been completed. This is necessary because a failed build will not
1353 report its failed-ness back to the perf dashboard in some cases; e.g. lost slave or svn up failure.
1354 (update_and_fetch_build_requests): Submit the build request status updates and retrieve the list
1355 of open requests the perf dashboard has.
1356 (find_stale_request_updates): Compute the list of build requests that have been scheduled on the
1357 buildbot but not found in find_request_updates. These build requests are lost. e.g. a master reboot
1358 or human canceling a build may trigger such a state.
1359 (schedule_request): Schedules a build with the arguments specified in the configuration JSON after
1360 replacing repository names with their revisions and buildRequest with the build request id.
1361 (config_for_request): Finds a builder for the test and the platform of a build request.
1362 (fetch_json): Fetches a JSON from the specified URL, optionally with BasicAuth.
1363 (property_value_from_build): Returns the value of a specific property in a buildbot build.
1364 (request_id_from_build): Returns the build request id of a given buildbot build if there is one.
1366 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
1368 Cache-control should be set only on api/runs
1369 https://bugs.webkit.org/show_bug.cgi?id=140312
1371 Reviewed by Andreas Kling.
1373 Some JSON APIs such as api/analysis-tasks can't be cached even for a short period of time (e.g. a few minutes)
1374 since they can be modified by the user on demand. Since only api/runs.php takes a long time to generate JSONs,
1375 just set cache-control there instead of json-header.php which is used by other JSON APIs.
1377 Also set date_default_timezone_set in db.php since we never use non-UTC timezone in our scripts.
1379 * public/api/analysis-tasks.php:
1380 * public/api/runs.php: Set the cache control headers.
1381 * public/api/test-groups.php:
1382 * public/include/db.php: Set the default timezone to UTC.
1383 * public/include/json-header.php: Don't set the cache control headers.
1385 2015-01-09 Ryosuke Niwa <rniwa@webkit.org>
1387 api/report-commit should authenticate with a slave name and password
1388 https://bugs.webkit.org/show_bug.cgi?id=140308
1390 Reviewed by Benjamin Poulain.
1392 Use a slave name and a password to authenticate new commit reports.
1394 * public/api/report-commits.php:
1396 * public/include/json-header.php:
1397 (verify_slave): Renamed and repurposed from verify_builder in report-commits.php. Now authenticates with
1398 a slave name and a password instead of a builder name and a password.
1399 * tests/api-report-commits.js: Updated tests.
1400 * tools/pull-svn.py:
1401 (main): Renamed variables.
1402 (submit_commits): Submits slaveName and slavePassword instead of builderName and builderPassword.
1404 2014-12-19 Ryosuke Niwa <rniwa@webkit.org>
1406 Perf dashboard should support authentication via a slave password
1407 https://bugs.webkit.org/show_bug.cgi?id=139837
1409 Reviewed by Andreas Kling.
1411 For historical reasons, perf dashboard conflated builders and build slaves. As a result we ended up
1412 having to add multiple builders with the same password when a single build slave is shared among them.
1414 This patch introduces the concept of build_slave into the perf dashboard to end this madness.
1416 * init-database.sql: Added build_slave table as well as references to it in builds and reports.
1418 * public/admin/build-slaves.php: Added.
1420 * public/admin/builders.php: Added the support for updating passwords.
1422 * public/include/admin-header.php:
1423 (update_field): Takes an extra argument when a new value needs to be supplied by the caller instead of
1424 being retrieved from $_POST.
1425 (AdministrativePage::render_table): Use array_get to retrieve a value out of the database row since
1426 the raw may not exist (e.g. new_password).
1427 (AdministrativePage::render_form_to_add): Added the support for post_insertion. Don't render the form
1428 control here when this flag evaluates to TRUE.
1430 * public/include/report-processor.php:
1431 (ReportProcessor::process): Added the logic to authenticate with slaveName and slavePassword if those
1432 values are present in the report. In addition, try authenticating builderName with slavePassword if
1433 builderPassword is not specified. When neither password is specified, exit with BuilderNotFound.
1434 Also insert the slave or the builder whichever is missing after we've successfully authenticated.
1435 (ReportProcessor::construct_build_data): Takes a builder ID and an optional slave ID instead of
1437 (ReportProcessor::store_report): Store the slave ID with the report.
1438 (ReportProcessor::resolve_build_id): Exit with MismatchingBuildSlave when the slave associated with
1439 the matching build is different from what's being reported.
1441 * tests/api-report.js: Added a bunch of tests to test the new features of /api/report.
1444 2014-12-18 Ryosuke Niwa <rniwa@webkit.org>
1446 New perf dashboard should not duplicate author information in each commit
1447 https://bugs.webkit.org/show_bug.cgi?id=139756
1449 Reviewed by Darin Adler.
1451 Instead of each commit having author name and email, make it reference a newly added committers table.
1452 Also replace "email" by "account" since some repositories don't use emails as account names.
1454 This improves the keyword search performance in commits.php since LIKE now runs on committers table,
1455 which only contains as many rows as there are accounts in each repository, instead of commits table
1456 which contains every commit ever happened in each repository.
1458 To migrate an existing database into match the new schema, run:
1462 INSERT INTO committers (committer_repository, committer_name, committer_email)
1463 (SELECT DISTINCT commit_repository, commit_author_name, commit_author_email
1464 FROM commits WHERE commit_author_email IS NOT NULL);
1466 ALTER TABLE commits ADD COLUMN commit_committer integer REFERENCES committers ON DELETE CASCADE;
1468 UPDATE commits SET commit_committer = committer_id FROM committers
1469 WHERE commit_repository = committer_repository AND commit_author_email = committer_email;
1471 ALTER TABLE commits DROP COLUMN commit_author_name CASCADE;
1472 ALTER TABLE commits DROP COLUMN commit_author_email CASCADE;
1476 * init-database.sql: Added committers table, and replaced author columns in commits table by a foreign
1477 reference to committers. Also added the missing drop table statements.
1479 * public/api/commits.php:
1480 (main): Fetch the corresponding committers row for a single commit. Also wrap a single commit by
1481 an array here instead of doing it in format_commit.
1482 (fetch_commits_between): Updated queries to JOIN commits with committers.
1483 (format_commit): Takes both commit and committers rows. Also don't wrap the result in an array as that
1484 is now done in main.
1486 * public/api/report-commits.php:
1487 (main): Store the reported committer information or update the existing entry if there is one.
1489 * tests/admin-regenerate-manifest.js: Fixed tests.
1491 * tests/api-report-commits.js: Ditto. Also added a test for updating an existing committer entry.
1493 * tools/pull-svn.py: Renamed email to account.
1495 (fetch_commit_and_resolve_author):
1497 (resolve_author_name_from_account):
1498 (resolve_author_name_from_email): Deleted.
1500 2014-12-17 Ryosuke Niwa <rniwa@webkit.org>
1502 Unreviewed build fix.
1504 * public/v2/index.html: Include js files we extracted in r177424.
1506 2014-12-16 Ryosuke Niwa <rniwa@webkit.org>
1508 Unreviewed. Adding the forgotten svnprop.
1510 * tools/pull-svn.py: Added property svn:executable.
1512 2014-12-16 Ryosuke Niwa <rniwa@webkit.org>
1514 Split InteractiveChartComponent and CommitsViewerComponent into separate files
1515 https://bugs.webkit.org/show_bug.cgi?id=139716
1517 Rubber-stamped by Benjamin Poulain.
1519 Refactored InteractiveChartComponent and CommitsViewerComponent out of app.js into commits-viewer.js
1520 and interactive-chart.js respectively since app.js has gotten really large.
1523 * public/v2/commits-viewer.js: Added.
1524 * public/v2/interactive-chart.js: Added.
1526 2014-12-02 Ryosuke Niwa <rniwa@webkit.org>
1528 New perf dashboard's chart UI is buggy
1529 https://bugs.webkit.org/show_bug.cgi?id=139214
1531 Reviewed by Chris Dumez.
1533 The bugginess was caused by weird interactions between charts and panes. Rewrote the code to fix it.
1535 Superfluous selectionChanged and domainChanged "event" actions were removed from the interactive chart
1536 component. This is not how Ember.js components should interact to begin with. The component now exposes
1537 selectedPoints and always updates selection instead of sharedSelection.
1540 (App.ChartsController.present): Added. We can't call Date.now() in various points in our code as that
1541 would lead to infinite mutual recursions since X-axis domain values wouldn't match up.
1542 (App.ChartsController.updateSharedDomain): This function was completely useless. The overview's start
1543 and end time should be completely determined by "since" and the present time.
1544 (App.ChartsController._startTimeChanged): Ditto.
1545 (App.ChartsController._scheduleQueryStringUpdate):
1546 (App.ChartsController._updateQueryString): Set "zoom" only if it's different from the shared domain.
1548 (App.domainsAreEqual): Moved from InteractiveChartComponent._xDomainsAreSame.
1550 (App.PaneController.actions.createAnalysisTask): Use selectedPoints property set by the chart.
1551 (App.PaneController.actions.overviewDomainChanged): Removed; only needed to call updateSharedDomain.
1552 (App.PaneController.actions.rangeChanged): Removed. _showDetails (renamed to _updateDetails) directly
1553 observes the changes to selectedPoints property as it gets updated by the main chart.
1554 (App.PaneController._overviewSelectionChanged): This was previously a dead code. Now it's used again
1555 with a bug fix. When the overview selection is cleared, we use the same domain in the main chart and
1557 (App.PaneController._sharedDomainChanged): Fixed a but that it erroneously updates the overview domain
1558 when domain arrays aren't identical. This was causing a subtle race with other logic.
1559 (App.PaneController._sharedZoomChanged): Ditto. Also don't set mainPlotDomain here as any changes to
1560 overviewSelection will automatically propagate to the main plot's domain as they're aliased.
1561 (App.PaneController._currentItemChanged): Merged into _updateDetails (renamed from _showDetails).
1562 (App.PaneController._updateDetails): Previously, this function took points and inspected _hasRange to
1563 see if those two points correspond to a range or a single data point. Rewrote all that logic by
1564 directly observing selectedPoints and currentItem properties instead of taking points and relying on
1565 an instance variable, which was a terrible API.
1566 (App.PaneController._updateCanAnalyze): Use selectedPoints property. Since this property is only set
1567 when the main plot has a selected range, we don't have to check this._hasRange anymore.
1569 (App.InteractiveChartComponent._updateDomain): No longer sends domainChanged "event" action.
1570 (App.InteractiveChartComponent._sharedSelectionChanged): Removed. This is a dead code.
1571 (App.InteractiveChartComponent._updateSelection):
1572 (App.InteractiveChartComponent._xDomainsAreSame): Moved to App.domainsAreEqual.
1573 (App.InteractiveChartComponent._setCurrentSelection): Update the selection only if needed. Also set
1574 selectedPoints property.
1576 (App.AnalysisTaskController._fetchedRuns):
1577 (App.AnalysisTaskController._rootChangedForTestSet):
1579 * public/v2/index.html:
1580 Removed non-functional sharedSelection and superfluous selectionChanged and domainChanged actions.
1582 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
1584 Unreviewed. Fixed syntax errors.
1586 * init-database.sql:
1587 * public/api/commits.php:
1589 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
1591 The dashboard on new perf monitor should be configurable
1592 https://bugs.webkit.org/show_bug.cgi?id=138994
1594 Reviewed by Benjamin Poulain.
1596 For now, make it configurable via config.json. We should eventually make it configurable via
1597 an administrative page but this will do for now.
1599 * config.json: Added the empty dashboard configuration.
1601 * public/include/manifest.php: Include the dashboard configuration in the manifest file.
1604 (App.IndexController): Removed defaultTable since this is now dynamically obtained via App.Manifest.
1605 (App.IndexController.gridChanged): Use App.Dashboard to parse the dashboard configuration.
1606 Also obtain the default configuration from App.Manifest.
1607 (App.IndexController._normalizeTable): Moved to App.Dashboard.
1609 * public/v2/manifest.js:
1610 (App.Repository.urlForRevision): Fixed the position of the open curly bracket.
1611 (App.Repository.urlForRevisionRange): Ditto.
1612 (App.Dashboard): Added.
1613 (App.Dashboard.table): Extracted from App.IndexController.gridChanged.
1614 (App.Dashboard.rows): Ditto.
1615 (App.Dashboard.headerColumns): Ditto.
1616 (App.Dashboard._normalizeTable): Moved from App.IndexController._normalizeTable.
1617 (App.MetricSerializer.normalizePayload): Synthesize a dashboard record from the configuration.
1618 Since there is exactly one dashboard object per app, it's okay to hard code an id here.
1619 (App.Manifest._fetchedManifest): Set defaultDashboard to the one and only one dashboard we have.
1621 2014-11-21 Ryosuke Niwa <rniwa@webkit.org>
1623 There should be a way to associate bugs with analysis tasks
1624 https://bugs.webkit.org/show_bug.cgi?id=138977
1626 Reviewed by Benjamin Poulain.
1628 Updated associate-bug.php to match the new database schema.
1630 * public/include/json-header.php:
1631 (require_format): Removed the call to camel_case_words_separated_by_underscore since the name is
1632 already camel-cased in require_existence_of. This makes the function usable elsewhere.
1634 * public/privileged-api/associate-bug.php:
1635 (main): Changed the API to take run, bugTracker, and number to match the new database schema.
1636 Also verify that those values are integers using require_format.
1638 * public/v2/analysis.js:
1639 (App.AnalysisTask.label): Added. Concatenates the task's name with the bug numbers.
1640 (App.Bug.label): Added.
1641 (App.BugAdapter): Added.
1642 (App.BugAdapter.createRecord): Use PrivilegedAPI instead of the builtin ajax call.
1643 (App.BuildRequest): Inherit from newly added App.Model, which is set to DS.Model right now.
1645 * public/v2/app.css: Renamed .test-groups to .analysis-group. Also added new rules for the table
1646 containing the bug information.
1649 (App.InteractiveChartComponent._rangesChanged): Added label to range bar objects.
1650 (App.AnalysisTaskRoute):
1651 (App.AnalysisTaskController): Replaced the functionality of App.AnalysisTaskViewModel.
1652 (App.AnalysisTaskController._fetchedManifest): Added.
1653 (App.AnalysisTaskController.actions.associateBug): Added.
1655 * public/v2/chart-pane.css: Renamed .bugs-pane to .analysis-pane.
1657 * public/v2/data.js:
1658 (Measurement.prototype.associateBug): Deleted.
1660 * public/v2/index.html: Renamed .bugs-pane to .analysis-pane and .test-groups to .analysis-group.
1661 Added a table show the bug information. Also hide the chart until chartData is available.
1663 * public/v2/manifest.js:
1666 2014-11-20 Ryosuke Niwa <rniwa@webkit.org>
1668 Fix misc bugs and typos in app.js
1669 https://bugs.webkit.org/show_bug.cgi?id=138946
1671 Reviewed by Benjamin Poulain.
1674 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged):
1675 (App.ChartsController.init):
1676 (App.buildPopup): Renamed from App.BuildPopup.
1677 (App.InteractiveChartComponent._constructGraphIfPossible): Fixed the bug that we were calling
1678 remove() on the wrong object (an array as opposed to elements in the array).
1679 (App.InteractiveChartComponent._highlightedItemsChanged): Check the length of _highlights as
1680 _highlights is always an array and evalutes to true.
1682 2014-11-20 Ryosuke Niwa <rniwa@webkit.org>
1684 New perf dashboard should provide UI to create a new analysis task
1685 https://bugs.webkit.org/show_bug.cgi?id=138910
1687 Reviewed by Benjamin Poulain.
1689 This patch reverts some parts of r175006 and re-introduces bugs associated with analysis tasks.
1690 I'll add UI to show and edit bug numbers associated with an analysis task in a follow up patch.
1692 With this patch, we can create a new analysis task by selection a range of points and opening
1693 "analysis pane" (renamed from "bugs pane"). Each analysis task created is represented by a yellow bar
1694 in the chart hyperlinked to the analysis task.
1696 * init-database.sql: Redefined the bugs to be associated with an analysis task instead of a test run.
1698 * public/api/analysis-tasks.php: Added the support for querying analysis tasks for a specific metric
1699 on a specific platform. Also retrieve and return all bugs associated with analysis tasks.
1701 (fetch_and_push_bugs_to_tasks): Added. Fetches all bugs associated with an array of analysis tasks
1702 and adds the associated bugs to each task in the array.
1705 * public/api/runs.php: Reverted changes made in r175006.
1706 (fetch_runs_for_config):
1709 * public/api/test-groups.php:
1710 (fetch_test_groups_for_task): Use the newly added Database::select_rows.
1712 * public/include/db.php:
1713 (Database::select_first_or_last_row):
1714 (Database::select_rows): Extracted from select_first_or_last_row.
1716 * public/v2/analysis.js:
1717 (App.AnalysisTask): Added "bugs" property.
1718 (App.Bug): Added now that bugs are regular data store objects.
1721 (App.Pane._fetch): Calls this.fetchAnalyticRanges to fetch analysis tasks as well as test runs.
1722 (App.Pane.fetchAnalyticRanges): Added. Fetches analysis tasks for the current metric on the current
1723 platform that are associated with a specific range of runs.
1724 (App.PaneController.actions.toggleBugsPane): Updated per showingBugsPane to showingAnalysisPane rename.
1725 (App.PaneController.actions.associateBug): Deleted.
1726 (App.PaneController.actions.createAnalysisTask): Replaced the pre-condition checks with assertions as
1727 this action should never be triggered when the pre-condition is not met. Also re-fetch analysis tasks
1728 once we've created one.
1729 (App.PaneController.toggleSearchPane): Updated per showingBugsPane to showingAnalysisPane rename.
1730 (App.PaneController._detailsChanged): Ditto. Removed selectedSinglePoint since it's no longer used.
1731 (App.PaneController._showDetails): Call _updateCanAnalyze to update the status of "Analyze" button.
1732 (App.PaneController._updateBugs): Deleted.
1733 (App.PaneController._updateMarkedPoints): Deleted.
1734 (App.PaneController._updateCanAnalyze): Added. Disables the button to create an analysis task when
1735 the name is missing or when at most one point is selected.
1737 (App.InteractiveChartComponent._constructGraphIfPossible): Update the locations of range rects.
1738 (App.InteractiveChartComponent._relayoutDataAndAxes): Ditto.
1739 (App.InteractiveChartComponent._mousePointInGraph): Don't return a point unless the mouse cursor is
1740 on our svg element to avoid locking the current item when a bar shown for an analysis task is clicked.
1741 (App.InteractiveChartComponent._rangesChanged): Added. Creates an array of objects representing
1742 clickable bars for analysis tasks.
1743 (App.InteractiveChartComponent._updateRangeBarRects): Computes the inline style used by each clickable
1744 bar for analysis tasks to place them at the right location.
1745 (App.InteractiveChartComponent.actions.openRange): Added. Forwards the action to the parent controller.
1747 * public/v2/chart-pane.css:
1748 (.chart .extent): Use the same color as the vertical indicator in the highlight behind the selection.
1749 (.chart .rangeBar): Added.
1751 * public/v2/data.js:
1752 (TimeSeries.prototype.nextPoint): Added. Used by _rangesChanged.
1754 * public/v2/index.html: Renamed "bugs pane" to "analysis pane" and removed the UI to associate bugs.
1755 This ability will be reinstated in a follow up patch. Also added a container div and spans for analysis
1756 task bars in the interactive chart component.
1758 2014-11-19 Ryosuke Niwa <rniwa@webkit.org>
1760 Fix typos in r176203.
1763 (App.ChartsController.actions.addPaneByMetricAndPlatform):
1764 (App.AnalysisTaskRoute):
1766 2014-11-18 Ryosuke Niwa <rniwa@webkit.org>
1768 Unreviewed. Updated the install instruction.
1772 2014-11-17 Ryosuke Niwa <rniwa@webkit.org>
1774 App.Manifest shouldn't use App.__container__.lookup
1775 https://bugs.webkit.org/show_bug.cgi?id=138768
1777 Reviewed by Andreas Kling.
1779 Removed the hack to find the store object via App.__container__.lookup.
1780 Pass around the store object instead.
1783 (App.DashboardRow._createPane): Add "store" property to the pane.
1784 (App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Ditto.
1785 (App.IndexController.gridChanged): Ditto.
1786 (App.IndexController.actions.addRow): Ditto.
1787 (App.IndexController.init): Ditto.
1788 (App.Pane._fetch): Ditto.
1789 (App.ChartsController._parsePaneList): Ditto.
1790 (App.ChartsController._updateQueryString): Ditto.
1791 (App.ChartsController.actions.addPaneByMetricAndPlatform): Ditto.
1792 (App.BuildPopup): Ditto.
1793 (App.AnalysisTaskRoute.model): Ditto.
1794 (App.AnalysisTaskViewModel._taskUpdated): Ditto.
1796 * public/v2/manifest.js:
1797 (App.Manifest.fetch): Removed the code to find the store object.
1799 2014-11-08 Ryosuke Niwa <rniwa@webkit.org>
1801 Fix Ember.js warnings the new perf dashboard
1802 https://bugs.webkit.org/show_bug.cgi?id=138531
1804 Reviewed by Darin Adler.
1806 Fixed various warnings.
1809 (App.InteractiveChartComponent._relayoutDataAndAxes): We can't use "rem". Use this._rem as done for x.
1810 * public/v2/data.js:
1811 (PrivilegedAPI._post): Removed the superfluous console.log.
1812 (CommitLogs.fetchForTimeRange): Ditto.
1813 * public/v2/index.html: Added tbody as required by the HTML specification.
1815 2014-11-07 Ryosuke Niwa <rniwa@webkit.org>
1817 Fix typos in r175768.
1820 (App.AnalysisTaskViewModel.roots):
1822 2014-11-07 Ryosuke Niwa <rniwa@webkit.org>
1824 Introduce the concept of analysis task to perf dashboard
1825 https://bugs.webkit.org/show_bug.cgi?id=138517
1827 Reviewed by Andreas Kling.
1829 Introduced the concept of an analysis task, which is created for a range of measurements for a given metric on
1830 a single platform and used to bisect regressions in the range.
1832 Added a new page to see the list of active analysis tasks and a page to view the contents of an analysis task.
1834 * init-database.sql: Added a bunch of tables to store information about analysis tasks.
1835 analysis_tasks - Represents each analysis task. Associated with a platform and a metric and possibly with two
1836 test runs. Analysis tasks not associated with test runs are used for try new patches.
1837 analysis_test_groups - A test group in an analysis task represents a bunch of related A/B testing results.
1838 root_sets - A root set represents a set of roots (or packages) installed in each A/B testing.
1839 build_requests - A build request represents a single pending build for A/B testing.
1841 * public/api/analysis-tasks.php: Added. Returns the specified analysis task or all analysis tasks in an array.
1845 * public/api/test-groups.php: Added. Returns analysis task groups for the specified analysis task or returns
1846 the specified analysis task group as well as build requests associated with them.
1848 (fetch_test_groups_for_task):
1849 (fetch_build_requests_for_task):
1850 (fetch_build_requests_for_group):
1851 (format_test_group):
1852 (format_build_request):
1854 * public/include/json-header.php:
1855 (remote_user_name): Extracted from compute_token so that we can use it in create-analysis-task.php.
1858 * public/privileged-api/associate-bug.php:
1859 (main): Fixed a typo.
1861 * public/privileged-api/create-analysis-task.php: Added. Creates a new analysis task for a given test run range.
1864 (ensure_config_from_runs):
1866 * public/privileged-api/generate-csrf-token.php: Use remote_user_name.
1868 * public/v2/analysis.js: Added. Various Ember data store models to represent analysis tasks and related objects.
1870 (App.AnalysisTask.create):
1872 (App.TestGroupAdapter):
1873 (App.AnalysisTaskSerializer):
1874 (App.TestGroupSerializer):
1877 * public/v2/app.css: Added style rules for the analysis page.
1880 (App.Pane._fetch): Use fetchRunsWithPlatformAndMetric, which has been refactored into App.Manifest.
1882 (App.PaneController.actions.toggleBugsPane): Show bugs pane even when there are no bug trackers or there is not
1883 exactly one selected point as we can still create an analysis task.
1884 (App.PaneController.actions.associateBug): Renamed singlySelectedPoint to selectedSinglePoint to be more
1885 grammatical and also alert'ed the error message when there is one.
1886 (App.PaneController.actions.createAnalysisTask): Added. Creates a new analysis task and opens it in a new tab.
1887 Since window.open only works during the click, we open the new "window" preemptively and navigates or closes it
1888 once XHR request has completed.
1889 (App.PaneController._detailsChanged): Changes due to singlySelectedPoint to selectedSinglePoint rename.
1890 (App.PaneController._updateBugs): Fixed a bug that we were showing bugs in the previous point when a single point
1891 is selected in the details pane.
1893 (App.AnalysisRoute): Added.
1894 (App.AnalysisTaskRoute): Added.
1895 (App.AnalysisTaskViewModel): Added.
1896 (App.AnalysisTaskViewModel._taskUpdated): Fetch runs for the associated platform and metric.
1897 (App.AnalysisTaskViewModel._fetchedRuns): Setup the chart data to show.
1898 (App.AnalysisTaskViewModel.testSets): The computed property used to update roots for all repositories/projects.
1899 (App.AnalysisTaskViewModel._rootChangedForTestSet): Updates root selections for all repositories/projects when
1900 the user selects an option for all roots in A or B configuration.
1901 (App.AnalysisTaskViewModel.roots): The computed property used to show root choices for each repository/project.
1903 * public/v2/chart-pane.css: Added style rules for details view in the analysis task page.
1905 * public/v2/data.js:
1906 (Measurement.prototype._formatRevisionRange): Don't prefix a revision number with "At " when there is no previous
1907 point so that we can use it in App.AnalysisTaskViewModel.roots.
1908 (TimeSeries.prototype.findPointByMeasurementId): Added.
1909 (TimeSeries.prototype.seriesBetweenPoints): Added.
1911 * public/v2/index.html: Use Metric.fullName since the same value is needed in the analysis task page. Also added
1912 a button to create an analysis task, and made bugs pane button always enabled since we can an analysis task even
1913 when multiple points are selected. Finally, added a new template for the analysis task page.
1915 * public/v2/manifest.js:
1916 (App.Metric.fullName): Added to share code between the charts page and the analysis task page.
1917 (App.Manifest.fetchRunsWithPlatformAndMetric): Extracted from App.Pane._fetch to be reused in
1918 App.AnalysisTaskViewModel._taskUpdated.
1920 2014-10-28 Ryosuke Niwa <rniwa@webkit.org>
1922 Remove App.PaneController.bugsChangeCount in the new perf dashboard
1923 https://bugs.webkit.org/show_bug.cgi?id=138111
1925 Reviewed by Darin Adler.
1928 (App.PaneController.bugsChangeCount): Removed.
1929 (App.PaneController.actions.associateBug): Call _updateMarkedPoints instead of incrementing bugsChangeCount.
1930 (App.PaneController._updateMarkedPoints): Extracted from App.InteractiveChartComponent._updateDotsWithBugs.
1931 Finds the list of current run's points that are associated with bugs.
1932 (App.InteractiveChartComponent._updateMarkedDots): Renamed from _updateDotsWithBugs.
1933 * public/v2/chart-pane.css:
1934 (.chart .marked): Renamed from .hasBugs.
1935 * public/v2/index.html: Specify chartPointRadius and markedPoints.
1937 2014-10-27 Ryosuke Niwa <rniwa@webkit.org>
1939 REGRESSION: commit logs are not shown sometimes on the new dashboard UI
1940 https://bugs.webkit.org/show_bug.cgi?id=138099
1942 Reviewed by Benjamin Poulain.
1944 The bug was caused by _currentItemChanged not passing the previous point in the list of points and also
1945 _showDetails inverting the order of the current and old measurements.
1948 (App.PaneController._currentItemChanged): Pass in the previous point to _showDetails when there is one.
1949 (App.PaneController._showDetails): Since points are ordered chronologically, the last point is the
1950 current (latest) measurement and the first point is the oldest measurement.
1951 (App.CommitsViewerComponent.commitsChanged): Don't show a single measurement as a range for clarity.
1953 2014-10-18 Ryosuke Niwa <rniwa@webkit.org>
1955 Perf dashboard should provide a way to associate bugs with a test run
1956 https://bugs.webkit.org/show_bug.cgi?id=137857
1958 Reviewed by Andreas Kling.
1960 Added a "privileged" API, /privileged-api/associate-bug, to associate a bug with a test run.
1961 /privileged-api/ is to be protected by an authentication mechanism such as DigestAuth over https by
1962 the Apache configuration.
1965 The Cross Site Request (CSRF) Forgery prevention for privileged APIs work as follows. When a user is
1966 about to make a privileged API access, the front end code obtains a CSRF token generated by POST'ing
1967 to privileged-api/generate-csrf-token; the page sets a randomly generated salt and an expiration time
1968 via the cookie and returns a token computed from those two values as well as the remote username.
1970 The font end code then POST's the request along with the returned token. The server side code verifies
1971 that the specified token can be generated from the salt and the expiration time set in the cookie, and
1972 the token hasn't expired.
1975 * init-database.sql: Added bug_url to bug_trackers table, and added bugs table. Each bug tracker will
1976 have zero or exactly one bug associated with a test run.
1978 * public/admin/bug-trackers.php: Added the support for editing bug_url.
1979 * public/api/runs.php:
1980 (fetch_runs_for_config): Modified the query to fetch bugs associated with test_runs.
1981 (parse_bugs_array): Added. Parses the aggregated bugs and creates a dictionary that maps a tracker id to
1982 an associated bug if there is one.
1983 (format_run): Calls parse_bugs_array.
1985 * public/include/json-header.php: Added helper functions to deal for CSRF prevention.
1986 (ensure_privileged_api_data): Added. Dies immediately if the request's method is not POST or doesn't
1987 have a valid JSON payload.
1988 (ensure_privileged_api_data_and_token): Ditto. Also checks that the CSRF prevention token is valid.
1989 (compute_token): Computes a CSRF token using the REMOTE_USER (e.g. set via BasicAuth), the salt, and
1990 the expiration time stored in the cookie.
1991 (verify_token): Returns true iff the specified token matches what compute_token returns from the cookie.
1993 * public/include/manifest.php:
1994 (ManifestGenerator::bug_trackers): Include bug_url as bugUrl in the manifest. Also use tracker_id instead
1995 of tracker_name as the key in the manifest. This requires changes to both v1 and v2 front end.
1997 * public/index.html:
1998 (Chart..showTooltipWithResults): Updated for the manifest format changed mentioned above.
2000 * public/privileged-api/associate-bug.php: Added.
2001 (main): Added. Associates or dissociates a bug with a test run inside a transaction. It prevent a CSRF
2002 attack via ensure_privileged_api_data_and_token, which calls verify_token.
2004 * public/privileged-api/generate-csrf-token.php: Added. Generates a CSRF token valid for one hour.
2006 * public/v2/app.css:
2007 (.disabled .icon-button:hover g): Used by the "bugs" icon when a range of points or no points are
2008 selected in a chart.
2011 (App.PaneController.actions.toggleBugsPane): Added. Toggles the visibility of the bugs pane when exactly
2012 one point is selected in the chart. Also hides the search pane when making the bugs pane visible since
2013 they would overlap on each other if both of them are shown.
2014 (App.PaneController.actions.associateBug): Makes a privileged API request to associate the specified bug
2015 with the currently selected point (test run). Updates the bug information in "details" and colors of dots
2016 in the charts to reflect new states. Because chart data objects aren't real Ember objects for performance
2017 reasons, we have to use a dirty hack of modifying a dummy counter bugsChangeCount.
2018 (App.PaneController.actions.toggleSearchPane): Renamed from toggleSearch. Also hides the bugs pane when
2019 showing the search pane.
2020 (App.PaneController.actions.rangeChanged): Takes all selected points as the second argument instead of
2021 taking start and end points as the second and the third arguments so that _showDetails can enumerate all
2022 bugs in the selected range.
2024 (App.PaneController._detailsChanged): Added. Hide the bugs pane whenever a new point is selected.
2025 Also update singlySelectedPoint, which is used by toggleBugsPane and associateBug.
2026 (App.PaneController._currentItemChanged): Updated for the _showDetails change.
2027 (App.PaneController._showDetails): Takes an array of selected points in place of old arguments.
2028 Simplified the code to compute the revision information. Calls _updateBugs to format the associated bugs.
2029 (App.PaneController._updateBugs): Sets details.bugTrackers to a dictionary that maps a bug tracker id to
2030 a bug tracker proxy with an array of (bugNumber, bugUrl) pairs and also editedBugNumber, which is used by
2031 the bugs pane to associate or dissociate a bug number, if exactly one point is selected.
2033 (App.InteractiveChartComponent._updateDotsWithBugs): Added. Sets hasBugs class on dots as needed.
2034 (App.InteractiveChartComponent._setCurrentSelection): Finds and passes all points in the selected range
2035 to selectionChanged action instead of just finding the first and the last points.
2037 * public/v2/chart-pane.css: Updated the style.
2039 * public/v2/data.js:
2040 (PrivilegedAPI): Added. A wrapper for privileged APIs' CSRF tokens.
2041 (PrivilegedAPI.sendRequest): Makes a privileged API call. Fetches a new CSRF token if needed.
2042 (PrivilegedAPI._generateTokenInServerIfNeeded): Makes a request to privileged-api/generate-csrf-token if
2043 we haven't already obtained a CSRF token or if the token has already been expired.
2044 (PrivilegedAPI._post): Makes a single POST request to /privileged-api/* with a JSON payload.
2046 (Measurement.prototype.bugs): Added.
2047 (Measurement.prototype.hasBugs): Returns true iff bugs has more than one bug number.
2048 (Measurement.prototype.associateBug): Associates a bug with a test run via privileged-api/associate-bug.
2050 * public/v2/index.html: Added the bugs pane. Also added a list of bugs associated with the current run in
2053 * public/v2/manifest.js:
2054 (App.BugTracker.bugUrl):
2055 (App.BugTracker.newBugUrl): Added.
2056 (App.BugTracker.repositories): Added. This was a missing back reference to repositories.
2057 (App.MetricSerializer.normalizePayload): Now parses/loads the list of bug trackers from the manifest.
2058 (App.Manifest.repositoriesWithReportedCommits): Now initialized to an empty array instead of null.
2059 (App.Manifest.bugTrackers): Added.
2060 (App.Manifest._fetchedManifest): Sets App.Manifest.bugTrackers. Also sorts the list of repositories by
2061 their respective ids to make the ordering stable.
2063 2014-10-14 Ryosuke Niwa <rniwa@webkit.org>
2065 Remove unused jobs table
2066 https://bugs.webkit.org/show_bug.cgi?id=137724
2068 Reviewed by Daniel Bates.
2070 Removed jobs table in the database as well as related code.
2072 * init-database.sql:
2073 * public/admin/jobs.php: Removed.
2074 * public/admin/tests.php:
2075 * public/include/admin-header.php:
2077 2014-10-13 Ryosuke Niwa <rniwa@webkit.org>
2079 New perf dashboard should have an ability to search commits by a keyword
2080 https://bugs.webkit.org/show_bug.cgi?id=137675
2082 Reviewed by Geoffrey Garen.
2084 /api/commits/ now accepts query parameters to search a commit by a keyword. Its output format changed to
2085 include "authorEmail" and "authorName" directly as columns instead of including an "author" object.
2086 This API change allows fetch_commits_between to generate results without processing Postgres query results.
2088 In the front end side, we've added a search pane in pane controller, and the interactive chart component
2089 now has a concept of highlighted items which is used to indicate commits found by the search pane.
2091 * public/api/commits.php:
2092 (main): Extract query parameters: keyword, from, and to and use that to fetch appropriate commits.
2093 (fetch_commits_between): Moved some code from main. Now takes a search term as the third argument.
2094 We look for a commit if its author name or email contains the keyword or if its revision matches the keyword.
2095 (format_commit): Renamed from format_commits. Now only formats one commit.
2097 * public/include/db.php:
2098 (Database::query_and_fetch_all): Now returns array() when the query results is empty (instead of false).
2100 * public/v2/app.css: Renamed .close-button to .icon-button since it's used by a search button as well.
2103 (App.Pane.searchCommit): Added. Finds the commits by a search term and assigns 'highlightedItems',
2104 which is a hash table that contains highlighted items' measurements' ids as keys.
2105 (App.PaneController.actions.toggleSearch): Toggles the visibility of the search pane. Also sets
2106 the default commit repository.
2107 (App.PaneController.actions.searchCommit): Delegates the work to App.Pane.searchCommit.
2108 (App.InteractiveChartComponent._constructGraphIfPossible): Fixed a bug that we weren't removing old this._dots.
2109 Added the code to initialize this._highlights.
2110 (App.InteractiveChartComponent._updateDimensionsIfNeeded): Updates dimensions of highlight lines.
2111 (App.InteractiveChartComponent._updateHighlightPositions): Added. Ditto.
2112 (App.InteractiveChartComponent._highlightedItemsChanged): Adds vertical lines for highlighted items and deletes
2113 the existing lines for the old highlighted items.
2114 (App.CommitsViewerComponent.commitsChanged): Updated the code per JSON API change mentioned above.
2115 Also fixed a bug that the code tries to update the commits viewer even if the viewer had already been destroyed.
2117 * public/v2/chart-pane.css: Added style for the search pane and the search button.
2119 * public/v2/data.js: Turned FetchCommitsForTimeRange into a class: CommitLogs.
2120 (CommitLogs): Added.
2121 (CommitLogs.fetchForTimeRange): Renamed from FetchCommitsForTimeRange. Takes a search term as an argument.
2122 (CommitLogs._cachedCommitsBetween): Extracted from FetchCommitsForTimeRange.
2123 (CommitLogs._cacheConsecutiveCommits): Ditto.
2124 (FetchCommitsForTimeRange._cachedCommitsByRepository): Deleted.
2125 (Measurement.prototype.commitTimeForRepository): Extracted from formattedRevisions.
2126 (Measurement.prototype.formattedRevisions): Uses formattedRevisions. Deleted the unused code for commitTime.
2128 * public/v2/index.html: Added the search pane and the search button. Also removed the unused attribute binding
2129 for showingDetails since this property is no longer used.
2131 * public/v2/manifest.js:
2132 (App.Manifest.repositories): Added.
2133 (App.Manifest.repositoriesWithReportedCommits): Ditto. Used by App.PaneController.actions.toggleSearch to find
2134 the default repository to search.
2135 (App.Manifest._fetchedManifest): Populates repositories and repositoriesWithReportedCommits.
2137 2014-10-13 Ryosuke Niwa <rniwa@webkit.org>
2139 Unreviewed build fix after r174555.
2141 * public/include/manifest.php:
2142 (ManifestGenerator::generate): Assign an empty array to $repositories_with_commit when there are no commits.
2143 * tests/admin-regenerate-manifest.js: Fixed the test case.
2145 2014-10-09 Ryosuke Niwa <rniwa@webkit.org>
2147 New perf dashboard UI tries to fetch commits all the time
2148 https://bugs.webkit.org/show_bug.cgi?id=137592
2150 Reviewed by Andreas Kling.
2152 Added hasReportedCommits boolean to repository meta data in manifest.json, and used that in
2153 the front end to avoid issuing HTTP requests to fetch commit logs for repositories with
2154 no reported commits as they are all going to fail.
2156 Also added an internal cache to FetchCommitsForTimeRange in the front end to avoid fetching
2157 the same commit logs repeatedly. There are two data structures we cache: commitsByRevision
2158 which maps a given commit revision/hash to a commit object; and commitsByTime which is an array
2159 of commits sorted chronologically by time.
2161 * public/include/manifest.php:
2164 (App.CommitsViewerComponent.commitsChanged):
2166 * public/v2/data.js:
2167 (FetchCommitsForTimeRange):
2168 (FetchCommitsForTimeRange._cachedCommitsByRepository):
2170 * public/v2/manifest.js:
2173 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2175 Another unreviewed build fix after r174477.
2177 Don't try to insert a duplicated row into build_commits as it results in a database constraint error.
2179 This has been caught by a test in /api/report. I don't know why I thought all tests were passing.
2181 * public/include/report-processor.php:
2183 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2185 Unreviewed build fix after r174477.
2187 * init-database.sql: Removed build_commits_index since it's redundant with build_commit's primary key.
2188 Also fixed a syntax error that we were missing "," after line that declared build_commit column.
2190 * public/api/runs.php: Fixed the query so that test_runs without commits data will be retrieved.
2191 This is necessary for baseline and target values manually added via admin pages.
2193 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2195 Add v2 UI for the perf dashboard
2196 https://bugs.webkit.org/show_bug.cgi?id=137537
2198 Rubber-stamped by Andreas Kling.
2201 * public/v2/app.css: Added.
2202 * public/v2/app.js: Added.
2203 * public/v2/chart-pane.css: Added.
2204 * public/v2/data.js: Added.
2205 * public/v2/index.html: Added.
2206 * public/v2/js: Added.
2207 * public/v2/js/d3: Added.
2208 * public/v2/js/d3/LICENSE: Added.
2209 * public/v2/js/d3/d3.js: Added.
2210 * public/v2/js/d3/d3.min.js: Added.
2211 * public/v2/js/ember-data.js: Added.
2212 * public/v2/js/ember.js: Added.
2213 * public/v2/js/handlebars.js: Added.
2214 * public/v2/js/jquery.min.js: Added.
2215 * public/v2/js/statistics.js: Added.
2216 * public/v2/manifest.js: Added.
2217 * public/v2/popup.js: Added.
2219 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2221 Remove superfluously duplicated code in public/api/report-commits.php.
2223 2014-10-08 Ryosuke Niwa <rniwa@webkit.org>
2225 Perf dashboard should store commit logs
2226 https://bugs.webkit.org/show_bug.cgi?id=137510
2228 Reviewed by Darin Adler.
2230 For the v2 version of the perf dashboard, we would like to be able to see commit logs in the dashboard itself.
2232 This patch replaces "build_revisions" table with "commits" and "build_commits" relations to store commit logs,
2233 and add JSON APIs to report and retrieve them. It also adds a tools/pull-svn.py to pull commit logs from
2234 a subversion directory. The git version of this script will be added in a follow up patch.
2237 In the new database schema, each revision in each repository is represented by exactly one row in "commits"
2238 instead of one row for each build in "build_revisions". "commits" and "builds" now have a proper many-to-many
2239 relationship via "build_commits" relations.
2241 In order to migrate an existing instance of this application, run the following SQL commands:
2245 INSERT INTO commits (commit_repository, commit_revision, commit_time)
2246 (SELECT DISTINCT ON (revision_repository, revision_value)
2247 revision_repository, revision_value, revision_time FROM build_revisions);
2249 INSERT INTO build_commits (commit_build, build_commit) SELECT revision_build, commit_id
2250 FROM commits, build_revisions
2251 WHERE commit_repository = revision_repository AND commit_revision = revision_value;
2253 DROP TABLE build_revisions;
2258 The helper script to submit commit logs can be used as follows:
2260 python ./tools/pull-svn.py "WebKit" https://svn.webkit.org/repository/webkit/ https://perf.webkit.org
2261 feeder-slave feeder-slave-password 60 "webkit-patch find-users"
2263 The above command will pull the subversion server at https://svn.webkit.org/repository/webkit/ every 60 seconds
2264 to retrieve at most 10 commits, and submits the results to https://perf.webkit.org using "feeder-slave" and
2265 "feeder-slave-password" as the builder name and the builder password respectively.
2267 The last, optional, argument is the shell command to convert a subversion account to the corresponding username.
2268 e.g. "webkit-patch find-users rniwa@webkit.org" yields "Ryosuke Niwa" <rniwa@webkit.org> in the stdout.
2271 * init-database.sql: Replaced "build_revisions" relation with "commits" and "build_commits" relations.
2273 * public/api/commits.php: Added. Retrieves a list of commits based on arguments in its path of the form
2274 /api/commits/<repository-name>/<filter>. The behavior of this API depends on <filter> as follows:
2276 - Not specified - It returns every single commit for a given repository.
2277 - Matches "oldest" - It returns the commit with the oldest timestamp.
2278 - Matches "latest" - It returns the commit with the latest timestamp.
2279 - Matches "last-reported" - It returns the commit with the latest timestamp added via report-commits.php.
2280 - Is entirely alphanumeric - It returns the commit whose revision matches the filter.
2281 - Is of the form <alphanumeric>:<alphanumeric> or <alphanumeric>-<alphanumeric> - It retrieves the list
2282 of commits added via report-commits.php between two timestamps retrieved from commits whose revisions
2283 match the two alphanumeric values specified. Because it retrieves commits based on their timestamps,
2284 the list may contain commits that do not appear as neither hash's ancestor in git/mercurial.
2286 (commit_from_revision):
2287 (fetch_commits_between):
2290 * public/api/report-commits.php: Added. A JSON API to report new subversion, git, or mercurial commits.
2291 See tests/api-report-commits.js for examples on how to use this API.
2293 * public/api/runs.php: Updated the query to use "commit_builds" and "commits" relations instead of
2294 "build_revisions". Regrettably, the new query is 20% slower but I'm going to wait until the new UI is ready
2295 to optimize this and other JSON APIs.
2297 * public/include/db.php:
2298 (Database::select_or_insert_row):
2299 (Database::update_or_insert_row): Added.
2300 (Database::_select_update_or_insert_row): Extracted from select_or_insert_row. Try to update first and then
2301 insert if the update fails for update_or_insert_row. Preserves the old behavior when $should_update is false.
2303 (Database::select_first_row):
2304 (Database::select_last_row): Added.
2305 (Database::select_first_or_last_row): Extracted from select_first_row. Fixed a bug that we were asserting
2306 $order_by to be not alphanumeric/underscore. Retrieve the last row instead of the first if $descending_order.
2308 * public/include/report-processor.php:
2309 (ReportProcessor::resolve_build_id): Store commits instead of build_revisions. We don't worry about the race
2310 condition for adding "build_commits" rows since we shouldn't have a single tester submitting the same result
2311 concurrently. Even if it happened, it will only result in a PHP error and the database will stay consistent.
2314 (pathToTests): Don't call path.resolve with "undefined" testName; It throws an exception in the latest node.js.
2316 * tests/api-report-commits.js: Added.
2317 * tests/api-report.js: Fixed a test per build_revisions to build_commits/commits replacement.
2320 * tools/pull-svn.py: Added. See above for how to use this script.
2322 (determine_first_revision_to_fetch):
2323 (fetch_revision_from_dasbhoard):
2324 (fetch_commit_and_resolve_author):
2327 (resolve_author_name_from_email):
2330 2014-09-30 Ryosuke Niwa <rniwa@webkit.org>
2332 Update Install.md for Mavericks and fix typos
2333 https://bugs.webkit.org/show_bug.cgi?id=137276
2335 Reviewed by Benjamin Poulain.
2337 Add the instruction to copy php.ini to enable the Postgres extension in PHP.
2339 Also use perf.webkit.org as the directory name instead of WebKitPerfMonitor.
2341 Finally, init-database.sql is no longer located inside database directory.
2345 2014-08-11 Ryosuke Niwa <rniwa@webkit.org>
2347 Report run id's in api/runs.php for the new dashboard UI
2348 https://bugs.webkit.org/show_bug.cgi?id=135813
2350 Reviewed by Andreas Kling.
2352 Include run_id in the generated JSON.
2354 * public/api/runs.php:
2355 (fetch_runs_for_config): Don't sort results by time since that has been done in the front end for ages now.
2358 2014-08-11 Ryosuke Niwa <rniwa@webkit.org>
2360 Merging platforms mixes baselines and targets into reported data
2361 https://bugs.webkit.org/show_bug.cgi?id=135260
2363 Reviewed by Andreas Kling.
2365 When merging two platforms, move test configurations of a different type (baseline, target)
2366 as well as of different metric (Time, Runs).
2368 Also avoid fetching the entire table of runs just to see if there are no remaining runs.
2369 It's sufficient to detect one such test_runs object.
2371 * public/admin/platforms.php:
2374 2014-07-30 Ryosuke Niwa <rniwa@webkit.org>
2376 Merging platforms mixes baselines and targets into reported data
2377 https://bugs.webkit.org/show_bug.cgi?id=135260
2379 Reviewed by Geoffrey Garen.
2381 Make sure two test configurations we're merging are of the same type (e.g. baseline, target, current).
2382 Otherwise, we'll erroneously mix up runs for baseline, target, and current (reported values).
2384 * public/admin/platforms.php:
2386 2014-07-23 Ryosuke Niwa <rniwa@webkit.org>
2388 Build fix after r171361.
2390 * public/js/helper-classes.js:
2391 (.this.formattedBuildTime):
2393 2014-07-22 Ryosuke Niwa <rniwa@webkit.org>
2395 Perf dashboard spends 2s processing JSON data during the page loads
2396 https://bugs.webkit.org/show_bug.cgi?id=135152
2398 Reviewed by Andreas Kling.
2400 In the Apple internal dashboard, we were spending as much as 2 seconds
2401 converting raw JSON data into proper JS objects while loading the dashboard.
2403 This caused the apparent unresponsiveness of the dashboard despite of the fact
2404 charts themselves updated almost instantaneously.
2406 * public/index.html:
2407 * public/js/helper-classes.js:
2408 (TestBuild): Compute the return values of formattedTime and formattedBuildTime
2409 lazily as creating new Date objects and running string replace is expensive.
2410 (TestBuild.formattedTime):
2411 (TestBuild.formattedBuildTime):
2412 (PerfTestRuns.setResults): Added. Pushing each result was the biggest bottle neck.
2413 (PerfTestRuns.addResult): Deleted.
2415 2014-07-18 Ryosuke Niwa <rniwa@webkit.org>
2417 Perf dashboard shouldn't show the full git hash
2418 https://bugs.webkit.org/show_bug.cgi?id=135083
2420 Reviewed by Benjamin Poulain.
2422 Detect Git/Mercurial hash by checking the length.
2424 If it's a hash, use the first 8 characters in the label
2425 while retaining the full length to be used in hyperlinks.
2427 * public/js/helper-classes.js:
2428 (.this.formattedRevisions):
2431 2014-05-29 Ryosuke Niwa <rniwa@webkit.org>
2433 Add an instruction on how to backup the database.
2434 https://bugs.webkit.org/show_bug.cgi?id=133391
2436 Rubber-stamped by Andreas Kling.
2440 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
2442 Build fix after r166479. 'bytes' is now abbreviated as 'B'.
2444 * public/js/helper-classes.js:
2445 (PerfTestRuns.smallerIsBetter):
2447 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
2451 * public/common.css:
2453 * public/index.html:
2457 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2459 WebKitPerfMonitor: There should be a way to add all metrics of a suite without also adding subtests
2460 https://bugs.webkit.org/show_bug.cgi?id=131157
2462 Reviewed by Andreas Kling.
2464 Split "all metrics" into all metrics of a test suite and all subtests of the suite.
2465 This allows, for example, adding all metrics such as Arithmetic and Geometric for
2466 a given test suite without also adding its subtests.
2468 * public/index.html:
2472 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2474 WebKitPerfMonitor: Tooltips cannot be pinned after using browser's back button
2475 https://bugs.webkit.org/show_bug.cgi?id=131155
2477 Reviewed by Andreas Kling.
2479 The bug was caused by Chart.attach binding event listeners on plot container on each call.
2480 This resulted in the click event handler toggling the visiblity of the tooltip twice upon
2481 click when attach() has been called even number of times, keeping the tooltip invisible.
2483 Fixed the bug by extracting the code to bind event listeners outside of Chart.attach as
2484 a separate function, bindPlotEventHandlers, and calling it exactly once when Chart.attach
2485 is called for the first time.
2487 * public/index.html:
2489 (Chart..bindPlotEventHandlers):
2491 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2493 WebKitPerfMonitor: Tooltips can be cut off at the top
2494 https://bugs.webkit.org/show_bug.cgi?id=130960
2496 Reviewed by Andreas Kling.
2498 * public/common.css:
2499 (#title): Removed the gradients, box shadows, and border from the header.
2500 (#title h1): Reduce the font size.
2501 (#title ul): Use line-height to vertically align the navigation bar instead of specifying a padding atop.
2502 * public/index.html:
2503 (.tooltop:before): Added. Identical to .tooltop:after except it's upside down (arrow facing up).
2504 (.tooltip.inverted:before): Show the arrow facing up when .inverted is set.
2505 (.tooltip.inverted:before): Hide the arrow facing down when .inverted is set.
2506 * public/js/helper-classes.js:
2507 (Tooltip.show): Show the tooltip below the point if placing it above the point results in the top of the
2508 tooltip extending above y=0.
2510 2014-04-03 Ryosuke Niwa <rniwa@webkit.org>
2512 WebKitPerfMonitor: Y-axis adjustment is too aggressive
2513 https://bugs.webkit.org/show_bug.cgi?id=130937
2515 Reviewed by Andreas Kling.
2517 Previously, adjusted min. and max. were defined as the two standards deviations away from EWMA of measured
2518 results. This had two major problems:
2519 1. Two standard deviations can be too small to show the confidence interval for results.
2520 2. Sometimes baseline and target can be more than two standards deviations away.
2522 Fixed the bug by completely rewriting the algorithm to compute the interval. Instead of blindly using two
2523 standard deviations as margins, we keep adding quarter the standard deviation on each side until more than 90%
2524 of points lie in the interval or we've expanded 4 standard deviations. Once this condition is met, we reduce
2525 the margin on each side separately to reduce the empty space on either side.
2527 A more rigorous approach would involve computing least squared value of results with respect to intervals
2528 but that seems like an overkill for a simple UI problem; it's also computationally expensive.
2530 * public/index.html:
2531 (Chart..adjustedIntervalForRun): Extracted from computeYAxisBoundsToFitLines.
2532 (Chart..computeYAxisBoundsToFitLines): Compute the min. and max. adjusted intervals out of adjusted intervals
2533 for each runs (current, baseline, and target) so that at least one point from each set of results is shown.
2534 We wouldn't see the difference between measured values versus baseline and target values otherwise.
2535 * public/js/helper-classes.js:
2536 (PerfTestResult.unscaledConfidenceIntervalDelta): Returns the default value if the confidence
2537 interval delta cannot be computed.
2538 (PerfTestResult.isInUnscaledInterval): Added. Returns true iff the confidence intervals lies
2539 within the given interval.
2540 (PerfTestRuns..filteredResults): Extracted from unscaledMeansForAllResults now that PerfTestRuns.min and
2541 PerfTestRuns.max need to use both mean and confidence interval delta for each result.
2542 (PerfTestRuns..unscaledMeansForAllResults):
2543 (PerfTestRuns.min): Take the confidence interval delta into account.
2544 (PerfTestRuns.max): Ditto.
2545 (PerfTestRuns.countResults): Returns the number of results in the given time frame (> minTime).
2546 (PerfTestRuns.countResultsInInterval): Returns the number of results whose confidence interval lie within the
2548 (PerfTestRuns.exponentialMovingArithmeticMean): Fixed the typo so that it actually computes the EWMA.
2550 2014-03-31 Ryosuke Niwa <rniwa@webkit.org>
2552 Some CSS tweaks after r166477 and r166479,
2554 * public/index.html:
2556 2014-03-30 Ryosuke Niwa <rniwa@webkit.org>
2558 WebKitPerfMonitor: Sometimes text inside panes overlap
2559 https://bugs.webkit.org/show_bug.cgi?id=130956
2561 Reviewed by Gyuyoung Kim.
2563 Revamped the pane UI. Now build info uses table element instead of plane text with BRs. The computed status of
2564 the latest result against baseline/target such as "3% until target" is now shown above the current value. This
2565 reduces the total height of the pane and fits more information per screen capita on the dashboard.
2567 * public/index.html: Updated and added a bunch of CSS rules for the new look.
2568 (.computeStatus): Don't append the build info here. The build info is constructed as a separate table now.
2569 (.createSummaryRowMarkup): Use th instead of td for "Current", "Baseline", and "Target" in the summary table.
2570 (.buildLabelWithLinks): Construct table rows instead of br separated lines of text. This streamlines the look
2571 of the build info shown in a chart pane and a tooltip.
2572 (Chart): Made .status a table.
2573 (Chart.populate): Prepend status.text, which contains text such as "3% until target", into the summary rows
2574 right above "Current" value, and populate .status with buildLabelWithLinks manually instead of status.text
2575 now that status.text no longer contains it.
2576 (Chart..showTooltipWithResults): Wrap buildLabelWithLinks with a table element.
2578 * public/js/helper-classes.js:
2579 (TestBuild.formattedRevisions): Don't include repository names in labels since repository names are now added
2580 by buildLabelWithLinks inside th elements. Also place spaces around '-' between two different OS X versions.
2581 e.g. "OS X 10.8 - OS X 10.9" instead of "OS X 10.8-OS X 10.9".
2582 (PerfTestRuns): Use "/s" for "runs/s" and "B" for "bytes" to make text shorter in .status and .summaryTable.
2583 (PerfTestRuns..computeScalingFactorIfNeeded): Avoid placing a space between 'M' and a unit starting with a
2584 capital letter; e.g. "MB" instead of "M B".
2586 2014-03-30 Ryosuke Niwa <rniwa@webkit.org>
2588 WebKitPerfMonitor: Header and number-of-days slider takes up too much space
2589 https://bugs.webkit.org/show_bug.cgi?id=130957
2591 Reviewed by Gyuyoung Kim.
2593 Moved the slider into the header. Also reduced the spacing between the header and platform names.
2594 This reclaims 50px × width of the screen real estate.
2596 * public/common.css:
2597 (#title): Reduced the space below the header from 20px to 10px.
2598 * public/index.html:
2599 (#numberOfDaysPicker): Removed the rounded border around the number-of-days slider.
2600 (#dashboard > tbody > tr > td): Added a 1.5em padding at the bottom.
2601 (#dashboard > thead th): That allows us to remove the padding at the top here. This reduces the wasted screen
2602 real estate between the header and the platform names.
2604 2014-03-10 Zoltan Horvath <zoltan@webkit.org>
2606 Update the install guidelines for perf.webkit.org
2607 https://bugs.webkit.org/show_bug.cgi?id=129895
2609 Reviewed by Ryosuke Niwa.
2611 The current install guideline for perf.webkit.org discourages the use of the installed
2612 Server application. I've actualized the documentation for Mavericks, and modified the
2613 guideline to include the instructions for Server.app also.
2617 2014-03-08 Zoltan Horvath <zoltan@webkit.org>
2619 Update perf.webkit.org json example
2620 https://bugs.webkit.org/show_bug.cgi?id=129907
2622 Reviewed by Andreas Kling.
2624 The current example is not valid json syntax. I fixed the syntax errors and indented the code properly.
2628 2014-01-31 Ryosuke Niwa <rniwa@webkit.org>
2630 Merge database-common.js and utility.js into run-tests.js.
2632 Reviewed by Matthew Hanson.
2634 Now that run-tests is the only node.js script, merged database-common.js and utility.js into it.
2635 Also moved init-database.sql out of the database directory and removed the directory entirely.
2637 * database: Removed.
2638 * database/database-common.js: Removed.
2639 * database/utility.js: Removed.
2640 * init-database.sql: Moved from database/init-database.sql.
2642 (connect): Moved from database-common.js.
2643 (pathToDatabseSQL): Extracted from pathToLocalScript.
2644 (pathToTests): Moved from database-common.js.
2647 (SerializedTaskQueue): Ditto.
2649 (initializeDatabase):
2650 (TestEnvironment.it):
2651 (TestEnvironment.queryAndFetchAll):
2654 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
2656 Remove the dependency on node.js from the production code.
2658 Reviewed by Ricky Mondello.
2660 Work towards <rdar://problem/15955053> Upstream SafariPerfMonitor.
2662 Removed node.js dependency from TestRunsGenerator. It was really a design mistake to invoke node.js from php.
2663 It added so much complexity with only theoretical extensibility of adding aggregators. It turns out that
2664 many aggregators we'd like to add are a lot more complicated than ones that could be written under the current
2665 infrastructure, and we need to make the other aspects (e.g. the level of aggregations) a lot more extensible.
2666 Removing and simplifying TestRunsGenerator allows us to implement such extensions in the future.
2668 Also removed the js files that are no longer used.
2670 * config.json: Moved from database/config.json.
2671 * database/aggregate.js: Removed. No longer used.
2672 * database/database-common.js: Removed unused functions, and updated the path to config.json.
2673 * database/process-jobs.js: Removed. No longer used.
2674 * database/sample-data.sql: Removed. We have a much better corpus of data now.
2675 * database/schema.graffle: Removed. It's completely obsolete.
2676 * public/include/db.php: Updated the path to config.json.
2677 * public/include/evaluator.js: Removed.
2679 * public/include/report-processor.php:
2680 (TestRunsGenerator::aggregate): Directly aggregate values via newly added aggregate_values method instead of
2681 storing values into $expressions and calling evaluate_expressions_by_node.
2682 (TestRunsGenerator::aggregate_values): Added.
2683 (TestRunsGenerator::compute_caches): Directly compute the caches.
2685 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
2687 Build fix. Don't fail the platform merges even if there are no test configurations to be moved to the new platform.
2689 * public/admin/platforms.php:
2690 * public/include/db.php:
2692 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
2694 Zoomed y-axis view is ununsable when the last result is an outlier.
2696 Reviewed by Stephanie Lewis.
2698 Show two standard deviations from the exponential moving average with alpha = 0.3 instead of the mean of
2699 the last result so that the graph looks sane if the last result was an outlier. However, always show
2700 the last result's mean even if it was an outlier.
2702 * public/index.html:
2703 * public/js/helper-classes.js:
2704 (unscaledMeansForAllResults): Extracted from min/max/sampleStandardDeviation.
2705 Also added the ability to cache the unscaled means to avoid recomputation.
2706 (PerfTestRuns.min): Refactored to use unscaledMeansForAllResults.
2707 (PerfTestRuns.max): Ditto.
2708 (PerfTestRuns.sampleStandardDeviation): Ditto.
2709 (PerfTestRuns.exponentialMovingArithmeticMean): Added.
2711 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
2715 * public/admin/tests.php:
2716 * public/js/helper-classes.js:
2718 2014-01-29 Ryosuke Niwa <rniwa@webkit.org>
2720 Use two standard deviations instead as I mentioned in the mailing list.
2722 * public/index.html:
2724 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
2726 The performance dashboard erroneously shows upward arrow for combined metrics.
2728 A single outlier can ruin the zoomed y-axis view.
2730 Rubber-stamped by Antti Koivisto.
2732 * public/index.html:
2733 (computeYAxisBoundsToFitLines): Added adjustedMax and adjustedMin, which are pegged at 4 standard deviations
2734 from the latest results' mean.
2735 (Chart): Renamed shouldStartYAxisAtZero to shouldShowEntireYAxis.
2736 (Chart.attachMainPlot): Use the adjusted max and min when we're not showing the entire y-axis.
2737 (Chart.toggleYAxis):
2738 * public/js/helper-classes.js:
2739 (PerfTestRuns.sampleStandardDeviation): Added.
2740 (PerfTestRuns.smallerIsBetter): 'Combined' is a smaller is better metric.
2742 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
2744 Don't include the confidence interval when computing the y-axis.
2746 Rubber-stamped by Simon Fraser.
2748 * public/js/helper-classes.js:
2752 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
2754 Tiny CSS tweak for tooltips.
2756 * public/index.html:
2758 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
2760 Remove the erroneously repeated code.
2762 * public/admin/test-configurations.php:
2764 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
2766 <rdar://problem/15704893> perf dashboard should show baseline numbers
2768 Reviewed by Stephanie Lewis.
2770 * public/admin/bug-trackers.php:
2771 (associated_repositories): Return an array of HTMLs instead of echo'ing as expected by AdministrativePage.
2774 * public/admin/platforms.php:
2775 (merge_list): Ditto.
2777 * public/admin/test-configurations.php: Added.
2778 (add_run): Adds a "synthetic" test run and a corresponding build. It doesn't create run_iterations and
2779 build_revisions as they're not meaningful for baseline / target numbers.
2780 (delete_run): Deletes a synthetic test run and its build. It verifies that the specified build has exactly
2781 one test run so that we don't accidentally delete a reported test run.
2782 (generate_rows_for_configurations): Generates rows of configuration IDs and types.
2783 (generate_rows_for_test_runs): Ditto for test runs. It also emits the form to add new "synthetic" test runs
2784 and delete existing ones.
2786 * public/admin/tests.php: We wrongfully assumed there is exactly one test configuration for each metric
2787 on each platform; there could be configurations of distinct types such as "current" and "baseline".
2788 Thus, update all test configurations for a given metric when updating config_is_in_dashboard.
2790 * public/api/runs.php: Remove the NotImplemented when we have multiple test configurations.
2791 (fetch_runs_for_config): "Synthetic" test runs created on test-configurations page are missing revision
2792 data so we need to left-outer-join (instead of inner-join) build_revisions. To avoid making the query
2793 unreadable, don't join revision_repository here. Instead, fetch the list of repositories upfront and
2794 resolve names in parse_revisions_array. This actually reduces the query time by ~10%.
2796 (parse_revisions_array): Skip an empty array created for "synthetic" test runs.
2798 * public/include/admin-header.php:
2799 (AdministrativePage::render_table): Now custom columns support sub columns. e.g. a configuration column may
2800 have id and type sub columns, and each custom column could generate multiple rows.
2802 Any table with sub columns now generates two rows for thead. We generate td's in in the first row without
2803 sub columns with rowspan of 2, and generate ones with sub columns with colspan set to the sub column count.
2804 We then proceed to generate the second header row with sub column names.
2806 When generating the actual content, we first generate all custom columns as they may have multiple rows in
2807 which case regular columns need rowspan set to the maximum number of rows.
2809 Once we've generated the first row, we proceed to generate subsequent rows for those custom columns that
2812 (AdministrativePage::render_custom_cells): Added. This function is responsible for generating table cells
2813 for a given row in a given custom column. It generates an empty td when the custom column doesn't have
2814 enough rows. It also generates empty an td when it doesn't have enough columns in some rows except when
2815 the entire row consists of exactly one cell for a custom column with sub columns, in which case the cell is
2816 expanded to occupy all sub columns.
2818 * public/include/manifest.php:
2819 (ManifestGenerator::platforms): Don't add the metric more than once.
2821 * public/include/test-name-resolver.php:
2822 (TestNameResolver::__construct): We had wrongfully assumed that we have exactly one test configuration on
2823 each platform for each metric like tests.php. Fixed that. Also fetch the list of aggregators to compute the
2824 full metric name later.
2825 (TestNameResolver::map_metrics_to_tests): Populate $this->id_to_metric.
2826 (TestNameResolver::test_id_for_full_name): Simplified the code using array_get.
2827 (TestNameResolver::full_name_for_test): Added.
2828 (TestNameResolver::full_name_for_metric): Added.
2829 (TestNameResolver::configurations_for_metric_and_platform): Renamed as it returns multiple configurations.
2831 * public/js/helper-classes.js:
2832 (TestBuild): Use the build time as the maximum time when revision information is missing for "synthetic"
2833 test runs created to set baseline and target points.
2835 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
2837 Build fix after r57928. Removed a superfluous close parenthesis.
2839 * public/api/runs.php:
2841 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
2843 Unreviewed build & typo fixes.
2845 * public/admin/platforms.php:
2846 * tests/admin-platforms.js:
2848 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
2850 <rdar://problem/15704893> perf dashboard should show baseline numbers
2852 Rubber-stamped by Antti Koivisto.
2854 Organize some code into functions in runs.php.
2856 Also added back $paths that was erroneously removed in r57925 from json-header.php.
2858 * public/api/runs.php:
2859 (fetch_runs_for_config): Extracted.
2860 (format_run): Ditto.
2862 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
2864 Merge the upstream json-shared.php as of https://trac.webkit.org/r162693.
2866 * database/config.json:
2867 * public/admin/reprocess-report.php:
2868 * public/api/report.php:
2869 * public/api/runs.php:
2870 * public/include/json-header.php:
2872 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
2874 Commit yet another forgotten change.
2876 Something went horribly wrong with my merge :(
2878 * database/init-database.sql:
2880 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
2882 Commit one more forgotten change. Sorry for making a mess here.
2884 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
2886 Commit the forgotten files.
2888 * public/admin/platforms.php: Added.
2889 * tests/admin-platforms.js: Added.
2891 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
2893 <rdar://problem/15889905> SafariPerfMonitor: there should be a way to merge and hide platforms
2895 Reviewed by Stephanie Lewis.
2897 Added /admin/platforms/ page to hide and merge platforms.
2899 Merging two platforms is tricky because we need to migrate test runs as well as some test configurations.
2900 Recall that each test (e.g. Dromaeo) can have many "test metrics" (e.g. MaxAllocations, EndAllocations),
2901 and they have a distinct "test configuration" for each platform (e.g. MaxAllocation on Mountain Lion), and
2902 each test configuration a distinct "test run" for each build.
2904 In order to merge platform A into platform B, we must migrate all test runs that belong to platform A via
2905 their test configurations into platform B.
2907 Suppose we're migrating a test run R for test configuration T_A in platform A for metric M. Since M exists
2908 independent of platforms, R should continue to relate to M through some test configuration. Unfortunately,
2909 we can't simply move T_A into platform B since we may already have a test configuration T_B for metric M
2910 in platform B, in which case R should relate to T_B instead.
2912 Thus, we first migrate all test runs for which we already have corresponding test configurations in the
2913 new platform. We then migrate the test configurations of the remaining test runs.
2915 * database/init-database.sql: Added platform_hidden.
2917 * public/admin/platforms.php: Added.
2918 (merge_platforms): Added. Implements the algorithm described above.
2919 (merge_list): Added.
2921 * public/admin/tests.php: Disable the checkbox to show a test configuration on the dashboard if its platform
2922 is hidden since it doesn't do anything.
2924 * public/include/admin-header.php: Added the hyperlink to /admin/platforms.
2925 (update_field): Don't bail out if the newly added "update-column" is set to the field name even if $_POST is
2926 missing it since unchecked checkbox doesn't set the value in $_POST.
2927 (AdministrativePage::render_form_control_for_column): Added the support for boolean edit mode. Also used
2928 switch statement instead of repeated if's.
2929 (AdministrativePage::render_table): Emit "update-column" for update_field.
2931 * public/include/db.php: Disable warnings when we're not in the debug mode.
2933 * public/include/manifest.php:
2934 (ManifestGenerator::platforms): Skip platforms that have been hidden.
2937 (TestEnvironment.postJSON):
2938 (TestEnvironment.httpGet):
2939 (TestEnvironment.httpPost): Added.
2940 (sendHttpRequest): Set the content type if specified.
2942 * tests/admin-platforms.js: Added tests.
2944 2014-01-22 Ryosuke Niwa <rniwa@webkit.org>
2946 Extract the code to compute full test names from tests.php.
2948 Reviewed by Stephanie Lewis.
2950 Extracted TestNameResolver out of tests.php. This reduces the number of global variables in tests.php
2951 and paves our way to re-use the code in other pages.
2953 * public/admin/tests.php:
2955 * public/include/db.php:
2956 (array_set_default): Renamed from array_item_set_default and moved from tests.php as it's used in both
2957 tests.php and test-name-resolver.php.
2959 * public/include/test-name-resolver.php: Added.
2960 (TestNameResolver::__construct):
2961 (TestNameResolver::compute_full_name): Moved from tests.php.
2962 (TestNameResolver::map_metrics_to_tests): Ditto.
2963 (TestNameResolver::sort_tests_by_full_name): Ditto.
2964 (TestNameResolver::tests): Added.
2965 (TestNameResolver::test_id_for_full_name): Ditto.
2966 (TestNameResolver::metrics_for_test_id): Ditto.
2967 (TestNameResolver::child_metrics_for_test_id): Ditto.
2968 (TestNameResolver::configuration_for_metric_and_platform): Ditto.
2970 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
2972 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
2974 Reviewed by Stephanie Lewis.
2976 Add the ability to reprocess reports so that I can re-associate wrongfully associated reports.
2978 Added public/admin/reprocess-report.php. It doesn't have any nice UI to find reports and it returns JSON
2979 but that's sufficient to correct the wrongfully processed reports for now.
2981 * public/admin/reprocess-report.php: Added. Takes a report id in $_GET or $_POST and process the report.
2982 We should eventually add a nice UI to find and reprocess reports.
2984 * public/api/report.php: ReportProcessor and TestRunsGenerator have been removed.
2986 * public/include/db.php: Added the forgotten call to prefixed_column_names.
2988 * public/include/report-processor.php: Copied from public/api/report.php.
2989 (ReportProcessor::__construct): Fetch the list of aggregators here for simplicity.
2990 (ReportProcessor::process): Optionally takes $existing_report_id. When this value is specified, we don't
2991 create a new report or authenticate the builder password (the password is never stored in the report).
2992 Also use select_first_row instead of query_and_fetch_all to find the builder for simplicity.
2993 (ReportProcessor::construct_build_data): Extracted from store_report_and_get_build_data.
2994 (ReportProcessor::store_report): Ditto.
2996 * tests/admin-reprocess-report.js: Added.
2998 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
3000 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
3002 Reviewed by Ricky Mondello.
3004 The bug was caused by a build fix r57645. It attempted to treat multiple reports from the same builder
3005 for the same build number as a single build by ignoring build time. This was necessary to associate
3006 multiple reports by a single build - e.g. for different performance test suites - because the scripts
3007 we use to submit results computed its own "build time" when they're called.
3009 An unintended consequence of this change was revealed when we moved a buildbot master to the new machine
3010 last week; new reports were wrongfully associated with old build numbers.
3012 Fixed the bug by not allowing reports made more than 1 day after the initial build time to be assigned
3013 to the same build. Instead, we create a new build object for those reports. Since the longest set of
3014 tests we have only take a couple of hours to run, 24 hours should be more than enough.
3016 * database/init-database.sql: We can no longer constrain that each build number is unique to a builder
3017 or that build number and build time pair is unique. Instead, constrain the uniqueness of the tuple
3018 (builder, build number, build time).
3020 * public/api/report.php:
3021 (ReportProcessor::resolve_build_id): Look for any builds made within the past one day. Create a new build
3022 when no such build exists. This prevents a report from being associated with a very old build of the same
3025 Also check that revision numbers or hashes match when we're adding revision info. This will let us catch
3026 a similar bug in the future sooner.
3028 * tests/api-report.js: Added three test cases.
3030 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
3032 Merged the upstream changes to db.php
3033 See http://trac.webkit.org/browser/trunk/Websites/test-results/public/include/db.php
3035 * public/include/db.php:
3037 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
3039 Update other scripts and tests per previous patch.
3041 * public/include/manifest.php:
3042 * tests/admin-regenerate-manifest.js:
3044 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
3046 Remove metrics_unit.
3048 Reviewed by Ricky Mondello.
3050 This column is no longer used by the front-end code since r48360.
3052 * database/init-database.sql:
3053 * public/admin/tests.php:
3055 2014-01-16 Ryosuke Niwa <rniwa@webkit.org>
3057 Unreviewed build fix.
3059 * public/api/report.php:
3061 2014-01-15 Ryosuke Niwa <rniwa@webkit.org>
3063 <rdar://problem/15832456> Automate DoYouEvenBench (124497)
3065 Reviewed by Ricky Mondello.
3067 Support a new alternative format for aggregated results where we have raw values as well as
3068 the list aggregators so that instead of
3069 "metrics": {"Time": ["Arithmetic"]}
3071 "metrics": {"Time": { "aggregators" : ["Arithmetic"], "current": [300, 310, 320, 330] }}
3073 This allows single JSON generated by run-perf-tests in WebKit to be shared between the perf
3074 dashboard and the generated results page, which doesn't know how to aggregate values.
3076 We need to keep the support for the old format because all other existing performance tests
3077 all rely on the old format. Even if we updated the tests, we need the dashboard to support
3078 the old format during the transition.
3080 * public/api/report.php:
3081 (ReportProcessor::recursively_ensure_tests): Support the new format in addition to the old one.
3082 (ReportProcessor::aggregator_list_if_exists): Replaced is_list_of_aggregators.
3084 * tests/api-report.js: Updated one of aggregator test cases to test the new format.
3086 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
3088 Unreviewed; Tweak the CSS so that chart panes align vertically.
3090 * public/index.html:
3092 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
3094 SafariPerfMonitor should support Combined metric.
3096 * public/js/helper-classes.js:
3097 (PerfTestRuns): Added 'Combined' metric. In general, it could be used for smaller-is-better
3098 value as well but assume it to be greater-is-better for now.
3100 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
3102 Commit the forgotten init-database change to add iteration_relative_time.
3104 * database/init-database.sql:
3106 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
3108 <rdar://problem/13993069> SafariPerfMonitor: Support accepting (relative time, value) pairs
3110 Reviewed by Ricky Mondello.
3112 Add the support for each value to have a relative time. This is necessary for frame rate history
3113 since a frame rate needs to be associated with a time it was sampled.
3115 * database/init-database.sql: Added iteration_relative_time to run_iterations.
3117 * public/api/report.php:
3118 (TestRunsGenerator::test_value_list_to_values_by_iterations): Reject any non-numeral values here.
3119 This code is used to aggregate values but it doesn't make sense to aggregate iteration values
3120 with relative time since taking the average of two frame rates for two subtests taken at two
3121 different times doesn't make any sense.
3122 (TestRunsGenerator::compute_caches): When we encounter an array value while computing sum, mean,
3123 etc..., use the second element since we assume values are of the form (relative time, frame rate).
3124 Also exit early with an error if the number of elements in the array is not a pair.
3125 (TestRunsGenerator::commit): Store the relative time and the frame rate as needed.
3127 * tests/api-report.js: Added a test case. Also modified existing test cases to account for
3128 iteration_relative_time.
3130 2013-05-27 Ryosuke Niwa <rniwa@webkit.org>
3132 <rdar://problem/13654488> SafariPerfMonitor: Support accepting single-value results
3134 Reviewed by Ricky Mondello.
3136 Support that. It's one line change.
3138 * public/api/report.php:
3139 (ReportProcessor.recursively_ensure_tests): When there is exactly one value, wrap it inside an array
3140 to match the convention assumed elsewhere.
3141 * tests/api-report.js: Added a test case.
3143 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3145 SafariPerfMonitor shows popups for points outside of the visible region.
3147 Rubber-stamped by Simon Fraser.
3149 * public/index.html:
3150 (Chart.closestItemForPageXRespectingPlotOffset): renamed from closestItemForPageX.
3151 (Chart.attach): Always use closestItemForPageXRespectingPlotOffset to work around the fact flot
3152 may return an item underneath y-axis labels.
3154 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3156 Tweak the CSS a little to avoid the test name overlapping with the summary table.
3158 * public/index.html:
3160 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3162 Unreviewed. Fix the typo. The anchor element should wrap the svg element, not the other way around.
3164 * public/index.html:
3166 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
3168 <rdar://problem/13992266> Should be a toggle to show entire Y-axis range