1 2014-03-30 Ryosuke Niwa <rniwa@webkit.org>
3 WebKitPerfMonitor: Header and number-of-days slider takes up too much space
4 https://bugs.webkit.org/show_bug.cgi?id=130957
6 Reviewed by Gyuyoung Kim.
8 Moved the slider into the header. Also reduced the spacing between the header and platform names.
9 This reclaims 50px × width of the screen real estate.
12 (#title): Reduced the space below the header from 20px to 10px.
14 (#numberOfDaysPicker): Removed the rounded border around the number-of-days slider.
15 (#dashboard > tbody > tr > td): Added a 1.5em padding at the bottom.
16 (#dashboard > thead th): That allows us to remove the padding at the top here. This reduces the wasted screen
17 real estate between the header and the platform names.
19 2014-03-10 Zoltan Horvath <zoltan@webkit.org>
21 Update the install guidelines for perf.webkit.org
22 https://bugs.webkit.org/show_bug.cgi?id=129895
24 Reviewed by Ryosuke Niwa.
26 The current install guideline for perf.webkit.org discourages the use of the installed
27 Server application. I've actualized the documentation for Mavericks, and modified the
28 guideline to include the instructions for Server.app also.
32 2014-03-08 Zoltan Horvath <zoltan@webkit.org>
34 Update perf.webkit.org json example
35 https://bugs.webkit.org/show_bug.cgi?id=129907
37 Reviewed by Andreas Kling.
39 The current example is not valid json syntax. I fixed the syntax errors and indented the code properly.
43 2014-01-31 Ryosuke Niwa <rniwa@webkit.org>
45 Merge database-common.js and utility.js into run-tests.js.
47 Reviewed by Matthew Hanson.
49 Now that run-tests is the only node.js script, merged database-common.js and utility.js into it.
50 Also moved init-database.sql out of the database directory and removed the directory entirely.
53 * database/database-common.js: Removed.
54 * database/utility.js: Removed.
55 * init-database.sql: Moved from database/init-database.sql.
57 (connect): Moved from database-common.js.
58 (pathToDatabseSQL): Extracted from pathToLocalScript.
59 (pathToTests): Moved from database-common.js.
62 (SerializedTaskQueue): Ditto.
66 (TestEnvironment.queryAndFetchAll):
69 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
71 Remove the dependency on node.js from the production code.
73 Reviewed by Ricky Mondello.
75 Work towards <rdar://problem/15955053> Upstream SafariPerfMonitor.
77 Removed node.js dependency from TestRunsGenerator. It was really a design mistake to invoke node.js from php.
78 It added so much complexity with only theoretical extensibility of adding aggregators. It turns out that
79 many aggregators we'd like to add are a lot more complicated than ones that could be written under the current
80 infrastructure, and we need to make the other aspects (e.g. the level of aggregations) a lot more extensible.
81 Removing and simplifying TestRunsGenerator allows us to implement such extensions in the future.
83 Also removed the js files that are no longer used.
85 * config.json: Moved from database/config.json.
86 * database/aggregate.js: Removed. No longer used.
87 * database/database-common.js: Removed unused functions, and updated the path to config.json.
88 * database/process-jobs.js: Removed. No longer used.
89 * database/sample-data.sql: Removed. We have a much better corpus of data now.
90 * database/schema.graffle: Removed. It's completely obsolete.
91 * public/include/db.php: Updated the path to config.json.
92 * public/include/evaluator.js: Removed.
94 * public/include/report-processor.php:
95 (TestRunsGenerator::aggregate): Directly aggregate values via newly added aggregate_values method instead of
96 storing values into $expressions and calling evaluate_expressions_by_node.
97 (TestRunsGenerator::aggregate_values): Added.
98 (TestRunsGenerator::compute_caches): Directly compute the caches.
100 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
102 Build fix. Don't fail the platform merges even if there are no test configurations to be moved to the new platform.
104 * public/admin/platforms.php:
105 * public/include/db.php:
107 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
109 Zoomed y-axis view is ununsable when the last result is an outlier.
111 Reviewed by Stephanie Lewis.
113 Show two standard deviations from the exponential moving average with alpha = 0.3 instead of the mean of
114 the last result so that the graph looks sane if the last result was an outlier. However, always show
115 the last result's mean even if it was an outlier.
118 * public/js/helper-classes.js:
119 (unscaledMeansForAllResults): Extracted from min/max/sampleStandardDeviation.
120 Also added the ability to cache the unscaled means to avoid recomputation.
121 (PerfTestRuns.min): Refactored to use unscaledMeansForAllResults.
122 (PerfTestRuns.max): Ditto.
123 (PerfTestRuns.sampleStandardDeviation): Ditto.
124 (PerfTestRuns.exponentialMovingArithmeticMean): Added.
126 2014-01-30 Ryosuke Niwa <rniwa@webkit.org>
130 * public/admin/tests.php:
131 * public/js/helper-classes.js:
133 2014-01-29 Ryosuke Niwa <rniwa@webkit.org>
135 Use two standard deviations instead as I mentioned in the mailing list.
139 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
141 The performance dashboard erroneously shows upward arrow for combined metrics.
143 A single outlier can ruin the zoomed y-axis view.
145 Rubber-stamped by Antti Koivisto.
148 (computeYAxisBoundsToFitLines): Added adjustedMax and adjustedMin, which are pegged at 4 standard deviations
149 from the latest results' mean.
150 (Chart): Renamed shouldStartYAxisAtZero to shouldShowEntireYAxis.
151 (Chart.attachMainPlot): Use the adjusted max and min when we're not showing the entire y-axis.
153 * public/js/helper-classes.js:
154 (PerfTestRuns.sampleStandardDeviation): Added.
155 (PerfTestRuns.smallerIsBetter): 'Combined' is a smaller is better metric.
157 2014-01-28 Ryosuke Niwa <rniwa@webkit.org>
159 Don't include the confidence interval when computing the y-axis.
161 Rubber-stamped by Simon Fraser.
163 * public/js/helper-classes.js:
167 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
169 Tiny CSS tweak for tooltips.
173 2014-01-25 Ryosuke Niwa <rniwa@webkit.org>
175 Remove the erroneously repeated code.
177 * public/admin/test-configurations.php:
179 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
181 <rdar://problem/15704893> perf dashboard should show baseline numbers
183 Reviewed by Stephanie Lewis.
185 * public/admin/bug-trackers.php:
186 (associated_repositories): Return an array of HTMLs instead of echo'ing as expected by AdministrativePage.
189 * public/admin/platforms.php:
192 * public/admin/test-configurations.php: Added.
193 (add_run): Adds a "synthetic" test run and a corresponding build. It doesn't create run_iterations and
194 build_revisions as they're not meaningful for baseline / target numbers.
195 (delete_run): Deletes a synthetic test run and its build. It verifies that the specified build has exactly
196 one test run so that we don't accidentally delete a reported test run.
197 (generate_rows_for_configurations): Generates rows of configuration IDs and types.
198 (generate_rows_for_test_runs): Ditto for test runs. It also emits the form to add new "synthetic" test runs
199 and delete existing ones.
201 * public/admin/tests.php: We wrongfully assumed there is exactly one test configuration for each metric
202 on each platform; there could be configurations of distinct types such as "current" and "baseline".
203 Thus, update all test configurations for a given metric when updating config_is_in_dashboard.
205 * public/api/runs.php: Remove the NotImplemented when we have multiple test configurations.
206 (fetch_runs_for_config): "Synthetic" test runs created on test-configurations page are missing revision
207 data so we need to left-outer-join (instead of inner-join) build_revisions. To avoid making the query
208 unreadable, don't join revision_repository here. Instead, fetch the list of repositories upfront and
209 resolve names in parse_revisions_array. This actually reduces the query time by ~10%.
211 (parse_revisions_array): Skip an empty array created for "synthetic" test runs.
213 * public/include/admin-header.php:
214 (AdministrativePage::render_table): Now custom columns support sub columns. e.g. a configuration column may
215 have id and type sub columns, and each custom column could generate multiple rows.
217 Any table with sub columns now generates two rows for thead. We generate td's in in the first row without
218 sub columns with rowspan of 2, and generate ones with sub columns with colspan set to the sub column count.
219 We then proceed to generate the second header row with sub column names.
221 When generating the actual content, we first generate all custom columns as they may have multiple rows in
222 which case regular columns need rowspan set to the maximum number of rows.
224 Once we've generated the first row, we proceed to generate subsequent rows for those custom columns that
227 (AdministrativePage::render_custom_cells): Added. This function is responsible for generating table cells
228 for a given row in a given custom column. It generates an empty td when the custom column doesn't have
229 enough rows. It also generates empty an td when it doesn't have enough columns in some rows except when
230 the entire row consists of exactly one cell for a custom column with sub columns, in which case the cell is
231 expanded to occupy all sub columns.
233 * public/include/manifest.php:
234 (ManifestGenerator::platforms): Don't add the metric more than once.
236 * public/include/test-name-resolver.php:
237 (TestNameResolver::__construct): We had wrongfully assumed that we have exactly one test configuration on
238 each platform for each metric like tests.php. Fixed that. Also fetch the list of aggregators to compute the
239 full metric name later.
240 (TestNameResolver::map_metrics_to_tests): Populate $this->id_to_metric.
241 (TestNameResolver::test_id_for_full_name): Simplified the code using array_get.
242 (TestNameResolver::full_name_for_test): Added.
243 (TestNameResolver::full_name_for_metric): Added.
244 (TestNameResolver::configurations_for_metric_and_platform): Renamed as it returns multiple configurations.
246 * public/js/helper-classes.js:
247 (TestBuild): Use the build time as the maximum time when revision information is missing for "synthetic"
248 test runs created to set baseline and target points.
250 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
252 Build fix after r57928. Removed a superfluous close parenthesis.
254 * public/api/runs.php:
256 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
258 Unreviewed build & typo fixes.
260 * public/admin/platforms.php:
261 * tests/admin-platforms.js:
263 2014-01-24 Ryosuke Niwa <rniwa@webkit.org>
265 <rdar://problem/15704893> perf dashboard should show baseline numbers
267 Rubber-stamped by Antti Koivisto.
269 Organize some code into functions in runs.php.
271 Also added back $paths that was erroneously removed in r57925 from json-header.php.
273 * public/api/runs.php:
274 (fetch_runs_for_config): Extracted.
277 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
279 Merge the upstream json-shared.php as of https://trac.webkit.org/r162693.
281 * database/config.json:
282 * public/admin/reprocess-report.php:
283 * public/api/report.php:
284 * public/api/runs.php:
285 * public/include/json-header.php:
287 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
289 Commit yet another forgotten change.
291 Something went horribly wrong with my merge :(
293 * database/init-database.sql:
295 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
297 Commit one more forgotten change. Sorry for making a mess here.
299 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
301 Commit the forgotten files.
303 * public/admin/platforms.php: Added.
304 * tests/admin-platforms.js: Added.
306 2014-01-23 Ryosuke Niwa <rniwa@webkit.org>
308 <rdar://problem/15889905> SafariPerfMonitor: there should be a way to merge and hide platforms
310 Reviewed by Stephanie Lewis.
312 Added /admin/platforms/ page to hide and merge platforms.
314 Merging two platforms is tricky because we need to migrate test runs as well as some test configurations.
315 Recall that each test (e.g. Dromaeo) can have many "test metrics" (e.g. MaxAllocations, EndAllocations),
316 and they have a distinct "test configuration" for each platform (e.g. MaxAllocation on Mountain Lion), and
317 each test configuration a distinct "test run" for each build.
319 In order to merge platform A into platform B, we must migrate all test runs that belong to platform A via
320 their test configurations into platform B.
322 Suppose we're migrating a test run R for test configuration T_A in platform A for metric M. Since M exists
323 independent of platforms, R should continue to relate to M through some test configuration. Unfortunately,
324 we can't simply move T_A into platform B since we may already have a test configuration T_B for metric M
325 in platform B, in which case R should relate to T_B instead.
327 Thus, we first migrate all test runs for which we already have corresponding test configurations in the
328 new platform. We then migrate the test configurations of the remaining test runs.
330 * database/init-database.sql: Added platform_hidden.
332 * public/admin/platforms.php: Added.
333 (merge_platforms): Added. Implements the algorithm described above.
336 * public/admin/tests.php: Disable the checkbox to show a test configuration on the dashboard if its platform
337 is hidden since it doesn't do anything.
339 * public/include/admin-header.php: Added the hyperlink to /admin/platforms.
340 (update_field): Don't bail out if the newly added "update-column" is set to the field name even if $_POST is
341 missing it since unchecked checkbox doesn't set the value in $_POST.
342 (AdministrativePage::render_form_control_for_column): Added the support for boolean edit mode. Also used
343 switch statement instead of repeated if's.
344 (AdministrativePage::render_table): Emit "update-column" for update_field.
346 * public/include/db.php: Disable warnings when we're not in the debug mode.
348 * public/include/manifest.php:
349 (ManifestGenerator::platforms): Skip platforms that have been hidden.
352 (TestEnvironment.postJSON):
353 (TestEnvironment.httpGet):
354 (TestEnvironment.httpPost): Added.
355 (sendHttpRequest): Set the content type if specified.
357 * tests/admin-platforms.js: Added tests.
359 2014-01-22 Ryosuke Niwa <rniwa@webkit.org>
361 Extract the code to compute full test names from tests.php.
363 Reviewed by Stephanie Lewis.
365 Extracted TestNameResolver out of tests.php. This reduces the number of global variables in tests.php
366 and paves our way to re-use the code in other pages.
368 * public/admin/tests.php:
370 * public/include/db.php:
371 (array_set_default): Renamed from array_item_set_default and moved from tests.php as it's used in both
372 tests.php and test-name-resolver.php.
374 * public/include/test-name-resolver.php: Added.
375 (TestNameResolver::__construct):
376 (TestNameResolver::compute_full_name): Moved from tests.php.
377 (TestNameResolver::map_metrics_to_tests): Ditto.
378 (TestNameResolver::sort_tests_by_full_name): Ditto.
379 (TestNameResolver::tests): Added.
380 (TestNameResolver::test_id_for_full_name): Ditto.
381 (TestNameResolver::metrics_for_test_id): Ditto.
382 (TestNameResolver::child_metrics_for_test_id): Ditto.
383 (TestNameResolver::configuration_for_metric_and_platform): Ditto.
385 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
387 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
389 Reviewed by Stephanie Lewis.
391 Add the ability to reprocess reports so that I can re-associate wrongfully associated reports.
393 Added public/admin/reprocess-report.php. It doesn't have any nice UI to find reports and it returns JSON
394 but that's sufficient to correct the wrongfully processed reports for now.
396 * public/admin/reprocess-report.php: Added. Takes a report id in $_GET or $_POST and process the report.
397 We should eventually add a nice UI to find and reprocess reports.
399 * public/api/report.php: ReportProcessor and TestRunsGenerator have been removed.
401 * public/include/db.php: Added the forgotten call to prefixed_column_names.
403 * public/include/report-processor.php: Copied from public/api/report.php.
404 (ReportProcessor::__construct): Fetch the list of aggregators here for simplicity.
405 (ReportProcessor::process): Optionally takes $existing_report_id. When this value is specified, we don't
406 create a new report or authenticate the builder password (the password is never stored in the report).
407 Also use select_first_row instead of query_and_fetch_all to find the builder for simplicity.
408 (ReportProcessor::construct_build_data): Extracted from store_report_and_get_build_data.
409 (ReportProcessor::store_report): Ditto.
411 * tests/admin-reprocess-report.js: Added.
413 2014-01-21 Ryosuke Niwa <rniwa@webkit.org>
415 <rdar://problem/15867325> Perf dashboard is erroneously associating reported results with old revisions
417 Reviewed by Ricky Mondello.
419 The bug was caused by a build fix r57645. It attempted to treat multiple reports from the same builder
420 for the same build number as a single build by ignoring build time. This was necessary to associate
421 multiple reports by a single build - e.g. for different performance test suites - because the scripts
422 we use to submit results computed its own "build time" when they're called.
424 An unintended consequence of this change was revealed when we moved a buildbot master to the new machine
425 last week; new reports were wrongfully associated with old build numbers.
427 Fixed the bug by not allowing reports made more than 1 day after the initial build time to be assigned
428 to the same build. Instead, we create a new build object for those reports. Since the longest set of
429 tests we have only take a couple of hours to run, 24 hours should be more than enough.
431 * database/init-database.sql: We can no longer constrain that each build number is unique to a builder
432 or that build number and build time pair is unique. Instead, constrain the uniqueness of the tuple
433 (builder, build number, build time).
435 * public/api/report.php:
436 (ReportProcessor::resolve_build_id): Look for any builds made within the past one day. Create a new build
437 when no such build exists. This prevents a report from being associated with a very old build of the same
440 Also check that revision numbers or hashes match when we're adding revision info. This will let us catch
441 a similar bug in the future sooner.
443 * tests/api-report.js: Added three test cases.
445 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
447 Merged the upstream changes to db.php
448 See http://trac.webkit.org/browser/trunk/Websites/test-results/public/include/db.php
450 * public/include/db.php:
452 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
454 Update other scripts and tests per previous patch.
456 * public/include/manifest.php:
457 * tests/admin-regenerate-manifest.js:
459 2014-01-20 Ryosuke Niwa <rniwa@webkit.org>
463 Reviewed by Ricky Mondello.
465 This column is no longer used by the front-end code since r48360.
467 * database/init-database.sql:
468 * public/admin/tests.php:
470 2014-01-16 Ryosuke Niwa <rniwa@webkit.org>
472 Unreviewed build fix.
474 * public/api/report.php:
476 2014-01-15 Ryosuke Niwa <rniwa@webkit.org>
478 <rdar://problem/15832456> Automate DoYouEvenBench (124497)
480 Reviewed by Ricky Mondello.
482 Support a new alternative format for aggregated results where we have raw values as well as
483 the list aggregators so that instead of
484 "metrics": {"Time": ["Arithmetic"]}
486 "metrics": {"Time": { "aggregators" : ["Arithmetic"], "current": [300, 310, 320, 330] }}
488 This allows single JSON generated by run-perf-tests in WebKit to be shared between the perf
489 dashboard and the generated results page, which doesn't know how to aggregate values.
491 We need to keep the support for the old format because all other existing performance tests
492 all rely on the old format. Even if we updated the tests, we need the dashboard to support
493 the old format during the transition.
495 * public/api/report.php:
496 (ReportProcessor::recursively_ensure_tests): Support the new format in addition to the old one.
497 (ReportProcessor::aggregator_list_if_exists): Replaced is_list_of_aggregators.
499 * tests/api-report.js: Updated one of aggregator test cases to test the new format.
501 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
503 Unreviewed; Tweak the CSS so that chart panes align vertically.
507 2013-05-31 Ryosuke Niwa <rniwa@webkit.org>
509 SafariPerfMonitor should support Combined metric.
511 * public/js/helper-classes.js:
512 (PerfTestRuns): Added 'Combined' metric. In general, it could be used for smaller-is-better
513 value as well but assume it to be greater-is-better for now.
515 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
517 Commit the forgotten init-database change to add iteration_relative_time.
519 * database/init-database.sql:
521 2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
523 <rdar://problem/13993069> SafariPerfMonitor: Support accepting (relative time, value) pairs
525 Reviewed by Ricky Mondello.
527 Add the support for each value to have a relative time. This is necessary for frame rate history
528 since a frame rate needs to be associated with a time it was sampled.
530 * database/init-database.sql: Added iteration_relative_time to run_iterations.
532 * public/api/report.php:
533 (TestRunsGenerator::test_value_list_to_values_by_iterations): Reject any non-numeral values here.
534 This code is used to aggregate values but it doesn't make sense to aggregate iteration values
535 with relative time since taking the average of two frame rates for two subtests taken at two
536 different times doesn't make any sense.
537 (TestRunsGenerator::compute_caches): When we encounter an array value while computing sum, mean,
538 etc..., use the second element since we assume values are of the form (relative time, frame rate).
539 Also exit early with an error if the number of elements in the array is not a pair.
540 (TestRunsGenerator::commit): Store the relative time and the frame rate as needed.
542 * tests/api-report.js: Added a test case. Also modified existing test cases to account for
543 iteration_relative_time.
545 2013-05-27 Ryosuke Niwa <rniwa@webkit.org>
547 <rdar://problem/13654488> SafariPerfMonitor: Support accepting single-value results
549 Reviewed by Ricky Mondello.
551 Support that. It's one line change.
553 * public/api/report.php:
554 (ReportProcessor.recursively_ensure_tests): When there is exactly one value, wrap it inside an array
555 to match the convention assumed elsewhere.
556 * tests/api-report.js: Added a test case.
558 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
560 SafariPerfMonitor shows popups for points outside of the visible region.
562 Rubber-stamped by Simon Fraser.
565 (Chart.closestItemForPageXRespectingPlotOffset): renamed from closestItemForPageX.
566 (Chart.attach): Always use closestItemForPageXRespectingPlotOffset to work around the fact flot
567 may return an item underneath y-axis labels.
569 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
571 Tweak the CSS a little to avoid the test name overlapping with the summary table.
575 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
577 Unreviewed. Fix the typo. The anchor element should wrap the svg element, not the other way around.
581 2013-05-26 Ryosuke Niwa <rniwa@webkit.org>
583 <rdar://problem/13992266> Should be a toggle to show entire Y-axis range
584 <rdar://problem/13992271> Should scale Y axis to include error ranges
586 Reviewed by Ricky Mondello.
588 Add the feature. Also made adjust y-axis respect confidence interval delta so that the gray shade behind
589 the main graph doesn't go outside the graph even when the y-axis is adjusted.
591 * database/config.json:
593 (Chart): Add a SVG arrow to toggle y-axis mode, and bind click on the arrow to toggleYAxis().
594 (Chart.attachMainPlot): Respect shouldStartYAxisAtZero.
595 (Chart.toggleYAxis): Toggle the y-axis mode of this chart by toggling shouldStartYAxisAtZero and calling
597 * public/js/helper-classes.js:
598 (PerfTestResult.confidenceIntervalDelta):
599 (PerfTestResult.unscaledConfidenceIntervalDelta): Extracted.
600 (PerfTestRuns.min): Take confidence interval delta into account.
601 (PerfTestRuns.max): Ditto.
602 (PerfTestRuns.hasConfidenceInterval): Not sure why this function was checking the typeof. Just use isNaN.
604 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
606 A build fix of the previous. Don't look for a test with NULL parent because NULL != NULL in our beloved SQL.
608 * public/api/report.php:
609 (ReportProcessor::recursively_ensure_tests):
610 * tests/api-report.js: Added a test.
612 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
614 Unreviewed build fixes.
616 * public/api/report.php:
617 (ReportProcessor::process): Explicitly exit with error when builder name or build time is missing.
618 Also, tolerate reports without any revision information.
620 (ReportProcessor::recursively_ensure_tests): When looking for a test, don't forget to compare its
623 * tests/api-report.js: Added few test cases.
625 2013-04-26 Ryosuke Niwa <rniwa@webkit.org>
627 Commit another change that was supposed to be committed in r50331.
630 (TestEnvironment.this.postJSON):
631 (TestEnvironment.this.httpGet):
634 2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
636 Commit the remaining files.
638 * public/admin/regenerate-manifest.php:
639 * public/include/admin-header.php:
640 * public/include/json-header.php:
641 * public/include/manifest.php:
643 (TestEnvironment.this.postJSON):
644 (TestEnvironment.this.httpGet):
647 2013-03-15 Ryosuke Niwa <rniwa@webkit.org>
649 SafariPerfMonitor: Add some tests for admin/regenerate-manifest.
651 Reviewed by Ricky Mondello.
653 Added some tests for admin/regenerate-manifest.
655 * public/admin/regenerate-manifest.php: Use require_once instead of require.
656 * public/include/admin-header.php: Ditto.
657 * public/include/json-header.php: Ditto.
659 * public/include/manifest.php:
660 (ManifestGenerator::builders): Removed a reference to a non-existent variable.
661 When there are no builders, simply return an empty array.
664 (TestEnvironment.postJSON):
665 (TestEnvironment.httpGet): Added.
666 (sendHttpRequest): Renamed from postHttpRequest as it now takes method as an argument.
668 * tests/admin-regenerate-manifest.js: Added with a bunch of test cases.
670 2013-03-14 Ryosuke Niwa <rniwa@webkit.org>
672 Unreviewed. Added more tests for api/report to ensure it creates tests, metrics, test_runs,
673 and run_iterations. Also fixed a typo in report.php found by new tests.
675 * public/api/report.php:
676 (main): Fix a bug in the regular expression to wrap numbers with double quotations.
677 * tests/api-report.js: Added more test cases.
679 2013-03-12 Ryosuke Niwa <rniwa@webkit.org>
681 <rdar://problem/13399038> SafariPerfMonitor: Need integration tests
683 Reviewed by Ricky Mondello.
685 Add a test runner script and some simple test cases.
687 * database/config.json: Added the configuration for "testServer".
688 * database/database-common.js:
689 (pathToTests): Added.
690 * run-tests.js: Added.
693 (confirmUserWantsDatabaseToBeInitializedIfNeeded): Checks whether there are any non-empty tables,
694 and if there are, asks the user if it’s okay to delete all of the data contained therein.
695 (confirmUserWantsDatabaseToBeInitializedIfNeeded.findNonEmptyTable): Find a table with non-zero
697 (confirmUserWantsDatabaseToBeInitializedIfNeeded.fetchTableNames): Fetch the list of all tables
698 in the current database using PostgreSQL's information_schema.
699 (askYesOrNoQuestion):
701 (initializeDatabase): Executes init-database.sql. It drops all tables and creates them again.
703 (TestEnvironment): The global object exposed in tests. Provides various utility functions.
704 (TestEnvironment.assert): Exposes assert to tests.
705 (TestEnvironment.console): Exposes console to tests.
706 (TestEnvironment.describe): Adds a description.
707 (TestEnvironment.it): Adds a test case.
708 (TestEnvironment.postJSON):
709 (TestEnvironment.queryAndFetchAll):
710 (TestEnvironment.sha256):
711 (TestEnvironment.notifyDone): Ends the current test case.
715 (TestContext): An object created for each test case. Conceptually, this object is always on
716 "stack" when a test case is running. TestEnvironment and an uncaughtException handler accesses
717 this object via currentTestContext.
718 (TestContext.description):
720 (TestContext.logError):
723 * tests/api-report.js: Added some basic tests for /api/report.php.
725 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
727 Unreviewed administrative page fix. Make it possible to remove all configuration from dashboard.
729 The problem was that we were detecting whether we're updating dashboard or not by checking
730 the existence of metric_configurations in $_POST but this key doesn't exist when we're removing
731 all configurations. Use separate 'dashboard' action to execute the code even when
732 metric_configurations is empty.
734 * public/admin/tests.php:
736 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
738 SafariPerfMonitor: Extract a class to aggregate and store values from ReportProcessor.
740 Reviewed by Ricky Mondello.
742 This patch extracts TestRunsGenerator, which aggregates and compute caches of values,
743 from ReportProcessor as a preparation to replace deprecated aggregate.js.
745 * public/api/report.php:
746 (ReportProcessor::exit_with_error): Moved.
747 (ReportProcessor::process): Use the extracted TestRunsGenerator.
748 (TestRunsGenerator): Added.
749 (TestRunsGenerator::exit_with_error): Copied from ReportProcessor.
750 (TestRunsGenerator::add_aggregated_metric): Moved.
751 (TestRunsGenerator::add_values_for_aggregation): Moved. Made public.
752 (TestRunsGenerator::aggregate): Moved. Made public.
753 (TestRunsGenerator::aggregate_current_test_level): Moved.
754 (TestRunsGenerator::test_value_list_to_values_by_iterations): Moved.
755 (TestRunsGenerator::evaluate_expressions_by_node): Moved.
756 (TestRunsGenerator::compute_caches): Moved. Made public.
757 (TestRunsGenerator::add_values_to_commit): Moved. Made public.
758 (TestRunsGenerator::commit): Moved. Made public. Also takes build_id and platform_id.
759 (TestRunsGenerator::rollback_with_error): Moved.
761 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
763 SafariPerfMonitor: Administrative pages should update manifest JSON as needed.
765 Reviewed by Remy Demarest.
767 Regenerate the manifest file when updating fields or adding new items that are included in
770 * public/admin/bug-trackers.php:
771 * public/admin/builders.php:
772 * public/admin/regenerate-manifest.php:
773 * public/admin/repositories.php:
774 * public/admin/tests.php:
775 * public/include/admin-header.php:
776 (regenerate_manifest): Extracted from regenerate-manifest.php.
778 2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
780 Unreviewed build fix for memory test results.
782 Make aggregation work in the nested cases. We start from the "leaf" tests and move our ways up,
783 aggregating at each level.
785 * public/api/report.php:
786 (ReportProcessor::recursively_ensure_tests):
787 (ReportProcessor::add_aggregated_metric): Renamed from ensure_aggregated_metric.
788 (ReportProcessor::add_values_for_aggregation):
789 (ReportProcessor::aggregate):
790 (ReportProcessor::aggregate_current_test_level): Extracted from aggregate.
792 2013-03-02 Ryosuke Niwa <rniwa@webkit.org>
794 Build fixes. iteration_count_cache should be the total number of values in all iteration group,
795 not the number of iteration groups. Also, don't set group number when the entire run belongs
796 a single iteration group.
798 * public/api/report.php:
799 (ReportProcessor::commit):
801 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
803 SafariPerfMonitor: Introduce iteration groups
805 Reviewed by Remy Demarest.
807 In WebKit land, we're going to use multiple instances of DumpRenderTree or WebKitTestRunner to amortize
808 the runtime environment variances to get more stable results. And it's desirable to keep track of
809 the instance of DumpRenderTree or WebKitTestRunner used to generate each iteration value.
811 This patch introduces "iteration groups" to keep track of this extra information.
813 Instead of receiving a flat array of iteration values, we can now receive a two dimensional array where
814 the outer array denotes iteration groups and each inner array contains iteration values for each group.
817 * database/init-database.sql: Add iteration_group column.
818 * public/api/report.php:
819 (ReportProcessor::recursively_ensure_tests): Always use the two dimensional array internally.
821 (ReportProcessor::aggregate): test_value_list_to_values_by_iterations now returns an associative array
822 contains the list of values indexed by the iteration order and group sizes. Store the group size so
823 that we can restore the iteration groups before passing it to node.js and restore them later.
825 (ReportProcessor::test_value_list_to_values_by_iterations): Flatten iteration groups into an array
826 of values and construct group_size array to restore the groups later in ReportProcessor::aggregate.
828 Also check that each iteration group in each subtest are consistent with one another. To see why we need
829 to do this, suppose we're aggregating two tests T1 and T2 with the following values. Then it's important
830 that each iteration group in T1 and T2 have the same size:
831 T1 = [[1, 2], [3, 4, 5]]
832 T2 = [[6, 7], [8, 9, 10]]
834 so that the aggregated result (the sum in this case) can have the same groups as in:
835 T = [[7, 9], [11, 13, 15]]
837 If some iteration groups in T1 and T2 had a different size as in:
838 T1 = [[1, 2, 3], [4, 5]]
839 T2 = [[6, 7], [8, 9, 10]]
841 Then iteration groups of the aggregated T is ambiguous.
843 (ReportProcessor::compute_caches): Flatten iteration groups to compute caches (e.g. mean, stdev, etc...)
844 (ReportProcessor::commit): Store iteration_group values.
846 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
848 Unreviewed. Delete the migration tool for webkit-perf.appspot.com now that we have successfully
849 migrated to perf.webkit.org.
851 * database/perf-webkit-migrator.js: Removed.
853 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
855 Build fix. Don't forget to add metrics of the top level tests e.g. Dromaeo:Time:Arithmetic.
860 2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
862 SafariPerfMonitor: Make it possible to add charts for all subtests or all platforms.
864 Reviewed by Ricky Mondello.
866 It is often desirable to see charts of a given test for all platforms, or to be able to see
867 charts of all subtests on a given platform when trying to triage perf. regressions.
869 Support this use case by adding the ability to do so on the charts page.
871 Also, we used to disable items on the test list based on the platform chosen. This turned out
872 to be a bad UI because in many situations you want to be able to compare results of the same test
873 on multiple platforms.
875 In this new UI, we have three select elements, each of which selects the following:
876 1. Top-level test - Test suite such as Dromaeo
877 2. Metric - Pages and subtests under the suite such as www.webkit.org for dom-modify:Runs
878 (where dom-modify is the name of the subtest and Runs is a metric in that subtest) for Dromaeo.
879 3. Platform - Mountain Lion, Qt, etc...
881 A user can select "all" for metric and platform but we disallow doing both at once since adding
882 all metrics on all platforms tends to add way too many charts and hang the browser. I also can't
883 think of a use case where you want to look at that many charts at once. We can support this later
884 if valid use cases come up.
887 (.showCharts.addOption): Extracted.
888 (.showCharts): Added "metricList" that shows the list of test and metrics (in the form of
889 relative metrics paths such as "DOMWalk:Time") for each top-level test selected in testList.
890 metricList has onchange handler that enables/disables items on platformList.
892 (init): Sort tests and test metrics here instead of doing that in showCharts.
894 2013-02-28 Ryosuke Niwa <rniwa@webkit.org>
896 <rdar://problem/13316756> SafariPerfMonitor: tooltip should include a link to build URLs
898 Reviewed by Remy Demarest and Ricky Mondello.
900 Added a hyperlink to build page in tooltips. Repeating the entire build URL in each build
901 was a bad idea because it bloats the resultant JSON file too much. So move the build URL
902 templates to the manifest file instead. Each build now only contains the builder id.
904 * public/api/runs.php: Removed the part of the query that joined builders table. This
905 speeds up the query quite a bit.
907 * public/include/manifest.php:
908 (ManifestGenerator::generate): Generate builders field.
909 (ManifestGenerator::builders): Added. Returns an associative array of builder ids to an
910 associative array that contains name and its build URL template.
913 (.buildLabelWithLinks.linkifyIfNotNull): Renamed from linkifiedLabel. Take a label and url
914 instead of a revision since this function is used for revisions and build page URLs now.
915 (.buildLabelWithLinks): Include the linkified build number.
917 * public/js/helper-classes.js:
918 (TestBuild.builder): Added.
919 (TestBuild.buildNumber): Added.
920 (TestBuild.buildUrl): Returns the build URL. The variable name in the URL template has been
921 changed from %s to $buildNumber to be more descriptive and consistent with other URL templates.
923 2013-02-27 Ryosuke Niwa <rniwa@webkit.org>
925 Tooltips interfere with user interactions
927 Rubber-stamped by Simon Fraser.
929 Disable tooltip on the dashboard page since graphs are too small to be useful there.
930 Also, show graphs for only 10 days by default as opposed to 20.
931 Finally, dismiss the hovering tooltip when mouse enters a "pinned" tooltip.
934 * public/js/helper-classes.js:
936 2013-02-24 Ryosuke Niwa <rniwa@webkit.org>
938 Fix some serious typo. We're supposed to be using SHA-256, not SHA-1 to hash our passwords,
939 to be compatible with webkit-perf.appspot.com.
941 * public/admin/builders.php:
942 * public/api/report.php:
944 2013-02-23 Ryosuke Niwa <rniwa@webkit.org>
948 Add a missing constraint on builds table. For a given builder, there should be exactly
949 one build for a given build number.
951 Also add report_committed_at to reports table to record the time at which a given report
952 was processed and test_runs and run_iterations rows were committed into the database.
954 * database/config.json:
955 * public/api/report.php:
957 2013-02-22 Ryosuke Niwa <rniwa@webkit.org>
959 Unreviewed. Add more checks for empty SQL query results.
961 * public/include/manifest.php:
963 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
965 More build fixes on perf.webkit.org.
967 * public/api/runs.php: Make PostgreSQL happier.
968 * public/include/manifest.php: Don't assume we always have bug trackers.
970 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
972 SafariPerfMonitor: index.html duplicates the code in PerfTestRuns to determine smallerIsBetter
973 and fix other miscellaneous UI bugs.
975 Rubber-stamped by Simon Fraser.
977 Removed the code to determine whether smaller value is better or not for a given test in index.html
978 in the favor of using that of PerfTestRuns.
980 * public/include/manifest.php: Fixed a typo.
983 (Chart.attachMainPlot): Fixed a bug to access previousPoint.left even when previousPoint is null.
985 * public/js/helper-classes.js:
986 (PerfTestRuns): Added EndAllocations, MaxAllocations, and MeanAllocations.
988 (PerfTestRuns.computeScalingFactorIfNeeded): When the mean is almost 10,000 units, we may end up
989 using 5 digits instead of 4, resulting in the use of scientific notations. Go up to the next unit
990 at roughly 2,000 units to avoid this.
992 (Tooltip.show): Show the tooltip even when the new content is identical to the previous content.
993 The only thing we can avoid is innerHTML.
995 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
997 Another build fix. The path to node is /usr/local/bin/node, not /usr/bin/local/node
999 * public/include/evaluator.js:
1001 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
1003 <rdar://problem/13267898> SafariPerfMonitor: Bug trackers should be configurable
1005 Reviewed by Remy Demarest.
1007 Made the list of bug trackers configurable. Namely, each bug tracker can be added in
1008 admin/bug-trackers.php and can be associated with multiple repositories.
1010 The association between bug trackers and repositories (such as WebKit, Safari, etc...) are used
1011 to determine the set of bug trackers to show for a given set of blame lists.
1012 e.g. if a test regressed due to a change in Safari, then we don't want to show WebKit Bugzilla as
1013 a place to file bugs against the regression.
1015 * database/init-database.sql: Added bug_trackers and tracker_repositories.
1016 Also drop those tables before creating them (note "DROP TABLE reports" was missing).
1018 * public/admin/bug-trackers.php: Added. The administrative interface for adding and managing
1019 bug trackers, namely associated repositories.
1021 * public/include/admin-header.php: Added a link to bug-trackers.php
1022 * public/include/manifest.php:
1023 (ManifestGenerator::generate): Include the list of bug trackers in the manifest.
1024 Also moved the code to fetch repositories table here from ManifestGenerator::repositories.
1026 (ManifestGenerator::repositories):
1028 (ManifestGenerator::bug_trackers): Added. Generates an associative array of bug trackers where
1029 keys are names of bug trackers and values are associative arrays with keys 'new_bug_url' and
1030 'repositories' where the latter contains the list of associated repository names.
1032 * public/index.html:
1033 (Chart): Takes bugTrackers as as argument.
1034 (Chart.showTooltipWithResults): Removed the hard-coded list.
1036 (init.addPlatformsToDashboard):
1037 (init.showCharts.createChartFromListPair):
1038 (init): Stores the list of bug trackers in the manifest to a local variable.
1040 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
1042 A follow up on the previous build fix. When using proc_open, we need to make evalulator.js executable.
1044 * public/include/evaluator.js:
1046 2013-02-21 Ryosuke Niwa <rniwa@webkit.org>
1048 SafariPerfMonitor: Extract the code to generate tabular view in administrative pages
1050 Reviewed by Remy Demarest.
1052 Extracted AdministrativePage to share the code to generate a tabular view of data and a form to insert
1053 new row into the database.
1055 * public/admin/aggregators.php: Use AdministrativePage.
1056 * public/admin/builders.php: Ditto.
1057 * public/admin/repositories.php: Ditto.
1058 * public/include/admin-header.php:
1059 (AdministrativePage): Added.
1060 (AdministrativePage::__construct): column_info is an associative array that maps a SQL column name
1061 to an associative array that describes the column.
1062 - editing_mode: Specifies the type of form ('text', 'url', or 'string') to show for this column.
1063 - label: Human readable name of the column.
1064 - pre_insertion: Signifies that this column exists only before the row is inserted. e.g. password
1065 column exists only before we create password_hash column at the insertion time.
1067 (AdministrativePage::name_to_titlecase): Converts an underscored lowercase name to a human readable
1068 titlecase (e.g. new_bug is converted to New Bug).
1069 (AdministrativePage::column_label): Obtains the label specified in column_info or titlecased column name.
1070 (AdministrativePage::render_form_control_for_column): "Renders" a text form control such as input and
1071 textarea for a given editing mode ('text', 'url', or 'string').
1072 (AdministrativePage::render_table): Renders a whole SQL table after sorting rows by the specified column.
1073 (AdministrativePage::render_form_to_add): Renders a form to insert new row.
1075 2013-02-20 Ryosuke Niwa <rniwa@webkit.org>
1077 Build fix. Some systems don't support r+. Use proc_open instead.
1079 * public/api/report.php:
1081 2013-02-15 Ryosuke Niwa <rniwa@webkit.org>
1083 Build fix. Use the mean data series as supposed to upper or lower confidence bounds
1084 when computing the y-axis of data points to show tooltips at.
1086 * public/index.html:
1088 2013-02-15 Ryosuke Niwa <rniwa@webkit.org>
1090 Unreviewed. Removed .htaccess in favor of directly putting directives in httpd.conf.
1093 * public/.htaccess: Removed.
1095 2013-02-14 Ryosuke Niwa <rniwa@webkit.org>
1099 * public/include/manifest.php: Build fix. db is on this.
1100 * public/js/statistics.js:
1101 (Statistics.confidenceInterval): Added. An utility function for debugging purposes.
1103 2013-02-13 Ryosuke Niwa <rniwa@webkit.org>
1105 <rdar://problem/13165667> SafariPerfMonitor doesn't work on perf.webkit.org (Part 2)
1107 Reviewed by Anders Carlsson.
1109 Rewrote and merged populate-from-report.js into report.php.
1111 * database/config.json: Added a path to node.js.
1113 * database/init-database.sql: Don't require unit to be always present since it's no longer used by the front end.
1114 Once we land this patch and update the administrative pages, we can remove this column.
1116 Also add a new reports table to store JSON reported by builders. We used to store everything in jobs table but
1117 that table is going away once we remove the node.js backend.
1119 * database/populate-from-report.js: Removed.
1120 * public/api/report.php: Added.
1122 (ReportProcessor.__construct):
1123 (ReportProcessor.process):
1125 (ReportProcessor.store_report_and_get_build_data): We store the report into the database as soon as it has been
1126 verified to be submitted by a known builder.
1128 (ReportProcessor.exit_with_error): Store the error message and details in the database if the report had been
1129 stored. If not, then notify that to the client via 'failureStored' in the JSON response.
1130 (ReportProcessor.resolve_build_id): Insert build and build_revisions rows if needed. We don't do this atomically
1131 inside a transaction because there could be multiple reports for a single build, each containing results for
1134 (ReportProcessor.recursively_ensure_tests): Parse a tree of tests and insert tests and test_metrics rows as
1135 needed. It also computes the metrics to aggregate and prepares values to commit via ensure_aggregated_metric,
1136 add_values_to_commit, and add_values_for_aggregation.
1138 (ReportProcessor.is_list_of_aggregators): When a metric is an aggregation, it contains an array of aggregator
1139 names, e.g. ["Arithmetic", "Geometric"], instead of a dictionary of configuration types to their values,
1140 e.g. {Time: {current: [1, 2, 3,]}}. This function detects the former. (Note that dictionary and list are both
1143 (ReportProcessor.ensure_aggregated_metric): Create a metric with aggregator to add it to the list of metrics
1144 to be aggregated in ReportProcessor.aggregate.
1146 (ReportProcessor.add_values_for_aggregation): Called by test metrics with aggregated parent test metrics.
1148 (ReportProcessor.aggregate): Compute results for aggregated metrics. Consider a matrix with rows representing
1149 child tests and columns representing "iterations" for a given aggregated metrics M. Initially, we have values
1150 given for each row (child metrics of M). This function extracts each column (iteration) via
1151 test_value_list_to_values_by_iterations, and feeds it into evaluate_expressions_by_node to get aggregated values
1152 for each column (iteration of M). Finally, it registers those aggregated values to be committed.
1154 Note that we don't want to start a new node.js process for each aggregation, so we accumulate all values to be
1155 aggregated in node.js in $expressions. Each entry in $expressions is a JSON string that contains code and
1156 values to be aggregated. node.js gives us back a list of JSON strings that contain aggregated values.
1158 (ReportProcessor.test_value_list_to_values_by_iterations): See above.
1159 (ReportProcessor.evaluate_expressions_by_node): See above.
1161 (ReportProcessor.compute_caches): Compute cached mean, sum, and square sums for each run we're about to add
1162 using evaluate_expressions_by_node. We can't do this before computing aggregated results since those aggregated
1163 results also need the said caches.
1165 (ReportProcessor.add_values_to_commit):
1167 (ReportProcessor.commit): Add test_runs and run_iterations atomically inside a transaction, rolling back
1168 the transaction as needed if anything goes wrong.
1170 (ReportProcessor.rollback_with_error)
1172 * public/include/db.php:
1173 (Database.prepare_params): Use $values (instead of $placeholders) to compute the current index since
1174 placeholders ($1, $2, etc...) may be split up into multiple arrays given they may not necessarily show up
1175 contiguously in a SQL statement.
1177 (Database.select_or_insert_row): Added. Selects a row if the attempt to insert the same row fails. It
1178 automatically creates a query string from a dictionary of unprefixed column names and table. It returns
1179 a column value of the choice.
1181 (Database.begin_transaction): Added.
1182 (Database.commit_transaction): Added.
1183 (Database.rollback_transaction): Added.
1185 * public/include/evaluator.js: Added.
1186 * public/include/json-header.php:
1187 (exit_with_error): Take error details and merge it with "additional details". This allows report.php to provide
1188 context under which the request failed.
1189 (successful_exit): Merge "additional details".
1190 (set_exit_detail): Added. Sets "additional details" to the JSON returned by exit_with_error or successful_exit.
1191 (merge_additional_details):
1193 2013-02-12 Ryosuke Niwa <rniwa@webkit.org>
1195 SafariPerfMonitor: Add more helper functions to db.php
1197 Reviewed by Remy Demarest.
1199 Added Database::insert_row and array_get to make common database operations easier.
1201 * public/admin/aggregators.php: Use Database::insert_row instead of
1202 execute_query_and_expect_one_row_to_be_affected.
1204 * public/admin/builders.php: Ditto.
1206 * public/admin/tests.php: Ditto; We used to run a separate SELECT query just to get the id after
1207 inserting a row. With insert_row, we don't need that.
1209 * public/include/admin-header.php: Ditto.
1211 * public/include/db.php:
1212 (array_get): Added. It returns the value of an array given a key if the key exists; otherwise
1213 return the default value (defaults to NULL) if the key doesn't exist.
1215 (Database::column_names): Added. Prefixes an array of column names and creates a comma separated
1218 (Database::prepare_params): Added. Takes an associative array of column names and their values,
1219 and builds up arrays for placeholder (e.g. $1, $2, etc...) and values, then returns an array of
1220 column names all in the same order.
1222 (Database::insert_row): Added. Inserts a new row into the specified table where column names have
1223 the given prefix. Values are given in a form of an associative array where keys are unprefixed
1224 column names and values are corresponding values. When the row is successfully inserted, it returns
1225 the specified column's value (defaults to prefix_id). If NULL is specified, it returns a boolean
1226 indicating the success of the insertion.
1228 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
1230 <rdar://problem/13165667> SafariPerfMonitor doesn't work on perf.webkit.org (Part 1)
1232 Reviewed by Conrad Shultz.
1234 Rewrote the manifest generator in PHP.
1236 * database/generate-manifest.js: Removed.
1237 * public/admin/regenerate-manifest.php: Added. Use ManifestGenerator to generate and store the manifest.
1238 * public/include/db.php:
1239 (array_ensure_item_has_array): Added.
1240 * public/include/evaluator.js: Added.
1241 * public/include/json-header.php:
1242 * public/include/manifest.php: Added.
1244 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
1246 Dates on overflow plot are overlapping
1248 Rubber-stamped by Simon Fraser.
1250 Don't show more than 5 days.
1252 * public/index.html:
1253 * public/js/helper-classes.js:
1254 (TestBuild.UTCtoPST):
1257 2013-02-07 Ryosuke Niwa <rniwa@webkit.org>
1259 Show build time as well as commit time on the dashboard and tooltips.
1261 Rubber-stamped by Simon Fraser.
1263 Include both the maximum commit time and build time in buildLabelWithLinks.
1264 Also use ISO format to save the screen real estate.
1266 * public/index.html:
1267 (buildLabelWithLinks):
1268 * public/js/helper-classes.js:
1270 (TestBuild.buildTime):
1271 (TestBuild.formattedBuildTime):
1273 2013-02-08 Ryosuke Niwa <rniwa@webkit.org>
1275 Unreviewed; Convert metric.name to metric.unit in the front end.
1277 * public/js/helper-classes.js:
1279 2013-02-07 Ryosuke Niwa <rniwa@webkit.org>
1281 <rdar://problem/13166276> SafariPerfMonitor: Need hyperlinks to file bugs
1283 Rubber-stamped by Simon Fraser.
1285 This patch adds hyperlinks to file new bugs on Radar and WebKit Bugzilla. Because we want to include information
1286 such as the degree of progression or regression and the regression ranges when filing new bugs, broke various
1287 label() functions into smaller pieces to be used in both generating tooltips and the hyperlinks.
1289 * public/index.html:
1290 (.buildLabelWithLinks): Extracted from TestBuild.label.
1291 (.showTooltipWithResults): Extracted from Tooltip.show. Also added the code to generate hyperlinks to file new bugs
1292 on Radar and WebKit Bugzilla.
1293 * public/js/helper-classes.js:
1294 (PerfTestResult.metric): Replaced test() as runs.test() no longer exists.
1295 (PerfTestResult.isBetterThan): Added.
1296 (PerfTestResult.formattedRelativeDifference): Extracted from PerfTestResult.label.
1297 (PerfTestResult.formattedProgressionOrRegression): Ditto. Also use "better" and "worse" instead of arrow symbols
1298 to indicate progressions or regressions.
1299 (PerfTestResult.label):
1300 (TestBuild.formattedTime): Added.
1301 (TestBuild.platform): Added.
1302 (TestBuild.formattedRevisions): Extracted from TestBuild.label. Merged a part of linkifyLabel.
1303 (TestBuild.smallerIsBetter): Added.
1304 (Tooltip.show): Take a raw markup instead of two results.
1306 2013-02-06 Ryosuke Niwa <rniwa@webkit.org>
1308 <rdar://problem/13151520> SafariPerfMonitor: Dashboard can cause excessive horizontal scrolling when there are many platforms
1310 Rubber-stamped by Tim Horton.
1312 Stack platforms when there are more than 3 of them since making the layout adaptive is tricky
1313 since each platform may have a different number of tests to be shown on the dashboard.
1315 * public/index.html:
1317 2013-02-05 Ryosuke Niwa <rniwa@webkit.org>
1319 Build fix. Don't prefix a SVn revision with 'r' when constructing a changeset / blame URL.
1321 * public/js/helper-classes.js:
1324 2013-02-05 Ryosuke Niwa <rniwa@webkit.org>
1326 SafariPerfMonitor: repository names or revisions are double-quoted when they contain a space
1328 Rubber-stamped by Tim Horton.
1330 The bug was in the PHP code that parsed Postgres array. Trim double quotations as needed.
1332 Also fixed a bug in TestBuild where we used to show the revision range as r1234-1250 when
1333 the revision r1234 was the revision used in the previous build.
1335 * public/api/runs.php:
1336 (parse_revisions_array): Trim double quotations around repository names and revisions.
1337 * public/js/helper-classes.js:
1340 2013-02-05 Ryosuke Niwa <rniwa@webkit.org>
1342 <rdar://problem/13151558> SafariPerfMonitor: Tooltip is unusable
1344 Rubber-stamped by Tim Horton.
1346 * public/index.html:
1347 (Chart.attachMainPlot): Disable auto highlighting (circle around a data point that shows up on hover)
1348 on the dashboard page as it's way too noisy.
1350 (Chart.hideTooltip): Added. Hides the tooltip that shows up on hover.
1352 (.toggleClickTooltip): Extracted from the code for "mouseout" bind (now replaced by "mouseleave").
1353 Pins or unpins a tooltip. When pinning a tooltip, we create a tooltip behind the scene and show that
1354 so that the tooltip for hover can be reused further.
1356 (.closestItemForPageX): Find the closest item given pageX. We iterate data points from left to right,
1357 and find the first point that lies on the right of the cursor position. We then compute the midpoint
1358 between this and the previous point and pick the closer of the two. It returns an item-like object
1359 that has all properties we need since flot doesn't provide an API to retrieve the real item object.
1361 (Chart): Call toggleClickTooltip when a (hover) tooltip is clicked.
1363 (Chart.attach): In "plothover" bind, call closestItemForPageX when item is not provided by flot on
1364 the first or "current" data points (as opposed to target or baseline data points).
1366 Also bind the code to clear crosshair and hide tooltips to "mouseleave" instead of "mouseout", and
1367 avoid triggering this code when the cursor is still within the plot's rectangle (e.g. when a cursor
1368 moves onto a tooltip) to avoid the premature dismissal of a tooltip.
1370 * public/js/helper-classes.js:
1371 (Tooltip.ensureContainer): Don't automatically close then the user clicks on tooltip. Delegate this
1372 work to the client via bindClick.
1374 (Tooltip.show): Move tooltip up by 5px. Also added a FIXME to move this offset computation to the client.
1376 (Tooltip.bindClick): Added.
1378 2013-02-03 Ryosuke Niwa <rniwa@webkit.org>
1380 Yet another build fix. metricId*s*.
1382 * public/admin/tests.php:
1384 2013-02-03 Ryosuke Niwa <rniwa@webkit.org>
1386 Another build fix. Use the new payload format for the aggregate job.
1388 * public/admin/tests.php:
1390 2013-02-03 Ryosuke Niwa <rniwa@webkit.org>
1394 * database/aggregate.js: Use variables that actually exist.
1395 * database/database-common.js:
1396 (ensureConfigurationIdFromList): Add the newly added configuration to the list so that subsequent
1397 function calls will find this configuration.
1399 2013-01-31 Ryosuke Niwa <rniwa@webkit.org>
1401 <rdar://problem/13130139> SafariPerfMonitor: Add ReadMe
1403 Reviewed by Ricky Mondello.
1405 Turned InstallManual into a proper markdown document and added ReadMe.md.
1407 * InstallManual: Removed.
1408 * InstallManual.md: Moved from InstallManual.
1411 2013-01-31 Ryosuke Niwa <rniwa@webkit.org>
1413 <rdar://problem/13109335> SafariPerfMonitor: Add baseline and target lines
1415 Reviewed by Ricky Mondello.
1417 This patch prepares the front end code to process baseline and target results properly.
1419 * public/index.html:
1420 (fetchTest.createRunAndResults): Extracted.
1421 (fetchTest): Call createRunAndResults on current, baseline, and target values of the JSON.
1422 Deleted the comment about how sorting will be unnecessary once we start results in the server side
1423 since sorting by the maximum revision commit time turned out to be non-trivial in php.
1425 2013-01-29 Ryosuke Niwa <rniwa@webkit.org>
1427 <rdar://problem/13057071> SafariPerfMonitor: Use newer version of flot that supports timezone properly
1429 Reviewed by Tim Horton.
1431 Use flot at https://github.com/flot/flot/commit/ec168da2cb8619ebf59c7e721d12c44a7960ff41.
1432 These files are "dynamically linked" to our app.
1434 * public/index.html:
1435 * public/js/jquery-1.8.2.min.js: Removed.
1436 * public/js/jquery.colorhelpers.js: Added.
1437 * public/js/jquery.flot.categories.js: Added.
1438 * public/js/jquery.flot.crosshair.js: Added.
1439 * public/js/jquery.flot.errorbars.js: Added.
1440 * public/js/jquery.flot.fillbetween.js: Added.
1441 * public/js/jquery.flot.js: Added.
1442 * public/js/jquery.flot.min.js: Removed.
1443 * public/js/jquery.flot.navigate.js: Added.
1444 * public/js/jquery.flot.resize.js: Added.
1445 * public/js/jquery.flot.selection.js: Added.
1446 * public/js/jquery.flot.stack.js: Added.
1447 * public/js/jquery.flot.symbol.js: Added.
1448 * public/js/jquery.flot.threshold.js: Added.
1449 * public/js/jquery.flot.time.js: Added.
1450 * public/js/jquery.js: Added.
1452 2013-01-29 Ryosuke Niwa <rniwa@webkit.org>
1454 Return NaN instead of throwing when there aren't enough samples.
1456 Reviewed by Sam Weinig.
1458 It's better to return NaN when we don't have enough samples so that we can treat it
1459 as if we don't have any confidence interval.
1461 * public/js/statistics.js:
1464 2013-01-28 Ryosuke Niwa <rniwa@webkit.org>
1466 Build fix. Apparently Safari sometimes appends / at the end of hash location. Remove that.
1468 * public/js/helper-classes.js:
1469 (URLState.parseIfNeeded):
1471 2013-01-28 Ryosuke Niwa <rniwa@webkit.org>
1473 <rdar://problem/13081582> SafariPerfMonitor: Always use parameterized SQL functions in php code
1475 Reviewed by Ricky Mondello.
1477 Parameterized execute_query_and_expect_one_row_to_be_affected and updated the code accordingly.
1479 * public/admin/aggregators.php: Use heredoc.
1480 * public/admin/builders.php:
1481 * public/admin/jobs.php:
1482 * public/admin/repositories.php:
1483 * public/admin/tests.php: Updated the forms to use unprefixed field names to match other pages.
1484 This allows us to use update_field when updating test's url and metric's unit. Changed the action
1485 to regenerate aggregated matrix from "update" to "add" to simplify the dependencies in if-else.
1486 Also removed a stray code to update unit and url simultaneously since it's never used.
1487 * public/include/admin-header.php:
1488 (execute_query_and_expect_one_row_to_be_affected): Added $params. Also automatically convert
1489 empty strings to NULL as it was previously done via $db->quote_string_or_null_if_empty in callers.
1490 (update_field): Moved from repositories.php.
1492 * public/include/db.php:
1493 (quote_string_or_null_if_empty): Removed now that nobody uses this function.
1495 2013-01-25 Ryosuke Niwa <rniwa@webkit.org>
1497 Build fixes. Treat mean, sum, and square sum as float, not int.
1499 Also use 95% confidence interval instead of 90% confidence interval.
1501 * public/api/runs.php:
1502 * public/js/helper-classes.js:
1503 (.this.confidenceIntervalDelta):
1505 2013-01-24 Ryosuke Niwa <rniwa@webkit.org>
1507 Add an administrative page to edit repository information.
1509 Reviewed by Ricky Mondello.
1511 * public/admin/repositories.php: Added.
1512 * public/include/admin-header.php:
1514 2013-01-23 Ryosuke Niwa <rniwa@webkit.org>
1516 <rdar://problem/13067539> SafariPerfMonitor: Automatically create aggregated metrics from builder reports
1518 Reviewed by Ricky Mondello.
1520 Auto-create aggregated matrix such as arithmetic means and geometric means as requested and add a job
1521 to aggregate results for those matrix in populate-from-report.js.
1523 * database/generate-manifest.js:
1524 (.): Include aggregator names such as Arithmetic and Geometric in the list of metrics.
1525 * database/init-database.sql: Remove an erroneous unique constraint. There could be multiple matrix that share
1526 the same test and name (e.g. Dromaeo, Time) with different aggregators (e.g. Arithmetic and Geometric).
1527 * database/populate-from-report.js:
1529 (getReport): No change even though the diff looks as if it moved.
1530 (processReport): Extracted from main. Fetch the list of aggregators, pass that to recursivelyEnsureTestsIdsAndMetricsIds
1531 to obtain the list of aggregated metrics (such as arithmetic means) that need to be passed to aggregate.js
1532 (scheduleJobs): Extracted from processReport. Add a job to aggregate results.
1533 (recursivelyEnsureTestsIdsAndMetricsIds): When a metric is a list of names, assume them as aggregator names,
1534 and add corresponding metrics for them. Note we convert those names to ids using the dictionary we obtained
1536 (ensureMetricId): Take an aggregator id as an argument.
1537 * database/process-jobs.js: Support multiple metric ids and build id. Note that aggregate.js aggregates results
1538 for all builds when the build id is not specified.
1539 * public/admin/tests.php:
1540 * public/index.html: Include the aggregator name in the full name since there could be multiple metrics
1541 of the same name with different aggregators.
1543 2013-01-22 Ryosuke Niwa <rniwa@webkit.org>
1545 Build fix. Don't pass in arguments to in the wrong order.
1547 * database/aggregate.js:
1549 2013-01-21 Ryosuke Niwa <rniwa@webkit.org>
1551 <rdar://problem/13057110> SafariPerfMonitor: x-axis is messed up
1553 Reviewed by Ricky Mondello.
1555 Since the version of flot we use doesn't support showing graphs in the current locate or
1556 in a specific timezone, convert all timestamps to PST manually (Date's constructor will still
1557 treat them as in UTC). We don't want to use the current locate because other websites on
1558 webkit.org assume PST.
1560 Also append this information to build's label.
1562 * public/js/helper-classes.js:
1566 2013-01-21 Ryosuke Niwa <rniwa@webkit.org>
1568 Store test URLs reported by builders.
1570 Reviewed by Ricky Mondello.
1572 * database/populate-from-report.js:
1573 (recursivelyEnsureTestsIdsAndMetricsIds): Pass in the test url.
1574 (ensureTestId): Store the URL.
1576 2013-01-20 Ryosuke Niwa <rniwa@webkit.org>
1578 Yet another build fix; don't blow up even if we didn't have any test configurations.
1580 * public/admin/tests.php:
1582 2013-01-21 Ryosuke Niwa <rniwa@webkit.org>
1584 Build fix; don't instantiate Date when a timestamp wasn't provided.
1586 * database/populate-from-report.js:
1588 2013-01-18 Ryosuke Niwa <rniwa@webkit.org>
1590 Rename SafariPerfDashboard to SafariPerfMonitor and add a install manual.
1592 Reviewed by Tim Horton.
1594 Added an install manual.
1596 * InstallManual: Added.
1598 2012-12-21 Ryosuke Niwa <rniwa@webkit.org>
1600 Minor build fix. Don't unset builderPassword when it's not set.
1602 * public/api/report.php:
1604 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1606 Prettify JSON payloads and make very large payloads not explode the table in jobs.php.
1608 Reviewed by Ricky Mondello.
1610 * public/admin/admin.css: Make a very large payload scrollable.
1611 * public/admin/jobs.php: Format JSONs.
1613 2012-12-19 Ryosuke Niwa <rniwa@webkit.org>
1615 <rdar://problem/12897424> SafariPerfMonitor: Add ability to report results from bots
1617 Reviewed by Ricky Mondello.
1619 Add report.php and populate-from-report.js that process JSON files submitted by builders.
1621 * database/populate-from-report.js: Added.
1623 (getReport): Obtains the payload (the actual report) from "jobs" table.
1624 (recursivelyEnsureTestsIdsAndMetricsIds): "reports.tests" contain a tree of tests, test metrics,
1625 and their results. This function recursively traverses tests and metrics and ensure their ids.
1627 (metricToUnit): Maps a metric name to a unit. This should really be done in the client side since
1628 there is no point in storing unit given that every metric maps to exactly one unit (i.e. the mapping
1629 is a "function" in mathematical sense).
1631 (ensureRepositoryIdsForAllRevisions):
1632 (getIdOrCreateBuildWithRevisions):
1633 (ensureBuildIdAndRevisions): Obtains a build id given a builder name, a build number, and a build time
1634 if one already exists. If not, then inserts a new build and corresponding revisions information (e.g.
1635 build 123 may contain WebKit revision r456789). We don't retrieve rows for revisions since we don't use
1637 (insertRun): Insert new rows into "test_runs" and "run_iterations" tables, thereby recording the new
1638 test results all in a single transaction. This allows us to keep the database consistent in that either
1639 a build has been reported or not at least in "test_runs" and "run_iterations" tables. It'll be ideal if
1640 we could do the same for "builds" and "build_revisions" but that's not a hard requirement as far as
1641 other parts of the application are concerned.
1642 (scheduleQueriesToInsertRun):
1643 * database/process-jobs.js: Add a call to populate-from-report.js.
1644 * public/api/report.php: Added. Adds a new job named "report" to be processed by populate-from-report.js.
1645 * public/include/db.php: Support parameterized query.
1646 * public/include/json-header.php: Always include 'status' in the response so that builder submitting
1647 a test result could confirm that the submission indeed succeeded.
1649 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1651 Rename get(Id)OrCreate*(Id) to ensure*Id as suggested by Ricky on one of his code reviews.
1653 * database/aggregate.js:
1654 * database/database-common.js:
1655 (selectColumnCreatingRowIfNeeded):
1656 (ensureRepositoryId):
1657 (ensureConfigurationIdFromList):
1658 * database/perf-webkit-migrator.js:
1661 (getOrCreateBuildId):
1663 2012-12-17 Ryosuke Niwa <rniwa@webkit.org>
1665 Extract commonly-used functions from aggregate.js and perf-webkit-migrator.js.
1667 Reviewed by Ricky Mondello.
1669 As a preparation to add report.js that processes a JSON file submitted by bots, extract various functions
1670 and classes from aggregate.js and perf-webkit-migrator.js to be shared.
1672 * database/aggregate.js: Extracted TaskQueue and SerializedTaskQueue into utility.js.
1675 (saveAggregatedResults):
1676 * database/database-common.js:
1677 (getIdOrCreatePlatform): Extracted from webkit-perf-migrator.js.
1678 (getIdOrCreateRepository): Ditto.
1679 (getConfigurationsForPlatformAndMetrics): Renamed from fetchConfigurations. Extracted from aggregator.js.
1680 (getIdFromListOrInsertConfiguration): Renamed from getOrInsertConfiguration. Extracted from aggregator.js.
1681 * database/perf-webkit-migrator.js:
1682 * database/utility.js: Added.
1683 (TaskQueue): Extracted from aggregator.js. Fixed a bug that prevented tasks added after start() is called
1684 from being executed.
1685 (TaskQueue.startTasksInQueue): Execute remaining tasks without serializing them. If the queue is empty,
1686 call the callback passed into start().
1687 (TaskQueue.taskCallback): The function each task calls back. Decrement the counter and call statTasksInQueue.
1688 (TaskQueue.addTask):
1690 (SerializedTaskQueue): Unlike TaskQueue, this class executes each task sequentially.
1691 (SerializedTaskQueue.executeNextTask):
1692 (SerializedTaskQueue.addTask):
1693 (SerializedTaskQueue.start):
1695 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1697 Revert erroneously committed changes.
1699 * database/config.json:
1701 2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
1703 aggregator.js should be able to accept multiple metric ids and a single build id.
1705 Reviewed by Ricky Mondello.
1707 Make aggregator.js accept multiple ids and generate results for single build when bots are
1708 reporting new results.
1710 * database/aggregate.js:
1711 (parseArgv): Added. Returns an object containing the parsed representation of argv,
1712 which currently contains metricIDs and buildIds.
1713 (main): Use parseArgv and processConfigurations
1714 (processPlatform): Use build ids passed in or obtain all builds for the given platform.
1715 (processPlatform.processConfigurations): Extracted.
1717 2012-12-17 Ryosuke Niwa <rniwa@webkit.org>
1719 Add an administrative page for builders.
1721 Reviewed by Ricky Mondello.
1723 We need an administrative page to add and edit builder information.
1724 Also renamed "slaves" to "builders" in order to reduce the amount of technical jargon we use.
1726 * database/init-database.sql: Renamed slaves table to builders. Drop slave_os and slave_spec
1727 since we don't have plans to use those columns in near future. Also make builder_name unique
1728 as required by the rest of the app.
1729 * public/admin/builders.php: Added.
1730 * public/api/runs.php: Updated per the table rename.
1731 * public/include/admin-header.php: Added a link to builders.php.
1733 2012-12-14 Ryosuke Niwa <rniwa@webkit.org>
1735 Build fixes for r46982.
1737 * database/aggregate.js:
1738 (fetchConfigurations): Bind i so that it's not always metricIds.length.
1739 (fetchBuildsForPlatform): Return run_build as build_id since that's what caller expects.
1740 (processBuild): Don't print "." until we've committed transactions. It's misleading.
1742 2012-12-13 Ryosuke Niwa <rniwa@webkit.org>
1744 Unreviewed. Move some php files to public/include as suggested by Mark on a code review.
1746 * public/admin/aggregators.php:
1747 * public/admin/footer.php: Removed.
1748 * public/admin/header.php: Removed.
1749 * public/admin/index.php:
1750 * public/admin/jobs.php:
1751 * public/admin/tests.php:
1752 * public/api/json-header.php: Removed.
1753 * public/api/runs.php:
1754 * public/db.php: Removed.
1755 * public/include: Added.
1756 * public/include/admin-footer.php: Copied from public/admin/footer.php.
1757 * public/include/admin-header.php: Copied from public/admin/header.php.
1758 * public/include/db.php: Copied from public/db.php.
1759 * public/include/json-header.php: Copied from public/api/json-header.php.
1761 2012-12-13 Ryosuke Niwa <rniwa@webkit.org>
1763 <rdar://problem/12822613> SafariPerfMonitor: implement naive value aggregation mechanism
1765 Reviewed by Ricky Mondello.
1767 Added the initial implementation of value aggregation.
1768 Also added abilities to configure the dashboard page in tests.php.
1770 * database/aggregate.js: Added.
1771 (TaskQueue): Added. Execute all tasks at once and waits for those tasks to complete.
1772 (TaskQueue.addTask):
1774 (SerializedTaskQueue): Added. Execute tasks sequentially after one another until all of them are completed.
1775 (SerializedTaskQueue.addTask):
1776 (SerializedTaskQueue.start):
1779 (fetchConfigurations):
1780 (fetchBuildsForPlatform):
1782 (testsWithDifferentIterationCounts):
1783 (aggregateIterationsForMetric): Retrieve run_iterations and aggregate results in memory.
1784 (saveAggregatedResults): Insert into test_runs and test_config in transactions.
1785 (getOrInsertConfiguration):
1787 * database/database-common.js:
1788 (fetchTable): Log an error as an error.
1789 (getOrCreateId): Extracted from perf-webkit-migrator.
1790 (statistics): Added.
1791 * database/perf-webkit-migrator.js:
1792 (migrateTestConfig): Converted units to respective metric names. Also removed the code to add jobs to update
1793 runs JSON since runs JSONs are generated on demand now.
1795 (getOrCreatePlatformId):
1796 (getOrCreateTestId):
1797 (getOrCreateConfigurationId):
1798 (getOrCreateRevisionId):
1799 (getOrCreateRepositoryId):
1800 (getOrCreateBuildId):
1801 * database/process-jobs.js:
1802 (processJob): Handle 'aggregate' type.
1804 2012-12-11 Ryosuke Niwa <rniwa@webkit.org>
1806 Fix the dashboard after adding test_metrics.
1808 Reviewed by Ricky Mondello.
1810 Rename test to metrics in various functions and sort tests on the charts page.
1811 Also representing whether a test appears or not by setting a flag on dashboard
1812 was bogus because test objects are shared by multiple platforms. Instead, store
1813 dashboard platform list as intended by the manifest JSON.
1815 * public/index.html:
1816 (PerfTestRuns): Renamed test to metric.
1818 (showCharts): Ditto; also sort metrics' full names before adding them to the select element.
1819 (fullName): Moved so that it appears above where it's called.
1820 * public/js/helper-classes.js:
1822 2012-12-10 Ryosuke Niwa <rniwa@webkit.org>
1824 Update tests.php to reflect recent changes in the database schema.
1826 Reviewed by Conrad Shultz.
1828 Made the following changes to tests.php:
1829 1. Disallow adding metrics to tests without subtests.
1830 2. Made dashboard configurable by adding checkboxes for each platform on each metric.
1831 3. Linkified tests with subtests instead of showing all them at once.
1833 * public/admin/admin.css:
1834 (.action-field, .notice):
1836 * public/admin/header.php: Specify paths by absolute paths so that tests.php can use PATH_INFO.
1837 (execute_query_and_expect_one_row_to_be_affected): Return a boolean. Used in tests.php while adding test_metrics.
1838 (add_job): Extracted.
1839 * public/admin/tests.php: See above.
1840 (array_item_set_default): Added.
1841 (array_item_or_default): Renamed from get_value_with_default.
1842 (compute_full_name): Extracted.
1843 (sort_tests): Ditto.
1844 (map_metrics_to_tests): Ditto.
1846 2012-12-06 Ryosuke Niwa <rniwa@webkit.org>
1848 <rdar://problem/12832324> SafariPerfMonitor: Linkify test names
1850 Reviewed by Simon Fraser.
1852 Linkify the headers using metric.test.url when it's provided.
1854 * public/index.html:
1856 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1858 Use parameterized pg_query_params in query_and_fetch_all
1860 Reviewed by Conrad Shultz.
1862 Address a review comment by Mark by using pg_query_params instead of pg_query in query_and_fetch_all.
1864 * public/api/runs.php:
1866 (ctype_alnum_underscore): Added.
1868 2012-12-04 Ryosuke Niwa <rniwa@webkit.org>
1870 Update the migration tool to support test_metrics.
1872 Reviewed by Mark Rowe.
1874 Updated the migration tool from webkit-perf.appspot.com to support test_metrics.
1875 Also import run_iteration rows as runs JSON files now include individual values.
1877 * database/database-common.js:
1878 (addJob): Extracted.
1879 * database/perf-webkit-migrator.js:
1880 (migrateTestConfig): Interchange the order in which we fetch runs and add configurations
1881 so that we can pass in the metric name and unit to getOrCreateConfigurationId.
1882 (getOrCreateConfigurationId): Updated to add both test configuration and test metric.
1885 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1887 Build fix. Suppress "Undefined index" warning.
1889 * public/admin/tests.php:
1891 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1893 Fix a commit error in r46756. api/ should obviously be added under public/
1896 * api/json-header.php: Removed.
1897 * api/runs.php: Removed.
1898 * public/api: Copied from api.
1900 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1902 SafariPerfMonitor: Linkify revisions and revisions range
1903 <rdar://problem/12801010>
1905 Reviewed by Mark Rowe.
1907 Linkify revisions in TestBuild.label. Pass in manifest.repositories to TestBuild's constructor
1908 since it needs to know "url" and "blameUrl".
1910 Also tweaked the appearance of graphs on charts page to better align graphs when unit names are long.
1912 * public/index.html:
1913 * public/js/helper-classes.js:
1915 (TestBuild.revision): Renamed from webkitRevision. Now returns an arbitrary revision number.
1916 (TestBuild.label): Add labels for all revisions.
1920 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1922 Make the generation of "runs" JSON dynamic and support test_metrics.
1924 Reviewed by Mark Rowe.
1926 It turned out that we can fetch all runs for a given configuration in roughly 100-200ms.
1928 Since there could be hundreds, if not thousands, of tests for each configuration and users
1929 aren't necessarily interested in looking at all test results, it's much more efficient to
1930 generate runs JSON dynamically (i.e. polling) upon a request instead of generating all of them
1931 when bots report new results (i.e. pushing).
1933 Rewrote the script to generate runs JSON in php and also supported test_metrics table.
1936 * api/json-header.php: Added. Sets Content-Type and cache policies (10 minutes by default).
1937 (exit_with_error): Added.
1938 (successful_exit): Added.
1939 * api/runs.php: Added. Ported database/database-common.js. It's much shorter in php!
1940 * database/generate-runs.js: Removed.
1941 * database/process-jobs.js: No longer supports "runs".
1942 * public/.htaccess: Added. Always add MultiView so that api/runs can receive a path info.
1943 * public/db.php: Print "Nothing to see here." when it's accessed directly.
1945 * public/index.html: Fetch runs JSONs from /api/runs/ instead of data/.
1947 2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
1949 Update tests.php and sample-data.sql per addition of test_metrics.
1951 Rubber-stamped by Timothy Hatcher.
1953 Remove a useless code from tests.php that used to update the unit and the url of a test
1954 since it's no longer used, and add the UI and the ability to add a new aggregator to a test.
1956 Also update the sample data to reflect the addition of test_metrics.
1958 * database/sample-data.sql:
1959 * public/admin/tests.php:
1961 2012-11-30 Ryosuke Niwa <rniwa@webkit.org>
1963 Share more code between admin pages.
1965 Reviewed by Timothy Hatcher.
1967 Added notice and execute_query_and_expect_one_row_to_be_affected helper functions to share more code
1968 between admin pages.
1970 Also moved the code to connect to the database into header.php to be shared. Admin pages just need
1971 to check the nullity of global $db now.
1973 * public/admin/aggregators.php:
1974 * public/admin/header.php:
1976 (execute_query_and_expect_one_row_to_be_affected): Added.
1977 * public/admin/index.php:
1978 * public/admin/jobs.php:
1979 * public/admin/tests.php:
1981 2012-11-29 Ryosuke Niwa <rniwa@webkit.org>
1983 SafariPerfMonitor: Add admin page to edit aggregators
1984 <rdar://problem/12782687>
1986 Reviewed by Mark Rowe.
1988 Add aggregators.php. It's very simple. We should probably share more code between various admin pages.
1990 * public/admin/aggregators.php: Added.
1991 * public/admin/header.php:
1992 * public/admin/jobs.php: Removed an erroneous hidden input element.
1994 2012-11-28 Ryosuke Niwa <rniwa@webkit.org>
1996 Fix a syntax error in init-database.sql and add the missing drop table at the beginning.
1998 * database/init-database.sql:
2000 2012-11-28 Ryosuke Niwa <rniwa@webkit.org>
2002 SafariPerfMonitor: Allow multiple metrics per test
2003 <rdar://problem/12773506>
2005 Rubber-stamped by Mark Rowe.
2007 Introduce a new table test_metrics. This table represents metrics each test can have
2008 such as time, memory allocation, frame rate as well as aggregation such as arithmetic mean
2011 Updated admin/tests.php and index.html accordingly.
2013 Also create few indexes based on postgres' "explain analysis" as suggested by Mark.
2015 * database/generate-manifest.js:
2016 (buildPlatformMapIfPossible):
2017 * database/generate-runs.js:
2019 * database/init-database.sql:
2020 * database/schema.graffle:
2021 * public/admin/admin.css:
2024 * public/admin/tests.php:
2025 * public/index.html:
2027 2012-11-27 Ryosuke Niwa <rniwa@webkit.org>
2029 SafariPerfMonitor: Improve the webkit-perf migration tool
2030 <rdar://problem/12760882>
2032 Reviewed by Mark Rowe.
2034 Make the migrator tool skip runs when fetching runs failed since webkit-perf.appspot.com is unreliable
2035 and we don't want to pause the whole importation process until the user comes back to decide whether
2038 Also place form controls next to each test in tests.php so that users don't have to scroll all the way
2039 down to make modifications.
2041 Finally, add unique constraint to (run_config, run_build) in test_runs table in order to optimize a query
2042 of the form: "SELECT run_id FROM test_runs WHERE run_config = $1 AND run_build = $2",
2044 * database/init-database.sql:
2045 * database/perf-webkit-migrator.js:
2046 (migrateTestConfig):
2047 * database/schema.graffle:
2048 * public/admin/admin.css:
2050 * public/admin/tests.php:
2052 2012-11-16 Ryosuke Niwa <rniwa@webkit.org>
2054 Create a new performance dashboard
2055 <rdar://problem/12625582>
2057 Rubber-stamped by Mark Rowe.
2059 Add the initial implementation of the perf dashboard.
2062 * database/config.json: Added.
2063 * database/database-common.js: Added.
2068 (pathToLocalScript):
2070 * database/generate-manifest.js: Added.
2073 (buildPlatformMapIfPossible):
2074 (generateFileIfPossible):
2075 * database/perf-webkit-migrator.js: Added.
2076 * database/process-jobs.js: Added.
2077 * database/sample-data.sql: Added.
2078 * database/schema.graffle: Added.
2080 * public/admin: Added.
2081 * public/admin/README: Added.
2082 * public/admin/admin.css: Added.
2083 * public/admin/footer.php: Added.
2084 * public/admin/header.php: Added.
2085 * public/admin/index.php: Added.
2086 * public/admin/jobs.php: Added.
2087 * public/admin/tests.php: Added.
2088 * public/common.css: Added.
2089 * public/data: Added.
2090 * public/db.php: Added.
2091 * public/index.html: Added.
2093 * public/js/helper-classes.js: Added.
2094 * public/js/jquery-1.8.2.min.js: Added.
2095 * public/js/jquery.flot.min.js: Added.
2096 * public/js/jquery.flot.plugins.js: Added.
2097 * public/js/shared.js: Added.
2098 (fileNameFromPlatformAndTest):
2099 * public/js/statistics.js: Added.