Build fix after r125178.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Aug 2012 18:27:46 +0000 (18:27 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Aug 2012 18:27:46 +0000 (18:27 +0000)
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest.parse_output): Don't include non-time results in the JSON output.
* Scripts/webkitpy/performance_tests/perftest_unittest.py: Updated the test outputs so to match
actual test outputs.
(MainTest.test_parse_output):
(MainTest.test_parse_output_with_failing_line):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: Ditto.

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

Tools/ChangeLog
Tools/Scripts/webkitpy/performance_tests/perftest.py
Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py

index 8cceb8c..d195d48 100644 (file)
@@ -1,3 +1,15 @@
+2012-08-09  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Build fix after r125178.
+
+        * Scripts/webkitpy/performance_tests/perftest.py:
+        (PerfTest.parse_output): Don't include non-time results in the JSON output.
+        * Scripts/webkitpy/performance_tests/perftest_unittest.py: Updated the test outputs so to match
+        actual test outputs.
+        (MainTest.test_parse_output):
+        (MainTest.test_parse_output_with_failing_line):
+        * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: Ditto.
+
 2012-08-09  Zoltan Horvath  <zoltan@webkit.org>
 
         JSHeap and FastMallocStatistics based memory measurement for performance-tests
index ff7e291..bdb39c4 100644 (file)
@@ -156,7 +156,7 @@ class PerfTest(object):
         if results[self._result_classes[1]] and results[self._result_classes[2]]:
             self.output_statistics(test_name + "/JSHeap", results[self._result_classes[1]])
             self.output_statistics(test_name + "/FastMalloc", results[self._result_classes[2]])
-        return {test_name: results}
+        return {test_name: results['Time:']}
 
     def output_statistics(self, test_name, results, description_string=None):
         unit = results['unit']
index 4fca894..47fe623 100755 (executable)
@@ -49,11 +49,12 @@ class MainTest(unittest.TestCase):
             'Running 20 times',
             'Ignoring warm-up run (1115)',
             '',
-            'avg 1100',
-            'median 1101',
-            'stdev 11',
-            'min 1080',
-            'max 1120']), image=None, image_hash=None, audio=None)
+            'Time:',
+            'avg 1100 ms',
+            'median 1101 ms',
+            'stdev 11 ms',
+            'min 1080 ms',
+            'max 1120 ms']), image=None, image_hash=None, audio=None)
         output_capture = OutputCapture()
         output_capture.capture_output()
         try:
@@ -61,6 +62,7 @@ class MainTest(unittest.TestCase):
             self.assertEqual(test.parse_output(output),
                 {'some-test': {'avg': 1100.0, 'median': 1101.0, 'min': 1080.0, 'max': 1120.0, 'stdev': 11.0, 'unit': 'ms'}})
         finally:
+            pass
             actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
         self.assertEqual(actual_stdout, '')
         self.assertEqual(actual_stderr, '')
@@ -73,11 +75,12 @@ class MainTest(unittest.TestCase):
             '',
             'some-unrecognizable-line',
             '',
-            'avg 1100',
-            'median 1101',
-            'stdev 11',
-            'min 1080',
-            'max 1120']), image=None, image_hash=None, audio=None)
+            'Time:'
+            'avg 1100 ms',
+            'median 1101 ms',
+            'stdev 11 ms',
+            'min 1080 ms',
+            'max 1120 ms']), image=None, image_hash=None, audio=None)
         output_capture = OutputCapture()
         output_capture.capture_output()
         try:
index d2649e2..e57ce67 100755 (executable)
@@ -87,21 +87,23 @@ Ignoring warm-up run (1502)
 1475
 1471
 
-avg 1489.05
-median 1487
-stdev 14.46
-min 1471
-max 1510
+Time:
+avg 1489.05 ms
+median 1487 ms
+stdev 14.46 ms
+min 1471 ms
+max 1510 ms
 """
             elif driver_input.test_name.endswith('some-parser.html'):
                 text = """Running 20 times
 Ignoring warm-up run (1115)
 
-avg 1100
-median 1101
-stdev 11
-min 1080
-max 1120
+Time:
+avg 1100 ms
+median 1101 ms
+stdev 11 ms
+min 1080 ms
+max 1120 ms
 """
             return DriverOutput(text, '', '', '', crash=crash, timeout=timeout)