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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144141 268f45cc-cd09-0410-ab3c-d52691b4dbfc