run-perf-tests should timeout sooner
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 20:29:17 +0000 (20:29 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 20:29:17 +0000 (20:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77026

Reviewed by Adam Barth.

Bump off the timeout from 10 minutes to 4 minutes.

Also use float instead of str in test result values to compress the size of json files bots upload.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args):
(PerfTestsRunner._process_chromium_style_test_result):
(PerfTestsRunner._process_parser_test_result):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_run_test_set_for_parser_tests):
(test_run_test_set_with_json_output):
(test_run_test_set_with_json_source):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py

index 0ad958c..c84caeb 100644 (file)
@@ -1,3 +1,23 @@
+2012-01-25  Ryosuke Niwa  <rniwa@webkit.org>
+
+        run-perf-tests should timeout sooner
+        https://bugs.webkit.org/show_bug.cgi?id=77026
+
+        Reviewed by Adam Barth.
+
+        Bump off the timeout from 10 minutes to 4 minutes.
+
+        Also use float instead of str in test result values to compress the size of json files bots upload.
+
+        * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+        (PerfTestsRunner._parse_args):
+        (PerfTestsRunner._process_chromium_style_test_result):
+        (PerfTestsRunner._process_parser_test_result):
+        * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+        (test_run_test_set_for_parser_tests):
+        (test_run_test_set_with_json_output):
+        (test_run_test_set_with_json_source):
+
 2012-01-25  Enrica Casucci  <enrica@apple.com>
 
         WebView should implement typingAttributes methods to work correctly with the Inspector bar in Mail.
index d2713e4..cddb17d 100644 (file)
@@ -88,7 +88,7 @@ class PerfTestsRunner(object):
                 help="Check to ensure the DumpRenderTree build is up-to-date (default)."),
             optparse.make_option("--build-directory",
                 help="Path to the directory under which build files are kept (should not include configuration)"),
-            optparse.make_option("--time-out-ms", default=600 * 1000,
+            optparse.make_option("--time-out-ms", default=240 * 1000,
                 help="Set the timeout for each test"),
             optparse.make_option("--output-json-path",
                 help="Filename of the JSON file that summaries the results"),
@@ -238,7 +238,7 @@ class PerfTestsRunner(object):
         for line in re.split('\n', output.text):
             resultLine = self._inspector_result_regex.match(line)
             if resultLine:
-                self._results[resultLine.group('name').replace(' ', '')] = int(resultLine.group('value'))
+                self._results[resultLine.group('name').replace(' ', '')] = float(resultLine.group('value'))
                 self._buildbot_output.write("%s\n" % line)
                 got_a_result = True
             elif not len(line) == 0:
@@ -272,7 +272,7 @@ class PerfTestsRunner(object):
         for line in re.split('\n', output.text):
             score = score_regex.match(line)
             if score:
-                results[score.group(1)] = score.group(2)
+                results[score.group(1)] = float(score.group(2))
                 continue
 
             if not self._should_ignore_line_in_parser_test_result(line):
index 0996c8e..cfdaf7b 100755 (executable)
@@ -171,9 +171,9 @@ max 1120
         unexpected_result_count = runner._run_tests_set(tests, runner._port)
         self.assertEqual(unexpected_result_count, 0)
         self.assertEqual(buildbot_output.get()[0], 'RESULT Bindings: event-target-wrapper= 1489.05 ms\n')
-        self.assertEqual(buildbot_output.get()[1], 'median= 1487 ms, stdev= 14.46 ms, min= 1471 ms, max= 1510 ms\n')
-        self.assertEqual(buildbot_output.get()[2], 'RESULT Parser: some-parser= 1100 ms\n')
-        self.assertEqual(buildbot_output.get()[3], 'median= 1101 ms, stdev= 11 ms, min= 1080 ms, max= 1120 ms\n')
+        self.assertEqual(buildbot_output.get()[1], 'median= 1487.0 ms, stdev= 14.46 ms, min= 1471.0 ms, max= 1510.0 ms\n')
+        self.assertEqual(buildbot_output.get()[2], 'RESULT Parser: some-parser= 1100.0 ms\n')
+        self.assertEqual(buildbot_output.get()[3], 'median= 1101.0 ms, stdev= 11.0 ms, min= 1080.0 ms, max= 1120.0 ms\n')
 
     def test_run_test_set_with_json_output(self):
         buildbot_output = array_stream.ArrayStream()
@@ -184,12 +184,12 @@ max 1120
         self.assertEqual(runner.run(), 0)
         self.assertEqual(len(buildbot_output.get()), 3)
         self.assertEqual(buildbot_output.get()[0], 'RESULT Bindings: event-target-wrapper= 1489.05 ms\n')
-        self.assertEqual(buildbot_output.get()[1], 'median= 1487 ms, stdev= 14.46 ms, min= 1471 ms, max= 1510 ms\n')
+        self.assertEqual(buildbot_output.get()[1], 'median= 1487.0 ms, stdev= 14.46 ms, min= 1471.0 ms, max= 1510.0 ms\n')
         self.assertEqual(buildbot_output.get()[2], 'RESULT group_name: test_name= 42 ms\n')
 
         self.assertEqual(json.loads(runner._host.filesystem.files['/mock-checkout/output.json']), {
             "timestamp": 123456789, "results":
-            {"event-target-wrapper": {"max": "1510", "avg": "1489.05", "median": "1487", "min": "1471", "stdev": "14.46"},
+            {"event-target-wrapper": {"max": 1510, "avg": 1489.05, "median": 1487, "min": 1471, "stdev": 14.46},
             "group_name:test_name": 42},
             "revision": 1234})
 
@@ -204,12 +204,12 @@ max 1120
         self.assertEqual(runner.run(), 0)
         self.assertEqual(len(buildbot_output.get()), 3)
         self.assertEqual(buildbot_output.get()[0], 'RESULT Bindings: event-target-wrapper= 1489.05 ms\n')
-        self.assertEqual(buildbot_output.get()[1], 'median= 1487 ms, stdev= 14.46 ms, min= 1471 ms, max= 1510 ms\n')
+        self.assertEqual(buildbot_output.get()[1], 'median= 1487.0 ms, stdev= 14.46 ms, min= 1471.0 ms, max= 1510.0 ms\n')
         self.assertEqual(buildbot_output.get()[2], 'RESULT group_name: test_name= 42 ms\n')
 
         self.assertEqual(json.loads(runner._host.filesystem.files['/mock-checkout/output.json']), {
             "timestamp": 123456789, "results":
-            {"event-target-wrapper": {"max": "1510", "avg": "1489.05", "median": "1487", "min": "1471", "stdev": "14.46"},
+            {"event-target-wrapper": {"max": 1510, "avg": 1489.05, "median": 1487, "min": 1471, "stdev": 14.46},
             "group_name:test_name": 42},
             "revision": 1234,
             "key": "value"})