Perf-o-matic should store "values" and support array'ed input
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 21:22:08 +0000 (21:22 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 21:22:08 +0000 (21:22 +0000)
commit293ba182c62f3d4608a15bb35f0c0988d31d1fbc
tree667406b57dd219e7103ed17cb02a8a32550a4b3c
parent72f68c32c366268e32bd676db4c6f4625c449fa0
Perf-o-matic should store "values" and support array'ed input
https://bugs.webkit.org/show_bug.cgi?id=97601

Reviewed by Dirk Pranke.

Support new JSON format where the outermost structure is an array instead of a dictionary and results may
contain "values". This change will let us remove some code from run-perf-tests.

Old: {"webkit-revision": 123456, "results": {"test": {"avg": 123}}
New: [{"webkit-revision": 123456, "results": {"test": {"avg": 123, values: [122, 123, 124]}}}]

* Websites/webkit-perf.appspot.com/app.yaml: Incremented the version number.
* Websites/webkit-perf.appspot.com/models.py:
(TestResult): Added values property.
(TestResult.get_or_insert_from_parsed_json): Pass in "values" to the constructor if the value is present.
(ReportLog.get_value): Use the first item in the array if self._parsed uses the new format.
(ReportLog.results_are_well_formed): Verifies that items in "values" are floats convertible. Also verify that
if the JSON uses new format, there is exactly one set of results. In theory, we could support multiple results
but we don't do that now for its complexity.
* Websites/webkit-perf.appspot.com/models_unittest.py:
(TestResultTests.test_get_or_insert_stat_value): Make sure values is present and is an empty list.
(TestResultTests.test_get_or_insert_stat_value_with_values): Added.
(ReportLogTests.test_results_are_well_formed):
(ReportLogTests.test_chromium_revision): Renamed from chromium_revision so that it actually runs.
(ReportLogTests.test_results_in_array):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
Websites/webkit-perf.appspot.com/app.yaml
Websites/webkit-perf.appspot.com/models.py
Websites/webkit-perf.appspot.com/models_unittest.py