1 2014-03-08 Zoltan Horvath <zoltan@webkit.org>
3 Update perf.webkit.org json example
4 https://bugs.webkit.org/show_bug.cgi?id=129907
6 Reviewed by Andreas Kling.
8 The current example is not valid json syntax. I fixed the syntax errors and indented the code properly.
12 2014-01-31 Ryosuke Niwa <rniwa@webkit.org>
14 Merge database-common.js and utility.js into run-tests.js.
16 Reviewed by Matthew Hanson.
18 Now that run-tests is the only node.js script, merged database-common.js and utility.js into it.
19 Also moved init-database.sql out of the database directory and removed the directory entirely.
22 * database/database-common.js: Removed.
23 * database/utility.js: Removed.
24 * init-database.sql: Moved from database/init-database.sql.
26 (connect): Moved from database-common.js.
27 (pathToDatabseSQL): Extracted from pathToLocalScript.
28 (pathToTests): Moved from database-common.js.
31 (SerializedTaskQueue): Ditto.
35 (TestEnvironment.queryAndFetchAll):
38 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
40 Remove the dependency on node.js from the production code.
42 Reviewed by Ricky Mondello.
44 Work towards <rdar://problem/15955053> Upstream SafariPerfMonitor.
46 Removed node.js dependency from TestRunsGenerator. It was really a design mistake to invoke node.js from php.
47 It added so much complexity with only theoretical extensibility of adding aggregators. It turns out that
48 many aggregators we'd like to add are a lot more complicated than ones that could be written under the current
49 infrastructure, and we need to make the other aspects (e.g. the level of aggregations) a lot more extensible.
50 Removing and simplifying TestRunsGenerator allows us to implement such extensions in the future.
52 Also removed the js files that are no longer used.
54 * config.json: Moved from database/config.json.
55 * database/aggregate.js: Removed. No longer used.
56 * database/database-common.js: Removed unused functions, and updated the path to config.json.
57 * database/process-jobs.js: Removed. No longer used.
58 * database/sample-data.sql: Removed. We have a much better corpus of data now.
59 * database/schema.graffle: Removed. It's completely obsolete.
60 * public/include/db.php: Updated the path to config.json.
61 * public/include/evaluator.js: Removed.
63 * public/include/report-processor.php:
64 (TestRunsGenerator::aggregate): Directly aggregate values via newly added aggregate_values method instead of
65 storing values into $expressions and calling evaluate_expressions_by_node.
66 (TestRunsGenerator::aggregate_values): Added.
67 (TestRunsGenerator::compute_caches): Directly compute the caches.
69 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
71 Build fix. Don't fail the platform merges even if there are no test configurations to be moved to the new platform.
73 * public/admin/platforms.php:
74 * public/include/db.php:
76 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
78 Zoomed y-axis view is ununsable when the last result is an outlier.
80 Reviewed by Stephanie Lewis.
82 Show two standard deviations from the exponential moving average with alpha = 0.3 instead of the mean of
83 the last result so that the graph looks sane if the last result was an outlier. However, always show
84 the last result's mean even if it was an outlier.
87 * public/js/helper-classes.js:
88 (unscaledMeansForAllResults): Extracted from min/max/sampleStandardDeviation.
89 Also added the ability to cache the unscaled means to avoid recomputation.
90 (PerfTestRuns.min): Refactored to use unscaledMeansForAllResults.
91 (PerfTestRuns.max): Ditto.
92 (PerfTestRuns.sampleStandardDeviation): Ditto.
93 (PerfTestRuns.exponentialMovingArithmeticMean): Added.
95 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
99 * public/admin/tests.php:
100 * public/js/helper-classes.js:
102 2014-01-29 Ryosuke Niwa <rniwa@webkit.org>
104 Use two standard deviations instead as I mentioned in the mailing list.
108 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
110 The performance dashboard erroneously shows upward arrow for combined metrics.
112 A single outlier can ruin the zoomed y-axis view.
114 Rubber-stamped by Antti Koivisto.
117 (computeYAxisBoundsToFitLines): Added adjustedMax and adjustedMin, which are pegged at 4 standard deviations
118 from the latest results' mean.
119 (Chart): Renamed shouldStartYAxisAtZero to shouldShowEntireYAxis.
120 (Chart.attachMainPlot): Use the adjusted max and min when we're not showing the entire y-axis.
122 * public/js/helper-classes.js:
123 (PerfTestRuns.sampleStandardDeviation): Added.
124 (PerfTestRuns.smallerIsBetter): 'Combined' is a smaller is better metric.
126 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
128 Don't include the confidence interval when computing the y-axis.
130 Rubber-stamped by Simon Fraser.
132 * public/js/helper-classes.js:
136 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
138 Tiny CSS tweak for tooltips.
142 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
144 Remove the erroneously repeated code.
146 * public/admin/test-configurations.php:
148 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
150 <rdar://problem/15704893> perf dashboard should show baseline numbers
152 Reviewed by Stephanie Lewis.
154 * public/admin/bug-trackers.php:
155 (associated_repositories): Return an array of HTMLs instead of echo'ing as expected by AdministrativePage.
158 * public/admin/platforms.php:
161 * public/admin/test-configurations.php: Added.
162 (add_run): Adds a "synthetic" test run and a corresponding build. It doesn't create run_iterations and
163 build_revisions as they're not meaningful for baseline / target numbers.
164 (delete_run): Deletes a synthetic test run and its build. It verifies that the specified build has exactly
165 one test run so that we don't accidentally delete a reported test run.
166 (generate_rows_for_configurations): Generates rows of configuration IDs and types.
167 (generate_rows_for_test_runs): Ditto for test runs. It also emits the form to add new "synthetic" test runs
168 and delete existing ones.
170 * public/admin/tests.php: We wrongfully assumed there is exactly one test configuration for each metric
171 on each platform; there could be configurations of distinct types such as "current" and "baseline".
172 Thus, update all test configurations for a given metric when updating config_is_in_dashboard.
174 * public/api/runs.php: Remove the NotImplemented when we have multiple test configurations.
175 (fetch_runs_for_config): "Synthetic" test runs created on test-configurations page are missing revision
176 data so we need to left-outer-join (instead of inner-join) build_revisions. To avoid making the query
177 unreadable, don't join revision_repository here. Instead, fetch the list of repositories upfront and
178 resolve names in parse_revisions_array. This actually reduces the query time by ~10%.
180 (parse_revisions_array): Skip an empty array created for "synthetic" test runs.
182 * public/include/admin-header.php:
183 (AdministrativePage::render_table): Now custom columns support sub columns. e.g. a configuration column may
184 have id and type sub columns, and each custom column could generate multiple rows.
186 Any table with sub columns now generates two rows for thead. We generate td's in in the first row without
187 sub columns with rowspan of 2, and generate ones with sub columns with colspan set to the sub column count.
188 We then proceed to generate the second header row with sub column names.
190 When generating the actual content, we first generate all custom columns as they may have multiple rows in
191 which case regular columns need rowspan set to the maximum number of rows.
193 Once we've generated the first row, we proceed to generate subsequent rows for those custom columns that
196 (AdministrativePage::render_custom_cells): Added. This function is responsible for generating table cells
197 for a given row in a given custom column. It generates an empty td when the custom column doesn't have
198 enough rows. It also generates empty an td when it doesn't have enough columns in some rows except when
199 the entire row consists of exactly one cell for a custom column with sub columns, in which case the cell is
200 expanded to occupy all sub columns.
202 * public/include/manifest.php:
203 (ManifestGenerator::platforms): Don't add the metric more than once.
205 * public/include/test-name-resolver.php:
206 (TestNameResolver::__construct): We had wrongfully assumed that we have exactly one test configuration on
207 each platform for each metric like tests.php. Fixed that. Also fetch the list of aggregators to compute the
208 full metric name later.
209 (TestNameResolver::map_metrics_to_tests): Populate $this->id_to_metric.
210 (TestNameResolver::test_id_for_full_name): Simplified the code using array_get.
211 (TestNameResolver::full_name_for_test): Added.
212 (TestNameResolver::full_name_for_metric): Added.
213 (TestNameResolver::configurations_for_metric_and_platform): Renamed as it returns multiple configurations.
215 * public/js/helper-classes.js:
216 (TestBuild): Use the build time as the maximum time when revision information is missing for "synthetic"
217 test runs created to set baseline and target points.
219 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
221 Build fix after r57928. Removed a superfluous close parenthesis.
223 * public/api/runs.php:
225 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
227 Unreviewed build & typo fixes.
229 * public/admin/platforms.php:
230 * tests/admin-platforms.js:
232 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
234 <rdar://problem/15704893> perf dashboard should show baseline numbers
236 Rubber-stamped by Antti Koivisto.
238 Organize some code into functions in runs.php.
240 Also added back $paths that was erroneously removed in r57925 from json-header.php.
242 * public/api/runs.php:
243 (fetch_runs_for_config): Extracted.
246 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
248 Merge the upstream json-shared.php as of https://trac.webkit.org/r162693.
250 * database/config.json:
251 * public/admin/reprocess-report.php:
252 * public/api/report.php:
253 * public/api/runs.php:
254 * public/include/json-header.php:
256 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
258 Commit yet another forgotten change.
260 Something went horribly wrong with my merge :(
262 * database/init-database.sql:
264 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
266 Commit one more forgotten change. Sorry for making a mess here.
268 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
270 Commit the forgotten files.
272 * public/admin/platforms.php: Added.
273 * tests/admin-platforms.js: Added.
275 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
277 <rdar://problem/15889905> SafariPerfMonitor: there should be a way to merge and hide platforms
279 Reviewed by Stephanie Lewis.
281 Added /admin/platforms/ page to hide and merge platforms.
283 Merging two platforms is tricky because we need to migrate test runs as well as some test configurations.
284 Recall that each test (e.g. Dromaeo) can have many "test metrics" (e.g. MaxAllocations, EndAllocations),
285 and they have a distinct "test configuration" for each platform (e.g. MaxAllocation on Mountain Lion), and
286 each test configuration a distinct "test run" for each build.
288 In order to merge platform A into platform B, we must migrate all test runs that belong to platform A via
289 their test configurations into platform B.
291 Suppose we're migrating a test run R for test configuration T_A in platform A for metric M. Since M exists
292 independent of platforms, R should continue to relate to M through some test configuration. Unfortunately,
293 we can't simply move T_A into platform B since we may already have a test configuration T_B for metric M
294 in platform B, in which case R should relate to T_B instead.
296 Thus, we first migrate all test runs for which we already have corresponding test configurations in the
297 new platform. We then migrate the test configurations of the remaining test runs.
299 * database/init-database.sql: Added platform_hidden.
301 * public/admin/platforms.php: Added.
302 (merge_platforms): Added. Implements the algorithm described above.
305 * public/admin/tests.php: Disable the checkbox to show a test configuration on the dashboard if its platform
306 is hidden since it doesn't do anything.
308 * public/include/admin-header.php: Added the hyperlink to /admin/platforms.
309 (update_field): Don't bail out if the newly added "update-column" is set to the field name even if $_POST is
310 missing it since unchecked checkbox doesn't set the value in $_POST.
311 (AdministrativePage::render_form_control_for_column): Added the support for boolean edit mode. Also used
312 switch statement instead of repeated if's.
313 (AdministrativePage::render_table): Emit "update-column" for update_field.
315 * public/include/db.php: Disable warnings when we're not in the debug mode.
317 * public/include/manifest.php:
318 (ManifestGenerator::platforms): Skip platforms that have been hidden.
321 (TestEnvironment.postJSON):
322 (TestEnvironment.httpGet):
323 (TestEnvironment.httpPost): Added.
324 (sendHttpRequest): Set the content type if specified.
326 * tests/admin-platforms.js: Added tests.
328 2014-01-22 Ryosuke Niwa <rniwa@webkit.org>
330 Extract the code to compute full test names from tests.php.
332 Reviewed by Stephanie Lewis.
334 Extracted TestNameResolver out of tests.php. This reduces the number of global variables in tests.php
335 and paves our way to re-use the code in other pages.
337 * public/admin/tests.php:
339 * public/include/db.php:
340 (array_set_default): Renamed from array_item_set_default and moved from tests.php as it's used in both
341 tests.php and test-name-resolver.php.
343 * public/include/test-name-resolver.php: Added.
344 (TestNameResolver::__construct):
345 (TestNameResolver::compute_full_name): Moved from tests.php.
346 (TestNameResolver::map_metrics_to_tests): Ditto.
347 (TestNameResolver::sort_tests_by_full_name): Ditto.
348 (TestNameResolver::tests): Added.
349 (TestNameResolver::test_id_for_full_name): Ditto.
350 (TestNameResolver::metrics_for_test_id): Ditto.
351 (TestNameResolver::child_metrics_for_test_id): Ditto.
352 (TestNameResolver::configuration_for_metric_and_platform): Ditto.
354 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
356 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
358 Reviewed by Stephanie Lewis.
360 Add the ability to reprocess reports so that I can re-associate wrongfully associated reports.
362 Added public/admin/reprocess-report.php. It doesn't have any nice UI to find reports and it returns JSON
363 but that's sufficient to correct the wrongfully processed reports for now.
365 * public/admin/reprocess-report.php: Added. Takes a report id in $_GET or $_POST and process the report.
366 We should eventually add a nice UI to find and reprocess reports.
368 * public/api/report.php: ReportProcessor and TestRunsGenerator have been removed.
370 * public/include/db.php: Added the forgotten call to prefixed_column_names.
372 * public/include/report-processor.php: Copied from public/api/report.php.
373 (ReportProcessor::__construct): Fetch the list of aggregators here for simplicity.
374 (ReportProcessor::process): Optionally takes $existing_report_id. When this value is specified, we don't
375 create a new report or authenticate the builder password (the password is never stored in the report).
376 Also use select_first_row instead of query_and_fetch_all to find the builder for simplicity.
377 (ReportProcessor::construct_build_data): Extracted from store_report_and_get_build_data.
378 (ReportProcessor::store_report): Ditto.
380 * tests/admin-reprocess-report.js: Added.
382 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
384 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
386 Reviewed by Ricky Mondello.
388 The bug was caused by a build fix r57645. It attempted to treat multiple reports from the same builder
389 for the same build number as a single build by ignoring build time. This was necessary to associate
390 multiple reports by a single build - e.g. for different performance test suites - because the scripts
391 we use to submit results computed its own "build time" when they're called.
393 An unintended consequence of this change was revealed when we moved a buildbot master to the new machine
394 last week; new reports were wrongfully associated with old build numbers.
396 Fixed the bug by not allowing reports made more than 1 day after the initial build time to be assigned
397 to the same build. Instead, we create a new build object for those reports. Since the longest set of
398 tests we have only take a couple of hours to run, 24 hours should be more than enough.
400 * database/init-database.sql: We can no longer constrain that each build number is unique to a builder
401 or that build number and build time pair is unique. Instead, constrain the uniqueness of the tuple
402 (builder, build number, build time).
404 * public/api/report.php:
405 (ReportProcessor::resolve_build_id): Look for any builds made within the past one day. Create a new build
406 when no such build exists. This prevents a report from being associated with a very old build of the same
409 Also check that revision numbers or hashes match when we're adding revision info. This will let us catch
410 a similar bug in the future sooner.
412 * tests/api-report.js: Added three test cases.
414 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
416 Merged the upstream changes to db.php
417 See http://trac.webkit.org/browser/trunk/Websites/test-results/public/include/db.php
419 * public/include/db.php:
421 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
423 Update other scripts and tests per previous patch.
425 * public/include/manifest.php:
426 * tests/admin-regenerate-manifest.js:
428 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
432 Reviewed by Ricky Mondello.
434 This column is no longer used by the front-end code since r48360.
436 * database/init-database.sql:
437 * public/admin/tests.php:
439 2014-01-16 Ryosuke Niwa <rniwa@webkit.org>
441 Unreviewed build fix.
443 * public/api/report.php:
445 2014-01-15 Ryosuke Niwa <rniwa@webkit.org>
447 <rdar://problem/15832456> Automate DoYouEvenBench (124497)
449 Reviewed by Ricky Mondello.
451 Support a new alternative format for aggregated results where we have raw values as well as
452 the list aggregators so that instead of
453 "metrics": {"Time": ["Arithmetic"]}
455 "metrics": {"Time": { "aggregators" : ["Arithmetic"], "current": [300, 310, 320, 330] }}
457 This allows single JSON generated by run-perf-tests in WebKit to be shared between the perf
458 dashboard and the generated results page, which doesn't know how to aggregate values.
460 We need to keep the support for the old format because all other existing performance tests
461 all rely on the old format. Even if we updated the tests, we need the dashboard to support
462 the old format during the transition.
464 * public/api/report.php:
465 (ReportProcessor::recursively_ensure_tests): Support the new format in addition to the old one.
466 (ReportProcessor::aggregator_list_if_exists): Replaced is_list_of_aggregators.
468 * tests/api-report.js: Updated one of aggregator test cases to test the new format.
470 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
472 Unreviewed; Tweak the CSS so that chart panes align vertically.
476 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
478 SafariPerfMonitor should support Combined metric.
480 * public/js/helper-classes.js:
481 (PerfTestRuns): Added 'Combined' metric. In general, it could be used for smaller-is-better
482 value as well but assume it to be greater-is-better for now.
484 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
486 Commit the forgotten init-database change to add iteration_relative_time.
488 * database/init-database.sql:
490 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
492 <rdar://problem/13993069> SafariPerfMonitor: Support accepting (relative time, value) pairs
494 Reviewed by Ricky Mondello.
496 Add the support for each value to have a relative time. This is necessary for frame rate history
497 since a frame rate needs to be associated with a time it was sampled.
499 * database/init-database.sql: Added iteration_relative_time to run_iterations.
501 * public/api/report.php:
502 (TestRunsGenerator::test_value_list_to_values_by_iterations): Reject any non-numeral values here.
503 This code is used to aggregate values but it doesn't make sense to aggregate iteration values
504 with relative time since taking the average of two frame rates for two subtests taken at two
505 different times doesn't make any sense.
506 (TestRunsGenerator::compute_caches): When we encounter an array value while computing sum, mean,
507 etc..., use the second element since we assume values are of the form (relative time, frame rate).
508 Also exit early with an error if the number of elements in the array is not a pair.
509 (TestRunsGenerator::commit): Store the relative time and the frame rate as needed.
511 * tests/api-report.js: Added a test case. Also modified existing test cases to account for
512 iteration_relative_time.
514 2013-05-27 Ryosuke Niwa <rniwa@webkit.org>
516 <rdar://problem/13654488> SafariPerfMonitor: Support accepting single-value results
518 Reviewed by Ricky Mondello.
520 Support that. It's one line change.
522 * public/api/report.php:
523 (ReportProcessor.recursively_ensure_tests): When there is exactly one value, wrap it inside an array
524 to match the convention assumed elsewhere.
525 * tests/api-report.js: Added a test case.
527 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
529 SafariPerfMonitor shows popups for points outside of the visible region.
531 Rubber-stamped by Simon Fraser.
534 (Chart.closestItemForPageXRespectingPlotOffset): renamed from closestItemForPageX.
535 (Chart.attach): Always use closestItemForPageXRespectingPlotOffset to work around the fact flot
536 may return an item underneath y-axis labels.
538 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
540 Tweak the CSS a little to avoid the test name overlapping with the summary table.
544 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
546 Unreviewed. Fix the typo. The anchor element should wrap the svg element, not the other way around.
550 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
552 <rdar://problem/13992266> Should be a toggle to show entire Y-axis range
553 <rdar://problem/13992271> Should scale Y axis to include error ranges
555 Reviewed by Ricky Mondello.
557 Add the feature. Also made adjust y-axis respect confidence interval delta so that the gray shade behind
558 the main graph doesn't go outside the graph even when the y-axis is adjusted.
560 * database/config.json:
562 (Chart): Add a SVG arrow to toggle y-axis mode, and bind click on the arrow to toggleYAxis().
563 (Chart.attachMainPlot): Respect shouldStartYAxisAtZero.
564 (Chart.toggleYAxis): Toggle the y-axis mode of this chart by toggling shouldStartYAxisAtZero and calling
566 * public/js/helper-classes.js:
567 (PerfTestResult.confidenceIntervalDelta):
568 (PerfTestResult.unscaledConfidenceIntervalDelta): Extracted.
569 (PerfTestRuns.min): Take confidence interval delta into account.
570 (PerfTestRuns.max): Ditto.
571 (PerfTestRuns.hasConfidenceInterval): Not sure why this function was checking the typeof. Just use isNaN.
573 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
575 A build fix of the previous. Don't look for a test with NULL parent because NULL != NULL in our beloved SQL.
577 * public/api/report.php:
578 (ReportProcessor::recursively_ensure_tests):
579 * tests/api-report.js: Added a test.
581 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
583 Unreviewed build fixes.
585 * public/api/report.php:
586 (ReportProcessor::process): Explicitly exit with error when builder name or build time is missing.
587 Also, tolerate reports without any revision information.
589 (ReportProcessor::recursively_ensure_tests): When looking for a test, don't forget to compare its
592 * tests/api-report.js: Added few test cases.
594 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
596 Commit another change that was supposed to be committed in r50331.
599 (TestEnvironment.this.postJSON):
600 (TestEnvironment.this.httpGet):
603 2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
605 Commit the remaining files.
607 * public/admin/regenerate-manifest.php:
608 * public/include/admin-header.php:
609 * public/include/json-header.php:
610 * public/include/manifest.php:
612 (TestEnvironment.this.postJSON):
613 (TestEnvironment.this.httpGet):
616 2013-03-15 Ryosuke Niwa <rniwa@webkit.org>
618 SafariPerfMonitor: Add some tests for admin/regenerate-manifest.
620 Reviewed by Ricky Mondello.
622 Added some tests for admin/regenerate-manifest.
624 * public/admin/regenerate-manifest.php: Use require_once instead of require.
625 * public/include/admin-header.php: Ditto.
626 * public/include/json-header.php: Ditto.
628 * public/include/manifest.php:
629 (ManifestGenerator::builders): Removed a reference to a non-existent variable.
630 When there are no builders, simply return an empty array.
633 (TestEnvironment.postJSON):
634 (TestEnvironment.httpGet): Added.
635 (sendHttpRequest): Renamed from postHttpRequest as it now takes method as an argument.
637 * tests/admin-regenerate-manifest.js: Added with a bunch of test cases.
639 2013-03-14 Ryosuke Niwa <rniwa@webkit.org>
641 Unreviewed. Added more tests for api/report to ensure it creates tests, metrics, test_runs,
642 and run_iterations. Also fixed a typo in report.php found by new tests.
644 * public/api/report.php:
645 (main): Fix a bug in the regular expression to wrap numbers with double quotations.
646 * tests/api-report.js: Added more test cases.
648 2013-03-12 Ryosuke Niwa <rniwa@webkit.org>
650 <rdar://problem/13399038> SafariPerfMonitor: Need integration tests
652 Reviewed by Ricky Mondello.
654 Add a test runner script and some simple test cases.
656 * database/config.json: Added the configuration for "testServer".
657 * database/database-common.js:
658 (pathToTests): Added.
659 * run-tests.js: Added.
662 (confirmUserWantsDatabaseToBeInitializedIfNeeded): Checks whether there are any non-empty tables,
663 and if there are, asks the user if it’s okay to delete all of the data contained therein.
664 (confirmUserWantsDatabaseToBeInitializedIfNeeded.findNonEmptyTable): Find a table with non-zero
666 (confirmUserWantsDatabaseToBeInitializedIfNeeded.fetchTableNames): Fetch the list of all tables
667 in the current database using PostgreSQL's information_schema.
668 (askYesOrNoQuestion):
670 (initializeDatabase): Executes init-database.sql. It drops all tables and creates them again.
672 (TestEnvironment): The global object exposed in tests. Provides various utility functions.
673 (TestEnvironment.assert): Exposes assert to tests.
674 (TestEnvironment.console): Exposes console to tests.
675 (TestEnvironment.describe): Adds a description.
676 (TestEnvironment.it): Adds a test case.
677 (TestEnvironment.postJSON):
678 (TestEnvironment.queryAndFetchAll):
679 (TestEnvironment.sha256):
680 (TestEnvironment.notifyDone): Ends the current test case.
684 (TestContext): An object created for each test case. Conceptually, this object is always on
685 "stack" when a test case is running. TestEnvironment and an uncaughtException handler accesses
686 this object via currentTestContext.
687 (TestContext.description):
689 (TestContext.logError):
692 * tests/api-report.js: Added some basic tests for /api/report.php.
694 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
696 Unreviewed administrative page fix. Make it possible to remove all configuration from dashboard.
698 The problem was that we were detecting whether we're updating dashboard or not by checking
699 the existence of metric_configurations in $_POST but this key doesn't exist when we're removing
700 all configurations. Use separate 'dashboard' action to execute the code even when
701 metric_configurations is empty.
703 * public/admin/tests.php:
705 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
707 SafariPerfMonitor: Extract a class to aggregate and store values from ReportProcessor.
709 Reviewed by Ricky Mondello.
711 This patch extracts TestRunsGenerator, which aggregates and compute caches of values,
712 from ReportProcessor as a preparation to replace deprecated aggregate.js.
714 * public/api/report.php:
715 (ReportProcessor::exit_with_error): Moved.
716 (ReportProcessor::process): Use the extracted TestRunsGenerator.
717 (TestRunsGenerator): Added.
718 (TestRunsGenerator::exit_with_error): Copied from ReportProcessor.
719 (TestRunsGenerator::add_aggregated_metric): Moved.
720 (TestRunsGenerator::add_values_for_aggregation): Moved. Made public.
721 (TestRunsGenerator::aggregate): Moved. Made public.
722 (TestRunsGenerator::aggregate_current_test_level): Moved.
723 (TestRunsGenerator::test_value_list_to_values_by_iterations): Moved.
724 (TestRunsGenerator::evaluate_expressions_by_node): Moved.
725 (TestRunsGenerator::compute_caches): Moved. Made public.
726 (TestRunsGenerator::add_values_to_commit): Moved. Made public.
727 (TestRunsGenerator::commit): Moved. Made public. Also takes build_id and platform_id.
728 (TestRunsGenerator::rollback_with_error): Moved.
730 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
732 SafariPerfMonitor: Administrative pages should update manifest JSON as needed.
734 Reviewed by Remy Demarest.
736 Regenerate the manifest file when updating fields or adding new items that are included in
739 * public/admin/bug-trackers.php:
740 * public/admin/builders.php:
741 * public/admin/regenerate-manifest.php:
742 * public/admin/repositories.php:
743 * public/admin/tests.php:
744 * public/include/admin-header.php:
745 (regenerate_manifest): Extracted from regenerate-manifest.php.
747 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
749 Unreviewed build fix for memory test results.
751 Make aggregation work in the nested cases. We start from the "leaf" tests and move our ways up,
752 aggregating at each level.
754 * public/api/report.php:
755 (ReportProcessor::recursively_ensure_tests):
756 (ReportProcessor::add_aggregated_metric): Renamed from ensure_aggregated_metric.
757 (ReportProcessor::add_values_for_aggregation):
758 (ReportProcessor::aggregate):
759 (ReportProcessor::aggregate_current_test_level): Extracted from aggregate.
761 2013-03-02 Ryosuke Niwa <rniwa@webkit.org>
763 Build fixes. iteration_count_cache should be the total number of values in all iteration group,
764 not the number of iteration groups. Also, don't set group number when the entire run belongs
765 a single iteration group.
767 * public/api/report.php:
768 (ReportProcessor::commit):
770 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
772 SafariPerfMonitor: Introduce iteration groups
774 Reviewed by Remy Demarest.
776 In WebKit land, we're going to use multiple instances of DumpRenderTree or WebKitTestRunner to amortize
777 the runtime environment variances to get more stable results. And it's desirable to keep track of
778 the instance of DumpRenderTree or WebKitTestRunner used to generate each iteration value.
780 This patch introduces "iteration groups" to keep track of this extra information.
782 Instead of receiving a flat array of iteration values, we can now receive a two dimensional array where
783 the outer array denotes iteration groups and each inner array contains iteration values for each group.
786 * database/init-database.sql: Add iteration_group column.
787 * public/api/report.php:
788 (ReportProcessor::recursively_ensure_tests): Always use the two dimensional array internally.
790 (ReportProcessor::aggregate): test_value_list_to_values_by_iterations now returns an associative array
791 contains the list of values indexed by the iteration order and group sizes. Store the group size so
792 that we can restore the iteration groups before passing it to node.js and restore them later.
794 (ReportProcessor::test_value_list_to_values_by_iterations): Flatten iteration groups into an array
795 of values and construct group_size array to restore the groups later in ReportProcessor::aggregate.
797 Also check that each iteration group in each subtest are consistent with one another. To see why we need
798 to do this, suppose we're aggregating two tests T1 and T2 with the following values. Then it's important
799 that each iteration group in T1 and T2 have the same size:
800 T1 = [[1, 2], [3, 4, 5]]
801 T2 = [[6, 7], [8, 9, 10]]
803 so that the aggregated result (the sum in this case) can have the same groups as in:
804 T = [[7, 9], [11, 13, 15]]
806 If some iteration groups in T1 and T2 had a different size as in:
807 T1 = [[1, 2, 3], [4, 5]]
808 T2 = [[6, 7], [8, 9, 10]]
810 Then iteration groups of the aggregated T is ambiguous.
812 (ReportProcessor::compute_caches): Flatten iteration groups to compute caches (e.g. mean, stdev, etc...)
813 (ReportProcessor::commit): Store iteration_group values.
815 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
817 Unreviewed. Delete the migration tool for webkit-perf.appspot.com now that we have successfully
818 migrated to perf.webkit.org.
820 * database/perf-webkit-migrator.js: Removed.
822 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
824 Build fix. Don't forget to add metrics of the top level tests e.g. Dromaeo:Time:Arithmetic.
829 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
831 SafariPerfMonitor: Make it possible to add charts for all subtests or all platforms.
833 Reviewed by Ricky Mondello.
835 It is often desirable to see charts of a given test for all platforms, or to be able to see
836 charts of all subtests on a given platform when trying to triage perf. regressions.
838 Support this use case by adding the ability to do so on the charts page.
840 Also, we used to disable items on the test list based on the platform chosen. This turned out
841 to be a bad UI because in many situations you want to be able to compare results of the same test
842 on multiple platforms.
844 In this new UI, we have three select elements, each of which selects the following:
845 1. Top-level test - Test suite such as Dromaeo
846 2. Metric - Pages and subtests under the suite such as www.webkit.org for dom-modify:Runs
847 (where dom-modify is the name of the subtest and Runs is a metric in that subtest) for Dromaeo.
848 3. Platform - Mountain Lion, Qt, etc...
850 A user can select "all" for metric and platform but we disallow doing both at once since adding
851 all metrics on all platforms tends to add way too many charts and hang the browser. I also can't
852 think of a use case where you want to look at that many charts at once. We can support this later
853 if valid use cases come up.
856 (.showCharts.addOption): Extracted.
857 (.showCharts): Added "metricList" that shows the list of test and metrics (in the form of
858 relative metrics paths such as "DOMWalk:Time") for each top-level test selected in testList.
859 metricList has onchange handler that enables/disables items on platformList.
861 (init): Sort tests and test metrics here instead of doing that in showCharts.
863 2013-02-28 Ryosuke Niwa <rniwa@webkit.org>
865 <rdar://problem/13316756> SafariPerfMonitor: tooltip should include a link to build URLs
867 Reviewed by Remy Demarest and Ricky Mondello.
869 Added a hyperlink to build page in tooltips. Repeating the entire build URL in each build
870 was a bad idea because it bloats the resultant JSON file too much. So move the build URL
871 templates to the manifest file instead. Each build now only contains the builder id.
873 * public/api/runs.php: Removed the part of the query that joined builders table. This
874 speeds up the query quite a bit.
876 * public/include/manifest.php:
877 (ManifestGenerator::generate): Generate builders field.
878 (ManifestGenerator::builders): Added. Returns an associative array of builder ids to an
879 associative array that contains name and its build URL template.
882 (.buildLabelWithLinks.linkifyIfNotNull): Renamed from linkifiedLabel. Take a label and url
883 instead of a revision since this function is used for revisions and build page URLs now.
884 (.buildLabelWithLinks): Include the linkified build number.
886 * public/js/helper-classes.js:
887 (TestBuild.builder): Added.
888 (TestBuild.buildNumber): Added.
889 (TestBuild.buildUrl): Returns the build URL. The variable name in the URL template has been
890 changed from %s to $buildNumber to be more descriptive and consistent with other URL templates.
892 2013-02-27 Ryosuke Niwa <rniwa@webkit.org>
894 Tooltips interfere with user interactions
896 Rubber-stamped by Simon Fraser.
898 Disable tooltip on the dashboard page since graphs are too small to be useful there.
899 Also, show graphs for only 10 days by default as opposed to 20.
900 Finally, dismiss the hovering tooltip when mouse enters a "pinned" tooltip.
903 * public/js/helper-classes.js:
905 2013-02-24 Ryosuke Niwa <rniwa@webkit.org>
907 Fix some serious typo. We're supposed to be using SHA-256, not SHA-1 to hash our passwords,
908 to be compatible with webkit-perf.appspot.com.
910 * public/admin/builders.php:
911 * public/api/report.php:
913 2013-02-23 Ryosuke Niwa <rniwa@webkit.org>
917 Add a missing constraint on builds table. For a given builder, there should be exactly
918 one build for a given build number.
920 Also add report_committed_at to reports table to record the time at which a given report
921 was processed and test_runs and run_iterations rows were committed into the database.
923 * database/config.json:
924 * public/api/report.php:
926 2013-02-22 Ryosuke Niwa <rniwa@webkit.org>
928 Unreviewed. Add more checks for empty SQL query results.
930 * public/include/manifest.php:
932 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
934 More build fixes on perf.webkit.org.
936 * public/api/runs.php: Make PostgreSQL happier.
937 * public/include/manifest.php: Don't assume we always have bug trackers.
939 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
941 SafariPerfMonitor: index.html duplicates the code in PerfTestRuns to determine smallerIsBetter
942 and fix other miscellaneous UI bugs.
944 Rubber-stamped by Simon Fraser.
946 Removed the code to determine whether smaller value is better or not for a given test in index.html
947 in the favor of using that of PerfTestRuns.
949 * public/include/manifest.php: Fixed a typo.
952 (Chart.attachMainPlot): Fixed a bug to access previousPoint.left even when previousPoint is null.
954 * public/js/helper-classes.js:
955 (PerfTestRuns): Added EndAllocations, MaxAllocations, and MeanAllocations.
957 (PerfTestRuns.computeScalingFactorIfNeeded): When the mean is almost 10,000 units, we may end up
958 using 5 digits instead of 4, resulting in the use of scientific notations. Go up to the next unit
959 at roughly 2,000 units to avoid this.
961 (Tooltip.show): Show the tooltip even when the new content is identical to the previous content.
962 The only thing we can avoid is innerHTML.
964 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
966 Another build fix. The path to node is /usr/local/bin/node, not /usr/bin/local/node
968 * public/include/evaluator.js:
970 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
972 <rdar://problem/13267898> SafariPerfMonitor: Bug trackers should be configurable
974 Reviewed by Remy Demarest.
976 Made the list of bug trackers configurable. Namely, each bug tracker can be added in
977 admin/bug-trackers.php and can be associated with multiple repositories.
979 The association between bug trackers and repositories (such as WebKit, Safari, etc...) are used
980 to determine the set of bug trackers to show for a given set of blame lists.
981 e.g. if a test regressed due to a change in Safari, then we don't want to show WebKit Bugzilla as
982 a place to file bugs against the regression.
984 * database/init-database.sql: Added bug_trackers and tracker_repositories.
985 Also drop those tables before creating them (note "DROP TABLE reports" was missing).
987 * public/admin/bug-trackers.php: Added. The administrative interface for adding and managing
988 bug trackers, namely associated repositories.
990 * public/include/admin-header.php: Added a link to bug-trackers.php
991 * public/include/manifest.php:
992 (ManifestGenerator::generate): Include the list of bug trackers in the manifest.
993 Also moved the code to fetch repositories table here from ManifestGenerator::repositories.
995 (ManifestGenerator::repositories):
997 (ManifestGenerator::bug_trackers): Added. Generates an associative array of bug trackers where
998 keys are names of bug trackers and values are associative arrays with keys 'new_bug_url' and
999 'repositories' where the latter contains the list of associated repository names.
1001 * public/index.html:
1002 (Chart): Takes bugTrackers as as argument.
1003 (Chart.showTooltipWithResults): Removed the hard-coded list.
1005 (init.addPlatformsToDashboard):
1006 (init.showCharts.createChartFromListPair):
1007 (init): Stores the list of bug trackers in the manifest to a local variable.
1009 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
1011 A follow up on the previous build fix. When using proc_open, we need to make evalulator.js executable.
1013 * public/include/evaluator.js:
1015 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
1017 SafariPerfMonitor: Extract the code to generate tabular view in administrative pages
1019 Reviewed by Remy Demarest.
1021 Extracted AdministrativePage to share the code to generate a tabular view of data and a form to insert
1022 new row into the database.
1024 * public/admin/aggregators.php: Use AdministrativePage.
1025 * public/admin/builders.php: Ditto.
1026 * public/admin/repositories.php: Ditto.
1027 * public/include/admin-header.php:
1028 (AdministrativePage): Added.
1029 (AdministrativePage::__construct): column_info is an associative array that maps a SQL column name
1030 to an associative array that describes the column.
1031 - editing_mode: Specifies the type of form ('text', 'url', or 'string') to show for this column.
1032 - label: Human readable name of the column.
1033 - pre_insertion: Signifies that this column exists only before the row is inserted. e.g. password
1034 column exists only before we create password_hash column at the insertion time.
1036 (AdministrativePage::name_to_titlecase): Converts an underscored lowercase name to a human readable
1037 titlecase (e.g. new_bug is converted to New Bug).
1038 (AdministrativePage::column_label): Obtains the label specified in column_info or titlecased column name.
1039 (AdministrativePage::render_form_control_for_column): "Renders" a text form control such as input and
1040 textarea for a given editing mode ('text', 'url', or 'string').
1041 (AdministrativePage::render_table): Renders a whole SQL table after sorting rows by the specified column.
1042 (AdministrativePage::render_form_to_add): Renders a form to insert new row.
1044 2013-02-20 Ryosuke Niwa <rniwa@webkit.org>
1046 Build fix. Some systems don't support r+. Use proc_open instead.
1048 * public/api/report.php:
1050 2013-02-15 Ryosuke Niwa <rniwa@webkit.org>
1052 Build fix. Use the mean data series as supposed to upper or lower confidence bounds
1053 when computing the y-axis of data points to show tooltips at.
1055 * public/index.html:
1057 2013-02-15 Ryosuke Niwa <rniwa@webkit.org>
1059 Unreviewed. Removed .htaccess in favor of directly putting directives in httpd.conf.
1062 * public/.htaccess: Removed.
1064 2013-02-14 Ryosuke Niwa <rniwa@webkit.org>
1068 * public/include/manifest.php: Build fix. db is on this.
1069 * public/js/statistics.js:
1070 (Statistics.confidenceInterval): Added. An utility function for debugging purposes.
1072 2013-02-13 Ryosuke Niwa <rniwa@webkit.org>
1074 <rdar://problem/13165667> SafariPerfMonitor doesn't work on perf.webkit.org (Part 2)
1076 Reviewed by Anders Carlsson.
1078 Rewrote and merged populate-from-report.js into report.php.
1080 * database/config.json: Added a path to node.js.
1082 * database/init-database.sql: Don't require unit to be always present since it's no longer used by the front end.
1083 Once we land this patch and update the administrative pages, we can remove this column.
1085 Also add a new reports table to store JSON reported by builders. We used to store everything in jobs table but
1086 that table is going away once we remove the node.js backend.
1088 * database/populate-from-report.js: Removed.
1089 * public/api/report.php: Added.
1091 (ReportProcessor.__construct):
1092 (ReportProcessor.process):
1094 (ReportProcessor.store_report_and_get_build_data): We store the report into the database as soon as it has been
1095 verified to be submitted by a known builder.
1097 (ReportProcessor.exit_with_error): Store the error message and details in the database if the report had been
1098 stored. If not, then notify that to the client via 'failureStored' in the JSON response.
1099 (ReportProcessor.resolve_build_id): Insert build and build_revisions rows if needed. We don't do this atomically
1100 inside a transaction because there could be multiple reports for a single build, each containing results for
1103 (ReportProcessor.recursively_ensure_tests): Parse a tree of tests and insert tests and test_metrics rows as
1104 needed. It also computes the metrics to aggregate and prepares values to commit via ensure_aggregated_metric,
1105 add_values_to_commit, and add_values_for_aggregation.
1107 (ReportProcessor.is_list_of_aggregators): When a metric is an aggregation, it contains an array of aggregator
1108 names, e.g. ["Arithmetic", "Geometric"], instead of a dictionary of configuration types to their values,
1109 e.g. {Time: {current: [1, 2, 3,]}}. This function detects the former. (Note that dictionary and list are both
1112 (ReportProcessor.ensure_aggregated_metric): Create a metric with aggregator to add it to the list of metrics
1113 to be aggregated in ReportProcessor.aggregate.
1115 (ReportProcessor.add_values_for_aggregation): Called by test metrics with aggregated parent test metrics.
1117 (ReportProcessor.aggregate): Compute results for aggregated metrics. Consider a matrix with rows representing
1118 child tests and columns representing "iterations" for a given aggregated metrics M. Initially, we have values
1119 given for each row (child metrics of M). This function extracts each column (iteration) via
1120 test_value_list_to_values_by_iterations, and feeds it into evaluate_expressions_by_node to get aggregated values
1121 for each column (iteration of M). Finally, it registers those aggregated values to be committed.
1123 Note that we don't want to start a new node.js process for each aggregation, so we accumulate all values to be
1124 aggregated in node.js in $expressions. Each entry in $expressions is a JSON string that contains code and
1125 values to be aggregated. node.js gives us back a list of JSON strings that contain aggregated values.
1127 (ReportProcessor.test_value_list_to_values_by_iterations): See above.
1128 (ReportProcessor.evaluate_expressions_by_node): See above.
1130 (ReportProcessor.compute_caches): Compute cached mean, sum, and square sums for each run we're about to add
1131 using evaluate_expressions_by_node. We can't do this before computing aggregated results since those aggregated
1132 results also need the said caches.
1134 (ReportProcessor.add_values_to_commit):
1136 (ReportProcessor.commit): Add test_runs and run_iterations atomically inside a transaction, rolling back
1137 the transaction as needed if anything goes wrong.
1139 (ReportProcessor.rollback_with_error)
1141 * public/include/db.php:
1142 (Database.prepare_params): Use $values (instead of $placeholders) to compute the current index since
1143 placeholders ($1, $2, etc...) may be split up into multiple arrays given they may not necessarily show up
1144 contiguously in a SQL statement.
1146 (Database.select_or_insert_row): Added. Selects a row if the attempt to insert the same row fails. It
1147 automatically creates a query string from a dictionary of unprefixed column names and table. It returns
1148 a column value of the choice.
1150 (Database.begin_transaction): Added.
1151 (Database.commit_transaction): Added.
1152 (Database.rollback_transaction): Added.
1154 * public/include/evaluator.js: Added.
1155 * public/include/json-header.php:
1156 (exit_with_error): Take error details and merge it with "additional details". This allows report.php to provide
1157 context under which the request failed.
1158 (successful_exit): Merge "additional details".
1159 (set_exit_detail): Added. Sets "additional details" to the JSON returned by exit_with_error or successful_exit.
1160 (merge_additional_details):
1162 2013-02-12 Ryosuke Niwa <rniwa@webkit.org>
1164 SafariPerfMonitor: Add more helper functions to db.php
1166 Reviewed by Remy Demarest.
1168 Added Database::insert_row and array_get to make common database operations easier.
1170 * public/admin/aggregators.php: Use Database::insert_row instead of
1171 execute_query_and_expect_one_row_to_be_affected.
1173 * public/admin/builders.php: Ditto.
1175 * public/admin/tests.php: Ditto; We used to run a separate SELECT query just to get the id after
1176 inserting a row. With insert_row, we don't need that.
1178 * public/include/admin-header.php: Ditto.
1180 * public/include/db.php:
1181 (array_get): Added. It returns the value of an array given a key if the key exists; otherwise
1182 return the default value (defaults to NULL) if the key doesn't exist.
1184 (Database::column_names): Added. Prefixes an array of column names and creates a comma separated
1187 (Database::prepare_params): Added. Takes an associative array of column names and their values,
1188 and builds up arrays for placeholder (e.g. $1, $2, etc...) and values, then returns an array of
1189 column names all in the same order.
1191 (Database::insert_row): Added. Inserts a new row into the specified table where column names have
1192 the given prefix. Values are given in a form of an associative array where keys are unprefixed
1193 column names and values are corresponding values. When the row is successfully inserted, it returns
1194 the specified column's value (defaults to prefix_id). If NULL is specified, it returns a boolean
1195 indicating the success of the insertion.
1197 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
1199 <rdar://problem/13165667> SafariPerfMonitor doesn't work on perf.webkit.org (Part 1)
1201 Reviewed by Conrad Shultz.
1203 Rewrote the manifest generator in PHP.
1205 * database/generate-manifest.js: Removed.
1206 * public/admin/regenerate-manifest.php: Added. Use ManifestGenerator to generate and store the manifest.
1207 * public/include/db.php:
1208 (array_ensure_item_has_array): Added.
1209 * public/include/evaluator.js: Added.
1210 * public/include/json-header.php:
1211 * public/include/manifest.php: Added.
1213 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
1215 Dates on overflow plot are overlapping
1217 Rubber-stamped by Simon Fraser.
1219 Don't show more than 5 days.
1221 * public/index.html:
1222 * public/js/helper-classes.js:
1223 (TestBuild.UTCtoPST):
1226 2013-02-07 Ryosuke Niwa <rniwa@webkit.org>
1228 Show build time as well as commit time on the dashboard and tooltips.
1230 Rubber-stamped by Simon Fraser.
1232 Include both the maximum commit time and build time in buildLabelWithLinks.
1233 Also use ISO format to save the screen real estate.
1235 * public/index.html:
1236 (buildLabelWithLinks):
1237 * public/js/helper-classes.js:
1239 (TestBuild.buildTime):
1240 (TestBuild.formattedBuildTime):
1242 2013-02-08 Ryosuke Niwa <rniwa@webkit.org>
1244 Unreviewed; Convert metric.name to metric.unit in the front end.
1246 * public/js/helper-classes.js:
1248 2013-02-07 Ryosuke Niwa <rniwa@webkit.org>
1250 <rdar://problem/13166276> SafariPerfMonitor: Need hyperlinks to file bugs
1252 Rubber-stamped by Simon Fraser.
1254 This patch adds hyperlinks to file new bugs on Radar and WebKit Bugzilla. Because we want to include information
1255 such as the degree of progression or regression and the regression ranges when filing new bugs, broke various
1256 label() functions into smaller pieces to be used in both generating tooltips and the hyperlinks.
1258 * public/index.html:
1259 (.buildLabelWithLinks): Extracted from TestBuild.label.
1260 (.showTooltipWithResults): Extracted from Tooltip.show. Also added the code to generate hyperlinks to file new bugs
1261 on Radar and WebKit Bugzilla.
1262 * public/js/helper-classes.js:
1263 (PerfTestResult.metric): Replaced test() as runs.test() no longer exists.
1264 (PerfTestResult.isBetterThan): Added.
1265 (PerfTestResult.formattedRelativeDifference): Extracted from PerfTestResult.label.
1266 (PerfTestResult.formattedProgressionOrRegression): Ditto. Also use "better" and "worse" instead of arrow symbols
1267 to indicate progressions or regressions.
1268 (PerfTestResult.label):
1269 (TestBuild.formattedTime): Added.
1270 (TestBuild.platform): Added.
1271 (TestBuild.formattedRevisions): Extracted from TestBuild.label. Merged a part of linkifyLabel.
1272 (TestBuild.smallerIsBetter): Added.
1273 (Tooltip.show): Take a raw markup instead of two results.
1275 2013-02-06 Ryosuke Niwa <rniwa@webkit.org>
1277 <rdar://problem/13151520> SafariPerfMonitor: Dashboard can cause excessive horizontal scrolling when there are many platforms
1279 Rubber-stamped by Tim Horton.
1281 Stack platforms when there are more than 3 of them since making the layout adaptive is tricky
1282 since each platform may have a different number of tests to be shown on the dashboard.
1284 * public/index.html:
1286 2013-02-05 Ryosuke Niwa <rniwa@webkit.org>
1288 Build fix. Don't prefix a SVn revision with 'r' when constructing a changeset / blame URL.
1290 * public/js/helper-classes.js:
1293 2013-02-05 Ryosuke Niwa <rniwa@webkit.org>
1295 SafariPerfMonitor: repository names or revisions are double-quoted when they contain a space
1297 Rubber-stamped by Tim Horton.
1299 The bug was in the PHP code that parsed Postgres array. Trim double quotations as needed.
1301 Also fixed a bug in TestBuild where we used to show the revision range as r1234-1250 when
1302 the revision r1234 was the revision used in the previous build.
1304 * public/api/runs.php:
1305 (parse_revisions_array): Trim double quotations around repository names and revisions.
1306 * public/js/helper-classes.js:
1309 2013-02-05 Ryosuke Niwa <rniwa@webkit.org>
1311 <rdar://problem/13151558> SafariPerfMonitor: Tooltip is unusable
1313 Rubber-stamped by Tim Horton.
1315 * public/index.html:
1316 (Chart.attachMainPlot): Disable auto highlighting (circle around a data point that shows up on hover)
1317 on the dashboard page as it's way too noisy.
1319 (Chart.hideTooltip): Added. Hides the tooltip that shows up on hover.
1321 (.toggleClickTooltip): Extracted from the code for "mouseout" bind (now replaced by "mouseleave").
1322 Pins or unpins a tooltip. When pinning a tooltip, we create a tooltip behind the scene and show that
1323 so that the tooltip for hover can be reused further.
1325 (.closestItemForPageX): Find the closest item given pageX. We iterate data points from left to right,
1326 and find the first point that lies on the right of the cursor position. We then compute the midpoint
1327 between this and the previous point and pick the closer of the two. It returns an item-like object
1328 that has all properties we need since flot doesn't provide an API to retrieve the real item object.
1330 (Chart): Call toggleClickTooltip when a (hover) tooltip is clicked.
1332 (Chart.attach): In "plothover" bind, call closestItemForPageX when item is not provided by flot on
1333 the first or "current" data points (as opposed to target or baseline data points).
1335 Also bind the code to clear crosshair and hide tooltips to "mouseleave" instead of "mouseout", and
1336 avoid triggering this code when the cursor is still within the plot's rectangle (e.g. when a cursor
1337 moves onto a tooltip) to avoid the premature dismissal of a tooltip.
1339 * public/js/helper-classes.js:
1340 (Tooltip.ensureContainer): Don't automatically close then the user clicks on tooltip. Delegate this
1341 work to the client via bindClick.
1343 (Tooltip.show): Move tooltip up by 5px. Also added a FIXME to move this offset computation to the client.
1345 (Tooltip.bindClick): Added.
1347 2013-02-03 Ryosuke Niwa <rniwa@webkit.org>
1349 Yet another build fix. metricId*s*.
1351 * public/admin/tests.php:
1353 2013-02-03 Ryosuke Niwa <rniwa@webkit.org>
1355 Another build fix. Use the new payload format for the aggregate job.
1357 * public/admin/tests.php:
1359 2013-02-03 Ryosuke Niwa <rniwa@webkit.org>
1363 * database/aggregate.js: Use variables that actually exist.
1364 * database/database-common.js:
1365 (ensureConfigurationIdFromList): Add the newly added configuration to the list so that subsequent
1366 function calls will find this configuration.
1368 2013-01-31 Ryosuke Niwa <rniwa@webkit.org>
1370 <rdar://problem/13130139> SafariPerfMonitor: Add ReadMe
1372 Reviewed by Ricky Mondello.
1374 Turned InstallManual into a proper markdown document and added ReadMe.md.
1376 * InstallManual: Removed.
1377 * InstallManual.md: Moved from InstallManual.
1380 2013-01-31 Ryosuke Niwa <rniwa@webkit.org>
1382 <rdar://problem/13109335> SafariPerfMonitor: Add baseline and target lines
1384 Reviewed by Ricky Mondello.
1386 This patch prepares the front end code to process baseline and target results properly.
1388 * public/index.html:
1389 (fetchTest.createRunAndResults): Extracted.
1390 (fetchTest): Call createRunAndResults on current, baseline, and target values of the JSON.
1391 Deleted the comment about how sorting will be unnecessary once we start results in the server side
1392 since sorting by the maximum revision commit time turned out to be non-trivial in php.
1394 2013-01-29 Ryosuke Niwa <rniwa@webkit.org>
1396 <rdar://problem/13057071> SafariPerfMonitor: Use newer version of flot that supports timezone properly
1398 Reviewed by Tim Horton.
1400 Use flot at https://github.com/flot/flot/commit/ec168da2cb8619ebf59c7e721d12c44a7960ff41.
1401 These files are "dynamically linked" to our app.
1403 * public/index.html:
1404 * public/js/jquery-1.8.2.min.js: Removed.
1405 * public/js/jquery.colorhelpers.js: Added.
1406 * public/js/jquery.flot.categories.js: Added.
1407 * public/js/jquery.flot.crosshair.js: Added.
1408 * public/js/jquery.flot.errorbars.js: Added.
1409 * public/js/jquery.flot.fillbetween.js: Added.
1410 * public/js/jquery.flot.js: Added.
1411 * public/js/jquery.flot.min.js: Removed.
1412 * public/js/jquery.flot.navigate.js: Added.
1413 * public/js/jquery.flot.resize.js: Added.
1414 * public/js/jquery.flot.selection.js: Added.
1415 * public/js/jquery.flot.stack.js: Added.
1416 * public/js/jquery.flot.symbol.js: Added.
1417 * public/js/jquery.flot.threshold.js: Added.
1418 * public/js/jquery.flot.time.js: Added.
1419 * public/js/jquery.js: Added.
1421 2013-01-29 Ryosuke Niwa <rniwa@webkit.org>
1423 Return NaN instead of throwing when there aren't enough samples.
1425 Reviewed by Sam Weinig.
1427 It's better to return NaN when we don't have enough samples so that we can treat it
1428 as if we don't have any confidence interval.
1430 * public/js/statistics.js:
1433 2013-01-28 Ryosuke Niwa <rniwa@webkit.org>
1435 Build fix. Apparently Safari sometimes appends / at the end of hash location. Remove that.
1437 * public/js/helper-classes.js:
1438 (URLState.parseIfNeeded):
1440 2013-01-28 Ryosuke Niwa <rniwa@webkit.org>
1442 <rdar://problem/13081582> SafariPerfMonitor: Always use parameterized SQL functions in php code
1444 Reviewed by Ricky Mondello.
1446 Parameterized execute_query_and_expect_one_row_to_be_affected and updated the code accordingly.
1448 * public/admin/aggregators.php: Use heredoc.
1449 * public/admin/builders.php:
1450 * public/admin/jobs.php:
1451 * public/admin/repositories.php:
1452 * public/admin/tests.php: Updated the forms to use unprefixed field names to match other pages.
1453 This allows us to use update_field when updating test's url and metric's unit. Changed the action
1454 to regenerate aggregated matrix from "update" to "add" to simplify the dependencies in if-else.
1455 Also removed a stray code to update unit and url simultaneously since it's never used.
1456 * public/include/admin-header.php:
1457 (execute_query_and_expect_one_row_to_be_affected): Added $params. Also automatically convert
1458 empty strings to NULL as it was previously done via $db->quote_string_or_null_if_empty in callers.
1459 (update_field): Moved from repositories.php.
1461 * public/include/db.php:
1462 (quote_string_or_null_if_empty): Removed now that nobody uses this function.
1464 2013-01-25 Ryosuke Niwa <rniwa@webkit.org>
1466 Build fixes. Treat mean, sum, and square sum as float, not int.
1468 Also use 95% confidence interval instead of 90% confidence interval.
1470 * public/api/runs.php:
1471 * public/js/helper-classes.js:
1472 (.this.confidenceIntervalDelta):
1474 2013-01-24 Ryosuke Niwa <rniwa@webkit.org>
1476 Add an administrative page to edit repository information.
1478 Reviewed by Ricky Mondello.
1480 * public/admin/repositories.php: Added.
1481 * public/include/admin-header.php:
1483 2013-01-23 Ryosuke Niwa <rniwa@webkit.org>
1485 <rdar://problem/13067539> SafariPerfMonitor: Automatically create aggregated metrics from builder reports
1487 Reviewed by Ricky Mondello.
1489 Auto-create aggregated matrix such as arithmetic means and geometric means as requested and add a job
1490 to aggregate results for those matrix in populate-from-report.js.
1492 * database/generate-manifest.js:
1493 (.): Include aggregator names such as Arithmetic and Geometric in the list of metrics.
1494 * database/init-database.sql: Remove an erroneous unique constraint. There could be multiple matrix that share
1495 the same test and name (e.g. Dromaeo, Time) with different aggregators (e.g. Arithmetic and Geometric).
1496 * database/populate-from-report.js:
1498 (getReport): No change even though the diff looks as if it moved.
1499 (processReport): Extracted from main. Fetch the list of aggregators, pass that to recursivelyEnsureTestsIdsAndMetricsIds
1500 to obtain the list of aggregated metrics (such as arithmetic means) that need to be passed to aggregate.js
1501 (scheduleJobs): Extracted from processReport. Add a job to aggregate results.
1502 (recursivelyEnsureTestsIdsAndMetricsIds): When a metric is a list of names, assume them as aggregator names,
1503 and add corresponding metrics for them. Note we convert those names to ids using the dictionary we obtained
1505 (ensureMetricId): Take an aggregator id as an argument.
1506 * database/process-jobs.js: Support multiple metric ids and build id. Note that aggregate.js aggregates results
1507 for all builds when the build id is not specified.
1508 * public/admin/tests.php:
1509 * public/index.html: Include the aggregator name in the full name since there could be multiple metrics
1510 of the same name with different aggregators.
1512 2013-01-22 Ryosuke Niwa <rniwa@webkit.org>
1514 Build fix. Don't pass in arguments to in the wrong order.
1516 * database/aggregate.js:
1518 2013-01-21 Ryosuke Niwa <rniwa@webkit.org>
1520 <rdar://problem/13057110> SafariPerfMonitor: x-axis is messed up
1522 Reviewed by Ricky Mondello.
1524 Since the version of flot we use doesn't support showing graphs in the current locate or
1525 in a specific timezone, convert all timestamps to PST manually (Date's constructor will still
1526 treat them as in UTC). We don't want to use the current locate because other websites on
1527 webkit.org assume PST.
1529 Also append this information to build's label.
1531 * public/js/helper-classes.js:
1535 2013-01-21 Ryosuke Niwa <rniwa@webkit.org>
1537 Store test URLs reported by builders.
1539 Reviewed by Ricky Mondello.
1541 * database/populate-from-report.js:
1542 (recursivelyEnsureTestsIdsAndMetricsIds): Pass in the test url.
1543 (ensureTestId): Store the URL.
1545 2013-01-20 Ryosuke Niwa <rniwa@webkit.org>
1547 Yet another build fix; don't blow up even if we didn't have any test configurations.
1549 * public/admin/tests.php:
1551 2013-01-21 Ryosuke Niwa <rniwa@webkit.org>
1553 Build fix; don't instantiate Date when a timestamp wasn't provided.
1555 * database/populate-from-report.js:
1557 2013-01-18 Ryosuke Niwa <rniwa@webkit.org>
1559 Rename SafariPerfDashboard to SafariPerfMonitor and add a install manual.
1561 Reviewed by Tim Horton.
1563 Added an install manual.
1565 * InstallManual: Added.
1567 2012-12-21 Ryosuke Niwa <rniwa@webkit.org>
1569 Minor build fix. Don't unset builderPassword when it's not set.
1571 * public/api/report.php:
1573 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1575 Prettify JSON payloads and make very large payloads not explode the table in jobs.php.
1577 Reviewed by Ricky Mondello.
1579 * public/admin/admin.css: Make a very large payload scrollable.
1580 * public/admin/jobs.php: Format JSONs.
1582 2012-12-19 Ryosuke Niwa <rniwa@webkit.org>
1584 <rdar://problem/12897424> SafariPerfMonitor: Add ability to report results from bots
1586 Reviewed by Ricky Mondello.
1588 Add report.php and populate-from-report.js that process JSON files submitted by builders.
1590 * database/populate-from-report.js: Added.
1592 (getReport): Obtains the payload (the actual report) from "jobs" table.
1593 (recursivelyEnsureTestsIdsAndMetricsIds): "reports.tests" contain a tree of tests, test metrics,
1594 and their results. This function recursively traverses tests and metrics and ensure their ids.
1596 (metricToUnit): Maps a metric name to a unit. This should really be done in the client side since
1597 there is no point in storing unit given that every metric maps to exactly one unit (i.e. the mapping
1598 is a "function" in mathematical sense).
1600 (ensureRepositoryIdsForAllRevisions):
1601 (getIdOrCreateBuildWithRevisions):
1602 (ensureBuildIdAndRevisions): Obtains a build id given a builder name, a build number, and a build time
1603 if one already exists. If not, then inserts a new build and corresponding revisions information (e.g.
1604 build 123 may contain WebKit revision r456789). We don't retrieve rows for revisions since we don't use
1606 (insertRun): Insert new rows into "test_runs" and "run_iterations" tables, thereby recording the new
1607 test results all in a single transaction. This allows us to keep the database consistent in that either
1608 a build has been reported or not at least in "test_runs" and "run_iterations" tables. It'll be ideal if
1609 we could do the same for "builds" and "build_revisions" but that's not a hard requirement as far as
1610 other parts of the application are concerned.
1611 (scheduleQueriesToInsertRun):
1612 * database/process-jobs.js: Add a call to populate-from-report.js.
1613 * public/api/report.php: Added. Adds a new job named "report" to be processed by populate-from-report.js.
1614 * public/include/db.php: Support parameterized query.
1615 * public/include/json-header.php: Always include 'status' in the response so that builder submitting
1616 a test result could confirm that the submission indeed succeeded.
1618 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1620 Rename get(Id)OrCreate*(Id) to ensure*Id as suggested by Ricky on one of his code reviews.
1622 * database/aggregate.js:
1623 * database/database-common.js:
1624 (selectColumnCreatingRowIfNeeded):
1625 (ensureRepositoryId):
1626 (ensureConfigurationIdFromList):
1627 * database/perf-webkit-migrator.js:
1630 (getOrCreateBuildId):
1632 2012-12-17 Ryosuke Niwa <rniwa@webkit.org>
1634 Extract commonly-used functions from aggregate.js and perf-webkit-migrator.js.
1636 Reviewed by Ricky Mondello.
1638 As a preparation to add report.js that processes a JSON file submitted by bots, extract various functions
1639 and classes from aggregate.js and perf-webkit-migrator.js to be shared.
1641 * database/aggregate.js: Extracted TaskQueue and SerializedTaskQueue into utility.js.
1644 (saveAggregatedResults):
1645 * database/database-common.js:
1646 (getIdOrCreatePlatform): Extracted from webkit-perf-migrator.js.
1647 (getIdOrCreateRepository): Ditto.
1648 (getConfigurationsForPlatformAndMetrics): Renamed from fetchConfigurations. Extracted from aggregator.js.
1649 (getIdFromListOrInsertConfiguration): Renamed from getOrInsertConfiguration. Extracted from aggregator.js.
1650 * database/perf-webkit-migrator.js:
1651 * database/utility.js: Added.
1652 (TaskQueue): Extracted from aggregator.js. Fixed a bug that prevented tasks added after start() is called
1653 from being executed.
1654 (TaskQueue.startTasksInQueue): Execute remaining tasks without serializing them. If the queue is empty,
1655 call the callback passed into start().
1656 (TaskQueue.taskCallback): The function each task calls back. Decrement the counter and call statTasksInQueue.
1657 (TaskQueue.addTask):
1659 (SerializedTaskQueue): Unlike TaskQueue, this class executes each task sequentially.
1660 (SerializedTaskQueue.executeNextTask):
1661 (SerializedTaskQueue.addTask):
1662 (SerializedTaskQueue.start):
1664 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1666 Revert erroneously committed changes.
1668 * database/config.json:
1670 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1672 aggregator.js should be able to accept multiple metric ids and a single build id.
1674 Reviewed by Ricky Mondello.
1676 Make aggregator.js accept multiple ids and generate results for single build when bots are
1677 reporting new results.
1679 * database/aggregate.js:
1680 (parseArgv): Added. Returns an object containing the parsed representation of argv,
1681 which currently contains metricIDs and buildIds.
1682 (main): Use parseArgv and processConfigurations
1683 (processPlatform): Use build ids passed in or obtain all builds for the given platform.
1684 (processPlatform.processConfigurations): Extracted.
1686 2012-12-17 Ryosuke Niwa <rniwa@webkit.org>
1688 Add an administrative page for builders.
1690 Reviewed by Ricky Mondello.
1692 We need an administrative page to add and edit builder information.
1693 Also renamed "slaves" to "builders" in order to reduce the amount of technical jargon we use.
1695 * database/init-database.sql: Renamed slaves table to builders. Drop slave_os and slave_spec
1696 since we don't have plans to use those columns in near future. Also make builder_name unique
1697 as required by the rest of the app.
1698 * public/admin/builders.php: Added.
1699 * public/api/runs.php: Updated per the table rename.
1700 * public/include/admin-header.php: Added a link to builders.php.
1702 2012-12-14 Ryosuke Niwa <rniwa@webkit.org>
1704 Build fixes for r46982.
1706 * database/aggregate.js:
1707 (fetchConfigurations): Bind i so that it's not always metricIds.length.
1708 (fetchBuildsForPlatform): Return run_build as build_id since that's what caller expects.
1709 (processBuild): Don't print "." until we've committed transactions. It's misleading.
1711 2012-12-13 Ryosuke Niwa <rniwa@webkit.org>
1713 Unreviewed. Move some php files to public/include as suggested by Mark on a code review.
1715 * public/admin/aggregators.php:
1716 * public/admin/footer.php: Removed.
1717 * public/admin/header.php: Removed.
1718 * public/admin/index.php:
1719 * public/admin/jobs.php:
1720 * public/admin/tests.php:
1721 * public/api/json-header.php: Removed.
1722 * public/api/runs.php:
1723 * public/db.php: Removed.
1724 * public/include: Added.
1725 * public/include/admin-footer.php: Copied from public/admin/footer.php.
1726 * public/include/admin-header.php: Copied from public/admin/header.php.
1727 * public/include/db.php: Copied from public/db.php.
1728 * public/include/json-header.php: Copied from public/api/json-header.php.
1730 2012-12-13 Ryosuke Niwa <rniwa@webkit.org>
1732 <rdar://problem/12822613> SafariPerfMonitor: implement naive value aggregation mechanism
1734 Reviewed by Ricky Mondello.
1736 Added the initial implementation of value aggregation.
1737 Also added abilities to configure the dashboard page in tests.php.
1739 * database/aggregate.js: Added.
1740 (TaskQueue): Added. Execute all tasks at once and waits for those tasks to complete.
1741 (TaskQueue.addTask):
1743 (SerializedTaskQueue): Added. Execute tasks sequentially after one another until all of them are completed.
1744 (SerializedTaskQueue.addTask):
1745 (SerializedTaskQueue.start):
1748 (fetchConfigurations):
1749 (fetchBuildsForPlatform):
1751 (testsWithDifferentIterationCounts):
1752 (aggregateIterationsForMetric): Retrieve run_iterations and aggregate results in memory.
1753 (saveAggregatedResults): Insert into test_runs and test_config in transactions.
1754 (getOrInsertConfiguration):
1756 * database/database-common.js:
1757 (fetchTable): Log an error as an error.
1758 (getOrCreateId): Extracted from perf-webkit-migrator.
1759 (statistics): Added.
1760 * database/perf-webkit-migrator.js:
1761 (migrateTestConfig): Converted units to respective metric names. Also removed the code to add jobs to update
1762 runs JSON since runs JSONs are generated on demand now.
1764 (getOrCreatePlatformId):
1765 (getOrCreateTestId):
1766 (getOrCreateConfigurationId):
1767 (getOrCreateRevisionId):
1768 (getOrCreateRepositoryId):
1769 (getOrCreateBuildId):
1770 * database/process-jobs.js:
1771 (processJob): Handle 'aggregate' type.
1773 2012-12-11 Ryosuke Niwa <rniwa@webkit.org>
1775 Fix the dashboard after adding test_metrics.
1777 Reviewed by Ricky Mondello.
1779 Rename test to metrics in various functions and sort tests on the charts page.
1780 Also representing whether a test appears or not by setting a flag on dashboard
1781 was bogus because test objects are shared by multiple platforms. Instead, store
1782 dashboard platform list as intended by the manifest JSON.
1784 * public/index.html:
1785 (PerfTestRuns): Renamed test to metric.
1787 (showCharts): Ditto; also sort metrics' full names before adding them to the select element.
1788 (fullName): Moved so that it appears above where it's called.
1789 * public/js/helper-classes.js:
1791 2012-12-10 Ryosuke Niwa <rniwa@webkit.org>
1793 Update tests.php to reflect recent changes in the database schema.
1795 Reviewed by Conrad Shultz.
1797 Made the following changes to tests.php:
1798 1. Disallow adding metrics to tests without subtests.
1799 2. Made dashboard configurable by adding checkboxes for each platform on each metric.
1800 3. Linkified tests with subtests instead of showing all them at once.
1802 * public/admin/admin.css:
1803 (.action-field, .notice):
1805 * public/admin/header.php: Specify paths by absolute paths so that tests.php can use PATH_INFO.
1806 (execute_query_and_expect_one_row_to_be_affected): Return a boolean. Used in tests.php while adding test_metrics.
1807 (add_job): Extracted.
1808 * public/admin/tests.php: See above.
1809 (array_item_set_default): Added.
1810 (array_item_or_default): Renamed from get_value_with_default.
1811 (compute_full_name): Extracted.
1812 (sort_tests): Ditto.
1813 (map_metrics_to_tests): Ditto.
1815 2012-12-06 Ryosuke Niwa <rniwa@webkit.org>
1817 <rdar://problem/12832324> SafariPerfMonitor: Linkify test names
1819 Reviewed by Simon Fraser.
1821 Linkify the headers using metric.test.url when it's provided.
1823 * public/index.html:
1825 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1827 Use parameterized pg_query_params in query_and_fetch_all
1829 Reviewed by Conrad Shultz.
1831 Address a review comment by Mark by using pg_query_params instead of pg_query in query_and_fetch_all.
1833 * public/api/runs.php:
1835 (ctype_alnum_underscore): Added.
1837 2012-12-04 Ryosuke Niwa <rniwa@webkit.org>
1839 Update the migration tool to support test_metrics.
1841 Reviewed by Mark Rowe.
1843 Updated the migration tool from webkit-perf.appspot.com to support test_metrics.
1844 Also import run_iteration rows as runs JSON files now include individual values.
1846 * database/database-common.js:
1847 (addJob): Extracted.
1848 * database/perf-webkit-migrator.js:
1849 (migrateTestConfig): Interchange the order in which we fetch runs and add configurations
1850 so that we can pass in the metric name and unit to getOrCreateConfigurationId.
1851 (getOrCreateConfigurationId): Updated to add both test configuration and test metric.
1854 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1856 Build fix. Suppress "Undefined index" warning.
1858 * public/admin/tests.php:
1860 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1862 Fix a commit error in r46756. api/ should obviously be added under public/
1865 * api/json-header.php: Removed.
1866 * api/runs.php: Removed.
1867 * public/api: Copied from api.
1869 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1871 SafariPerfMonitor: Linkify revisions and revisions range
1872 <rdar://problem/12801010>
1874 Reviewed by Mark Rowe.
1876 Linkify revisions in TestBuild.label. Pass in manifest.repositories to TestBuild's constructor
1877 since it needs to know "url" and "blameUrl".
1879 Also tweaked the appearance of graphs on charts page to better align graphs when unit names are long.
1881 * public/index.html:
1882 * public/js/helper-classes.js:
1884 (TestBuild.revision): Renamed from webkitRevision. Now returns an arbitrary revision number.
1885 (TestBuild.label): Add labels for all revisions.
1889 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1891 Make the generation of "runs" JSON dynamic and support test_metrics.
1893 Reviewed by Mark Rowe.
1895 It turned out that we can fetch all runs for a given configuration in roughly 100-200ms.
1897 Since there could be hundreds, if not thousands, of tests for each configuration and users
1898 aren't necessarily interested in looking at all test results, it's much more efficient to
1899 generate runs JSON dynamically (i.e. polling) upon a request instead of generating all of them
1900 when bots report new results (i.e. pushing).
1902 Rewrote the script to generate runs JSON in php and also supported test_metrics table.
1905 * api/json-header.php: Added. Sets Content-Type and cache policies (10 minutes by default).
1906 (exit_with_error): Added.
1907 (successful_exit): Added.
1908 * api/runs.php: Added. Ported database/database-common.js. It's much shorter in php!
1909 * database/generate-runs.js: Removed.
1910 * database/process-jobs.js: No longer supports "runs".
1911 * public/.htaccess: Added. Always add MultiView so that api/runs can receive a path info.
1912 * public/db.php: Print "Nothing to see here." when it's accessed directly.
1914 * public/index.html: Fetch runs JSONs from /api/runs/ instead of data/.
1916 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1918 Update tests.php and sample-data.sql per addition of test_metrics.
1920 Rubber-stamped by Timothy Hatcher.
1922 Remove a useless code from tests.php that used to update the unit and the url of a test
1923 since it's no longer used, and add the UI and the ability to add a new aggregator to a test.
1925 Also update the sample data to reflect the addition of test_metrics.
1927 * database/sample-data.sql:
1928 * public/admin/tests.php:
1930 2012-11-30 Ryosuke Niwa <rniwa@webkit.org>
1932 Share more code between admin pages.
1934 Reviewed by Timothy Hatcher.
1936 Added notice and execute_query_and_expect_one_row_to_be_affected helper functions to share more code
1937 between admin pages.
1939 Also moved the code to connect to the database into header.php to be shared. Admin pages just need
1940 to check the nullity of global $db now.
1942 * public/admin/aggregators.php:
1943 * public/admin/header.php:
1945 (execute_query_and_expect_one_row_to_be_affected): Added.
1946 * public/admin/index.php:
1947 * public/admin/jobs.php:
1948 * public/admin/tests.php:
1950 2012-11-29 Ryosuke Niwa <rniwa@webkit.org>
1952 SafariPerfMonitor: Add admin page to edit aggregators
1953 <rdar://problem/12782687>
1955 Reviewed by Mark Rowe.
1957 Add aggregators.php. It's very simple. We should probably share more code between various admin pages.
1959 * public/admin/aggregators.php: Added.
1960 * public/admin/header.php:
1961 * public/admin/jobs.php: Removed an erroneous hidden input element.
1963 2012-11-28 Ryosuke Niwa <rniwa@webkit.org>
1965 Fix a syntax error in init-database.sql and add the missing drop table at the beginning.
1967 * database/init-database.sql:
1969 2012-11-28 Ryosuke Niwa <rniwa@webkit.org>
1971 SafariPerfMonitor: Allow multiple metrics per test
1972 <rdar://problem/12773506>
1974 Rubber-stamped by Mark Rowe.
1976 Introduce a new table test_metrics. This table represents metrics each test can have
1977 such as time, memory allocation, frame rate as well as aggregation such as arithmetic mean
1980 Updated admin/tests.php and index.html accordingly.
1982 Also create few indexes based on postgres' "explain analysis" as suggested by Mark.
1984 * database/generate-manifest.js:
1985 (buildPlatformMapIfPossible):
1986 * database/generate-runs.js:
1988 * database/init-database.sql:
1989 * database/schema.graffle:
1990 * public/admin/admin.css:
1993 * public/admin/tests.php:
1994 * public/index.html:
1996 2012-11-27 Ryosuke Niwa <rniwa@webkit.org>
1998 SafariPerfMonitor: Improve the webkit-perf migration tool
1999 <rdar://problem/12760882>
2001 Reviewed by Mark Rowe.
2003 Make the migrator tool skip runs when fetching runs failed since webkit-perf.appspot.com is unreliable
2004 and we don't want to pause the whole importation process until the user comes back to decide whether
2007 Also place form controls next to each test in tests.php so that users don't have to scroll all the way
2008 down to make modifications.
2010 Finally, add unique constraint to (run_config, run_build) in test_runs table in order to optimize a query
2011 of the form: "SELECT run_id FROM test_runs WHERE run_config = $1 AND run_build = $2",
2013 * database/init-database.sql:
2014 * database/perf-webkit-migrator.js:
2015 (migrateTestConfig):
2016 * database/schema.graffle:
2017 * public/admin/admin.css:
2019 * public/admin/tests.php:
2021 2012-11-16 Ryosuke Niwa <rniwa@webkit.org>
2023 Create a new performance dashboard
2024 <rdar://problem/12625582>
2026 Rubber-stamped by Mark Rowe.
2028 Add the initial implementation of the perf dashboard.
2031 * database/config.json: Added.
2032 * database/database-common.js: Added.
2037 (pathToLocalScript):
2039 * database/generate-manifest.js: Added.
2042 (buildPlatformMapIfPossible):
2043 (generateFileIfPossible):
2044 * database/perf-webkit-migrator.js: Added.
2045 * database/process-jobs.js: Added.
2046 * database/sample-data.sql: Added.
2047 * database/schema.graffle: Added.
2049 * public/admin: Added.
2050 * public/admin/README: Added.
2051 * public/admin/admin.css: Added.
2052 * public/admin/footer.php: Added.
2053 * public/admin/header.php: Added.
2054 * public/admin/index.php: Added.
2055 * public/admin/jobs.php: Added.
2056 * public/admin/tests.php: Added.
2057 * public/common.css: Added.
2058 * public/data: Added.
2059 * public/db.php: Added.
2060 * public/index.html: Added.
2062 * public/js/helper-classes.js: Added.
2063 * public/js/jquery-1.8.2.min.js: Added.
2064 * public/js/jquery.flot.min.js: Added.
2065 * public/js/jquery.flot.plugins.js: Added.
2066 * public/js/shared.js: Added.
2067 (fileNameFromPlatformAndTest):
2068 * public/js/statistics.js: Added.