haikuwebkit/PerformanceTests/resources/results-template.html

632 lines
22 KiB
HTML
Raw Permalink Normal View History

run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
<!DOCTYPE html>
<html>
<head>
<title>WebKit Performance Test Results</title>
<style type="text/css">
section {
background: white;
padding: 10px;
position: relative;
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
}
.time-plots {
padding-left: 25px;
}
.time-plots > div {
display: inline-block;
width: 90px;
height: 40px;
margin-right: 10px;
}
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
section h1 {
text-align: center;
font-size: 1em;
}
section .tooltip {
position: absolute;
text-align: center;
background: #ffcc66;
border-radius: 5px;
padding: 0px 5px;
}
body {
padding: 0px;
margin: 0px;
font-family: sans-serif;
}
table {
background: white;
width: 100%;
}
table, td, th {
border-collapse: collapse;
padding: 5px;
}
tr.even {
background: #f6f6f6;
}
table td {
position: relative;
font-family: monospace;
}
th, td {
cursor: pointer;
cursor: hand;
}
th {
background: #e6eeee;
background: -webkit-gradient(linear, left top, left bottom, from(rgb(244, 244, 244)), to(rgb(217, 217, 217)));
border: 1px solid #ccc;
}
th:after {
content: ' \25B8';
}
th.headerSortUp:after {
content: ' \25BE';
}
th.headerSortDown:after {
content: ' \25B4';
}
td.comparison, td.result {
text-align: right;
}
td.better {
color: #6c6;
}
td.worse {
color: #c66;
}
td.missing {
text-align: center;
}
.checkbox {
display: inline-block;
background: #eee;
background: -webkit-gradient(linear, left bottom, left top, from(rgb(220, 220, 220)), to(rgb(200, 200, 200)));
border: inset 1px #ddd;
border-radius: 5px;
margin: 10px;
font-size: small;
cursor: pointer;
cursor: hand;
-webkit-user-select: none;
font-weight: bold;
}
.checkbox span {
display: inline-block;
line-height: 100%;
padding: 5px 8px;
border: outset 1px transparent;
}
.checkbox .checked {
background: #e6eeee;
background: -webkit-gradient(linear, left top, left bottom, from(rgb(255, 255, 255)), to(rgb(235, 235, 235)));
border: outset 1px #eee;
border-radius: 5px;
}
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
</style>
</head>
<body>
<div style="padding: 0 10px;">
Result <span id="time-memory" class="checkbox"><span class="checked">Time</span><span>Memory</span></span>
Reference <span id="reference" class="checkbox"></span>
<span title="Confidence Interval Delta">CI&#916;</span> <span id="confidenceIntervalDelta" class="checkbox"><span class="checked">Show</span><span>Hide</span></span>
</div>
<table id="container"></table>
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
<script>
(function () {
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
var jQuery = 'PerformanceTests/Dromaeo/resources/dromaeo/web/lib/jquery-1.6.4.js';
var plugins = ['PerformanceTests/resources/jquery.flot.min.js', 'PerformanceTests/resources/jquery.tablesorter.min.js',
'PerformanceTests/resources/statistics.js'];
var localPath = '%AbsolutePathToWebKitTrunk%';
var remotePath = 'https://svn.webkit.org/repository/webkit/trunk';
var numberOfFailures = 0;
var startedLoadingPlugins = false;
var numberOfLoadedPlugins = 0;
function loadScript(src, loaded, failed) {
var script = document.createElement('script');
script.async = true;
script.src = src;
script.onload = loaded;
if (failed)
script.onerror = failed;
document.body.appendChild(script);
}
function loadPlugins(trunkPath) {
for (var i = 0; i < plugins.length; i++)
loadScript(trunkPath + '/' + plugins[i], loadedPlugin, createFailedToLoadPlugin(plugins[i]));
}
function loadedPlugin() {
numberOfLoadedPlugins++;
if (numberOfLoadedPlugins == plugins.length)
setTimeout(init, 0);
}
function createFailedToLoadPlugin(plugin) {
return function () { alert("Failed to load " + plugin); }
}
function createLoadedJQuery(trunkPath) {
return function () { loadPlugins(trunkPath); }
}
loadScript(localPath + '/' + jQuery,
createLoadedJQuery(localPath),
function () {
loadScript(remotePath + '/' + jQuery,
createLoadedJQuery(remotePath),
function () { alert("Failed to load jQuery."); });
});
})();
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
function TestResult(metric, values, associatedRun) {
Some perf. tests have variances that differ greatly between runs https://bugs.webkit.org/show_bug.cgi?id=97510 Reviewed by Benjamin Poulain. PerformanceTests: In order to control the number of iterations and processes to use from run-perf-tests, always use 20 iterations on all tests except Dromaeo, where even doing 5 iterations is prohibitively slow, by default. Without this change, it'll become extremely hard for us to tweak the number of iterations and processes to use from run-perf-tests. * Animation/balls.html: * DOM/DOMTable.html: * DOM/resources/dom-perf.js: (runBenchmarkSuite.PerfTestRunner.measureTime): * Dromaeo/resources/dromaeorunner.js: * Layout/floats_100_100.html: * Layout/floats_100_100_nested.html: * Layout/floats_20_100.html: * Layout/floats_20_100_nested.html: * Layout/floats_2_100.html: * Layout/floats_2_100_nested.html: * Layout/floats_50_100.html: * Layout/floats_50_100_nested.html: * Layout/subtree-detaching.html: * Parser/html5-full-render.html: * SVG/SvgHitTesting.html: * resources/runner.js: * resources/results-template.html: Tools: Use multiple instances of DumpRenderTree or WebKitTestRunner to amortize the effect of the runtime environment on test results (we run each instance after one another, not in parallel). We use 4 instances of the test runner, each executing 5 in-process iterations, for the total of 20 iterations as it was done previously in single process. These values are hard-coded in perftest.py and runner.js but they are to be configurable in the future. Set of 5 iterations obtained by the same test runner is treated as an "iteration group" and each metric now reports an array of the length 4 with each element containing an array of 5 iteration values obtained by each test runner instance as opposed to a flattened array of 20 iteration values. Unfortunately, we can use the same trick on Dromaeo because we're already doing only 5 iterations and repeating the entire Dromaeo 4 times will take too long. We need to disable more Dromaeo tests as needed. To this end, added SingleProcessPerfTest to preserve the old behavior. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTestMetric.append_group): Renamed from append. (PerfTestMetric.grouped_iteration_values): Added. (PerfTestMetric.flattened_iteration_values): Renamed from iteration_values. (PerfTest.__init__): Takes the number of processes (drivers) to run tests with. This parameter is only used by SingleProcessPerfTest. (PerfTest.run): Repeat tests using different driver processes. (PerfTest._run_with_driver): Returns a boolean instead of a list of measured metrics since metrics are shared between multiple drivers (i.e. multiple calls to _run_with_driver). We instead use _ensure_metrics to obtain the matched metrics and store the data there. (PerfTest._ensure_metrics): Added. (SingleProcessPerfTest): Added. Used to run Dromaeo tests where running it on 4 different instances of DumpRenderTree/WebKitTestRunner takes too long. (SingleProcessPerfTest.__init__): (ReplayPerfTest._run_with_driver): Updated to use _ensure_metrics. (PerfTestFactory): Use SingleProcessPerfTest to run Dromaeo tests. * Scripts/webkitpy/performance_tests/perftest_unittest.py: Updated various tests that expect _run_with_driver to return a list of metrics. Now it returns a boolean indicating whether the test succeeded or not. Obtain the dictionary of metrics via test._metrics instead. (TestPerfTestMetric.test_append): Updated per name and added some test cases for grouped_iteration_values. (TestPerfTest._assert_results_are_correct): (TestSingleProcessPerfTest): Added. (TestSingleProcessPerfTest.test_use_only_one_process): (TestSingleProcessPerfTest.test_use_only_one_process.run_single): (TestReplayPerfTest.test_run_with_driver_accumulates_results): (TestReplayPerfTest.test_run_with_driver_accumulates_memory_results): * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: Updated values of sample standard deviations since we're now running tests 4 times. (MainTest._test_run_with_json_output.mock_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): LayoutTests: Use dromaeoIterationCount now that we no longer support iterationCount. * fast/harness/perftests/runs-per-second-iterations.html: Canonical link: https://commits.webkit.org/129631@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-03-03 23:19:31 +00:00
if (values[0] instanceof Array) {
var flattenedValues = [];
for (var i = 0; i < values.length; i++)
flattenedValues = flattenedValues.concat(values[i]);
values = flattenedValues;
}
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
this.test = function () { return metric; }
this.values = function () { return values.map(function (value) { return metric.scalingFactor() * value; }); }
this.unscaledMean = function () { return Statistics.sum(values) / values.length; }
this.mean = function () { return metric.scalingFactor() * this.unscaledMean(); }
this.min = function () { return metric.scalingFactor() * Statistics.min(values); }
this.max = function () { return metric.scalingFactor() * Statistics.max(values); }
this.confidenceIntervalDelta = function () {
return metric.scalingFactor() * Statistics.confidenceIntervalDelta(0.95, values.length,
Statistics.sum(values), Statistics.squareSum(values));
}
this.confidenceIntervalDeltaRatio = function () { return this.confidenceIntervalDelta() / this.mean(); }
this.percentDifference = function(other) { return (other.unscaledMean() - this.unscaledMean()) / this.unscaledMean(); }
this.isStatisticallySignificant = function (other) {
var diff = Math.abs(other.mean() - this.mean());
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
return diff > this.confidenceIntervalDelta() && diff > other.confidenceIntervalDelta();
}
this.run = function () { return associatedRun; }
}
function TestRun(entry) {
this.description = function () { return entry['description']; }
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
this.webkitRevision = function () { return entry['revisions']['WebKit']['revision']; }
this.label = function () {
var label = 'r' + this.webkitRevision();
if (this.description())
label += ' &dash; ' + this.description();
return label;
}
}
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
function PerfTestMetric(name, metric) {
var testResults = [];
var cachedUnit = null;
var cachedScalingFactor = null;
var unit = {'FrameRate': 'fps', 'Runs': 'runs/s', 'Score': 'pt', 'Time': 'ms', 'Malloc': 'bytes', 'JSHeap': 'bytes'}[metric];
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
// We can't do this in TestResult because all results for each test need to share the same unit and the same scaling factor.
function computeScalingFactorIfNeeded() {
// FIXME: We shouldn't be adjusting units on every test result.
// We can only do this on the first test.
if (!testResults.length || cachedUnit)
return;
var mean = testResults[0].unscaledMean(); // FIXME: We should look at all values.
var kilo = unit == 'bytes' ? 1024 : 1000;
if (mean > 10 * kilo * kilo && unit != 'ms') {
cachedScalingFactor = 1 / kilo / kilo;
cachedUnit = 'M ' + unit;
} else if (mean > 10 * kilo) {
cachedScalingFactor = 1 / kilo;
cachedUnit = unit == 'ms' ? 's' : ('K ' + unit);
} else {
cachedScalingFactor = 1;
cachedUnit = unit;
}
}
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
this.name = function () { return name + ':' + metric; }
this.isMemoryTest = function () { return metric == 'JSHeap' || metric == 'Malloc'; }
this.addResult = function (newResult) {
testResults.push(newResult);
cachedUnit = null;
cachedScalingFactor = null;
}
this.results = function () { return testResults; }
this.scalingFactor = function() {
computeScalingFactorIfNeeded();
return cachedScalingFactor;
}
this.unit = function () {
computeScalingFactorIfNeeded();
return cachedUnit;
}
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
this.smallerIsBetter = function () { return unit == 'ms' || unit == 'bytes'; }
}
var plotColor = 'rgb(230,50,50)';
var subpointsPlotOptions = {
lines: {show:true, lineWidth: 0},
color: plotColor,
points: {show: true, radius: 1},
bars: {show: false}};
var mainPlotOptions = {
xaxis: {
min: -0.5,
tickSize: 1,
},
crosshair: { mode: 'y' },
series: { shadowSize: 0 },
bars: {show: true, align: 'center', barWidth: 0.5},
lines: { show: false },
points: { show: true },
grid: {
borderWidth: 1,
borderColor: '#ccc',
backgroundColor: '#fff',
hoverable: true,
autoHighlight: false,
}
};
var timePlotOptions = {
yaxis: { show: false },
xaxis: { show: false },
lines: { show: true },
grid: { borderWidth: 1, borderColor: '#ccc' },
colors: [ plotColor ]
};
function createPlot(container, test) {
var section = $('<section><div class="plot"></div><div class="time-plots"></div>'
+ '<span class="tooltip"></span></section>');
section.children('.plot').css({'width': (100 * test.results().length + 25) + 'px', 'height': '300px'});
$(container).append(section);
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
var plotContainer = section.children('.plot');
var minIsZero = true;
attachPlot(test, plotContainer, minIsZero);
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
attachTimePlots(test, section.children('.time-plots'));
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
var tooltip = section.children('.tooltip');
plotContainer.bind('plothover', function (event, position, item) {
if (item) {
var postfix = item.series.id ? ' (' + item.series.id + ')' : '';
tooltip.html(item.datapoint[1].toPrecision(4) + postfix);
var sectionOffset = $(section).offset();
tooltip.css({left: item.pageX - sectionOffset.left - tooltip.outerWidth() / 2, top: item.pageY - sectionOffset.top + 10});
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
tooltip.fadeIn(200);
} else
tooltip.hide();
});
plotContainer.mouseout(function () {
tooltip.hide();
});
plotContainer.click(function (event) {
event.preventDefault();
minIsZero = !minIsZero;
attachPlot(test, plotContainer, minIsZero);
});
return section;
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
}
function attachTimePlots(test, container) {
var results = test.results();
var attachedPlot = false;
for (var i = 0; i < results.length; i++) {
container.append('<div></div>');
var values = results[i].values();
if (!values)
continue;
attachedPlot = true;
$.plot(container.children().last(), [values.map(function (value, index) { return [index, value]; })],
$.extend(true, {}, timePlotOptions, {yaxis: {min: Math.min.apply(Math, values) * 0.9, max: Math.max.apply(Math, values) * 1.1},
xaxis: {min: -0.5, max: values.length - 0.5}}));
}
if (!attachedPlot)
container.children().remove();
}
function attachPlot(test, plotContainer, minIsZero) {
var results = test.results();
var values = results.reduce(function (values, result, index) {
var newValues = result.values();
return newValues ? values.concat(newValues.map(function (value) { return [index, value]; })) : values;
}, []);
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
var plotData = [$.extend(true, {}, subpointsPlotOptions, {data: values})];
plotData.push({id: '&mu;', data: results.map(function (result, index) { return [index, result.mean()]; }), color: plotColor});
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
var overallMax = Statistics.max(results.map(function (result, index) { return result.max(); }));
var overallMin = Statistics.min(results.map(function (result, index) { return result.min(); }));
var margin = (overallMax - overallMin) * 0.1;
var currentPlotOptions = $.extend(true, {}, mainPlotOptions, {yaxis: {
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
min: minIsZero ? 0 : overallMin - margin,
max: minIsZero ? overallMax * 1.1 : overallMax + margin}});
currentPlotOptions.xaxis.max = results.length - 0.5;
currentPlotOptions.xaxis.ticks = results.map(function (result, index) { return [index, result.run().label()]; });
$.plot(plotContainer, plotData, currentPlotOptions);
}
function toFixedWidthPrecision(value) {
var decimal = value.toFixed(2);
return decimal;
}
function formatPercentage(fraction) {
var percentage = fraction * 100;
return (fraction * 100).toFixed(2) + '%';
}
function createTable(tests, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta) {
$('#container').html('<thead><tr><th>Test</th><th>Unit</th>' + runs.map(function (run, index) {
var colspan = 2;
if (index != referenceIndex)
colspan = 3;
if (hideConfidenceIntervalDelta)
colspan--;
return '<th colspan="' + colspan + '" class="{sorter: \'comparison\'}">' + run.label() + '</th>';
}).reduce(function (markup, cell) { return markup + cell; }, '') + '</tr></head><tbody></tbody>');
var testNames = [];
for (testName in tests)
testNames.push(testName);
testNames.sort().map(function (testName) {
var test = tests[testName];
if (test.isMemoryTest() != shouldIgnoreMemory)
createTableRow(runs, test, referenceIndex, hideConfidenceIntervalDelta);
});
$('#container').tablesorter({widgets: ['zebra']});
}
function linearRegression(points) {
// Implement http://www.easycalculation.com/statistics/learn-correlation.php.
// x = magnitude
// y = iterations
var sumX = 0;
var sumY = 0;
var sumXSquared = 0;
var sumYSquared = 0;
var sumXTimesY = 0;
for (var i = 0; i < points.length; i++) {
var x = i;
var y = points[i];
sumX += x;
sumY += y;
sumXSquared += x * x;
sumYSquared += y * y;
sumXTimesY += x * y;
}
var r = (points.length * sumXTimesY - sumX * sumY) /
Math.sqrt((points.length * sumXSquared - sumX * sumX) *
(points.length * sumYSquared - sumY * sumY));
if (isNaN(r) || r == Math.Infinity)
r = 0;
var slope = (points.length * sumXTimesY - sumX * sumY) / (points.length * sumXSquared - sumX * sumX);
var intercept = sumY / points.length - slope * sumX / points.length;
return {slope: slope, intercept: intercept, rSquared: r * r};
}
var warningSign = '<svg viewBox="0 0 100 100" style="width: 18px; height: 18px; vertical-align: bottom;" version="1.1">'
+ '<polygon fill="red" points="50,10 90,80 10,80 50,10" stroke="red" stroke-width="10" stroke-linejoin="round" />'
+ '<polygon fill="white" points="47,30 48,29, 50, 28.7, 52,29 53,30 50,60" stroke="white" stroke-width="10" stroke-linejoin="round" />'
+ '<circle cx="50" cy="73" r="6" fill="white" />'
+ '</svg>';
function createTableRow(runs, test, referenceIndex, hideConfidenceIntervalDelta) {
var tableRow = $('<tr><td class="test">' + test.name() + '</td><td class="unit">' + test.unit() + '</td></tr>');
function markupForRun(result, referenceResult) {
var comparisonCell = '';
var hiddenValue = '';
var shouldCompare = result !== referenceResult;
if (shouldCompare && referenceResult) {
var percentDifference = referenceResult.percentDifference(result);
var better = test.smallerIsBetter() ? percentDifference < 0 : percentDifference > 0;
var comparison = '';
var className = 'comparison';
if (referenceResult.isStatisticallySignificant(result)) {
comparison = formatPercentage(Math.abs(percentDifference)) + (better ? ' Better' : ' Worse&nbsp;');
className += better ? ' better' : ' worse';
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
}
hiddenValue = '<span style="display: none">|' + comparison + '</span>';
comparisonCell = '<td class="' + className + '">' + comparison + '</td>';
} else if (shouldCompare)
comparisonCell = '<td class="comparison"></td>';
var values = result.values();
var warning = '';
var regressionAnalysis = '';
if (values && values.length > 3) {
regressionResult = linearRegression(values);
regressionAnalysis = 'slope=' + toFixedWidthPrecision(regressionResult.slope)
+ ', R^2=' + toFixedWidthPrecision(regressionResult.rSquared);
if (regressionResult.rSquared > 0.6 && Math.abs(regressionResult.slope) > 0.01) {
warning = ' <span class="regression-warning" title="Detected a time dependency with ' + regressionAnalysis + '">' + warningSign + ' </span>';
}
}
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
var statistics = '&sigma;=' + toFixedWidthPrecision(result.confidenceIntervalDelta()) + ', min=' + toFixedWidthPrecision(result.min())
+ ', max=' + toFixedWidthPrecision(result.max()) + '\n' + regressionAnalysis;
var confidenceIntervalDeltaCell = '';
if (!hideConfidenceIntervalDelta) {
confidenceIntervalDeltaCell = '<td class="confidenceIntervalDelta" title="' + statistics + '">&plusmn; '
+ formatPercentage(result.confidenceIntervalDeltaRatio()) + warning + '</td>';
}
// Tablesorter doesn't know about the second cell so put the comparison in the invisible element.
return '<td class="result" title="' + statistics + '">' + toFixedWidthPrecision(result.mean()) + hiddenValue
+ '</td>' + confidenceIntervalDeltaCell + comparisonCell;
}
function markupForMissingRun(isReference) {
return '<td colspan="' + (isReference ? 2 : 3) + '" class="missing">Missing</td>';
}
var runIndex = 0;
var results = test.results();
var referenceResult = undefined;
var resultIndexMap = {};
for (var i = 0; i < results.length; i++) {
while (runs[runIndex] !== results[i].run())
runIndex++;
if (runIndex == referenceIndex)
referenceResult = results[i];
resultIndexMap[runIndex] = i;
}
for (var i = 0; i < runs.length; i++) {
var resultIndex = resultIndexMap[i];
if (resultIndex == undefined)
tableRow.append(markupForMissingRun(i == referenceIndex));
else
tableRow.append(markupForRun(results[resultIndex], referenceResult));
}
$('#container').children('tbody').last().append(tableRow);
tableRow.click(function (event) {
if (event.target != tableRow[0] && event.target.parentNode != tableRow[0])
return;
event.preventDefault();
var firstCell = tableRow.children('td').first();
if (firstCell.children('section').length) {
firstCell.children('section').remove();
tableRow.children('td').css({'padding-bottom': ''});
} else {
var plot = createPlot(firstCell, test);
plot.css({'position': 'absolute', 'z-index': 2});
var offset = tableRow.offset();
offset.left += 1;
offset.top += tableRow.outerHeight();
plot.offset(offset);
tableRow.children('td').css({'padding-bottom': plot.outerHeight() + 5});
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
}
return false;
});
}
function init() {
$.tablesorter.addParser({
id: 'comparison',
is: function(s) {
return s.indexOf('|') >= 0;
},
format: function(s) {
var parsed = parseFloat(s.substring(s.indexOf('|') + 1));
return isNaN(parsed) ? 0 : parsed;
},
type: 'numeric',
});
var runs = [];
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
var metrics = {};
$.each(JSON.parse(document.getElementById('json').textContent), function (index, entry) {
var run = new TestRun(entry);
runs.push(run);
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
function addTests(tests, parentFullName) {
for (var testName in tests) {
var fullTestName = parentFullName + '/' + testName;
var rawMetrics = tests[testName].metrics;
for (var metricName in rawMetrics) {
var fullMetricName = fullTestName + ':' + metricName;
var metric = metrics[fullMetricName];
if (!metric) {
metric = new PerfTestMetric(fullTestName, metricName);
metrics[fullMetricName] = metric;
}
metric.addResult(new TestResult(metric, rawMetrics[metricName].current, run));
}
if (tests[testName].tests)
addTests(tests[testName].tests, fullTestName);
}
}
addTests(entry.tests, '');
});
var shouldIgnoreMemory= true;
var referenceIndex = 0;
var hideConfidenceIntervalDelta = false;
Use perf.webkit.org JSON format in results page https://bugs.webkit.org/show_bug.cgi?id=110842 Reviewed by Benjamin Poulain. PerformanceTests: Updated the results page template to use the new JSON format. Since new JSON format doesn't contain statistics such as stdev and min, added statistics.js to compute these values. Also use 95% percentile confidence interval instead of standard deviation in various places. * resources/results-template.html: Added statistics.js as dependency. (TestResult): Updated to take a metric instead of its test. Replaced stdev() with confidenceIntervalDelta() now that we have a fancy Statistics class. (TestRun.webkitRevision): (PerfTestMetric): Renamed from PerfTest since this object now encapsulates each measurement (such as time, JS heap, and malloc) in test. Also added a conversion table from a metric name to a unit since new format doesn't contain units. (PerfTestMetric.name): Updated to compute the full metric name from test name and metric name, matching the old behavior. (PerfTestMetric.isMemoryTest): Explicitly look for 'JSHeap' and 'Malloc' tests. (PerfTestMetric.smallerIsBetter): (attachPlot): Deleted the code to deal with tests that don't provide individual iteration measurement since such tests no longer exist. Also fixed up the code compute y-axis range. (createTableRow.markupForRun): Updated to use confidenceIntervalDelta() instead of stdev(). (init.addTests): Added. Recursively add metrics. * resources/statistics.js: Added. Imported from perf.webkit.org. (Statistics.max): (Statistics.min): (Statistics.sum): (Statistics.squareSum): (Statistics.sampleStandardDeviation): (Statistics.supportedConfidenceLevels): (Statistics.confidenceIntervalDelta): (Statistics.confidenceInterval): Tools: Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org. A whole bunch of integration tests have been updated to use the new JSON format. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output and legacy_output_json_path respectively. (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available. (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default JSON file and the results page out of perf_webkit_output instead of legacy_output. * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: (MainTest.test_run_memory_test): (MainTest._test_run_with_json_output.mock_upload_json): (MainTest): (MainTest.test_run_with_json_output): (MainTest.test_run_with_description): (MainTest.test_run_generates_json_by_default): (MainTest.test_run_merges_output_by_default): (MainTest.test_run_respects_reset_results): (MainTest.test_run_generates_and_show_results_page): (MainTest.test_run_with_slave_config_json): (MainTest.test_run_with_multiple_repositories): (MainTest.test_run_with_upload_json): (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Canonical link: https://commits.webkit.org/129229@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-27 05:02:14 +00:00
createTable(metrics, runs, shouldIgnoreMemory, referenceIndex);
$('#time-memory').bind('change', function (event, checkedElement) {
shouldIgnoreMemory = checkedElement.textContent == 'Time';
createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
});
runs.map(function (run, index) {
$('#reference').append('<span value="' + index + '"' + (index == referenceIndex ? ' class="checked"' : '') + '>' + run.label() + '</span>');
})
$('#reference').bind('change', function (event, checkedElement) {
referenceIndex = parseInt(checkedElement.getAttribute('value'));
createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
});
$('#confidenceIntervalDelta').bind('change', function (event, checkedElement) {
hideConfidenceIntervalDelta = checkedElement.textContent == 'Hide';
createTable(metrics, runs, shouldIgnoreMemory, referenceIndex, hideConfidenceIntervalDelta);
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
});
$('.checkbox').each(function (index, checkbox) {
$(checkbox).children('span').click(function (event) {
if ($(this).hasClass('checked'))
return;
$(checkbox).children('span').removeClass('checked');
$(this).addClass('checked');
$(checkbox).trigger('change', $(this));
});
});
}
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
</script>
<script id="json" type="application/json">%PeformanceTestsResultsJSON%</script>
run-perf-tests should generate a results page https://bugs.webkit.org/show_bug.cgi?id=92575 Reviewed by Eric Seidel. PerformanceTests: Add a results page template. This page includes flot and flot.fillbetween. jQuery and the json that contains test results are injected by run-perf-tests. * resources/results-template.html: Added. Tools: Added the ability to generate a results page that summarizes performance test results from multiple runs of run-perf-tests when --output-json-path is specified and --test-results-server is not specified. We cannot generate a results page when --test-results-server is specified because perf-o-matic cannot parse the new JSON format. The new JSON format is simply an array of the old JSON output. This JSON is then merged into results-template.html along with jQuery and copied as a HTML file of the same filename as the output JSON file with a .html extension. We merge all scripts and the JSON output into the results page as opposed to including them with the src content attribute to make it standalone so that we may post it on Bugzilla or e-mail it to someone else without breaking it. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner.run): (PerfTestsRunner._generate_json): Merge "contents" with the existing JSON file when generating a results page, and generate the results page from results-template.html merged with jQuery and the generated JSON output. * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (_test_run_with_json_output): Extracted from test_run_with_upload_json to be shared with several test cases. (_test_run_with_json_output.mock_upload_json): Ditto. (test_run_with_json_output): Refactored to use _test_run_with_json_output. (test_run_generates_results_page): Added. Tests the new feature. (test_run_with_json_source): Refactored to use _test_run_with_json_output. (test_run_with_multiple_repositories): Ditto. (test_run_with_upload_json): Ditto. Canonical link: https://commits.webkit.org/110419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-07-29 22:03:35 +00:00
</body>
</html>