summaryrefslogtreecommitdiffstats
path: root/webkit/tools/layout_tests/layout_package
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-08 19:31:51 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-08 19:31:51 +0000
commitb6f2b3d611de57b44f47be6a3d4c56bd7cd7a54a (patch)
tree848c8ff7b5cead22d4b8928c024d75d4f5c832b9 /webkit/tools/layout_tests/layout_package
parent20595ea7d410241f8e44dde5768a9355dfc82a2d (diff)
downloadchromium_src-b6f2b3d611de57b44f47be6a3d4c56bd7cd7a54a.zip
chromium_src-b6f2b3d611de57b44f47be6a3d4c56bd7cd7a54a.tar.gz
chromium_src-b6f2b3d611de57b44f47be6a3d4c56bd7cd7a54a.tar.bz2
Print times for individual tests that take longer than 1 second to run.
On my quad-core mac, this was <100 tests. I'm hoping we can gather some data for implementing bug 9324. Review URL: http://codereview.chromium.org/63127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/layout_tests/layout_package')
-rw-r--r--webkit/tools/layout_tests/layout_package/test_shell_thread.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/webkit/tools/layout_tests/layout_package/test_shell_thread.py b/webkit/tools/layout_tests/layout_package/test_shell_thread.py
index 61a5d87..bd1e142 100644
--- a/webkit/tools/layout_tests/layout_package/test_shell_thread.py
+++ b/webkit/tools/layout_tests/layout_package/test_shell_thread.py
@@ -175,6 +175,7 @@ class TestShellThread(threading.Thread):
self._canceled = False
self._exception_info = None
self._timing_stats = {}
+ self._test_times = []
# Current directory of tests we're running.
self._current_dir = None
@@ -203,6 +204,11 @@ class TestShellThread(threading.Thread):
(number of tests in that directory, time to run the tests)"""
return self._timing_stats;
+ def GetIndividualTestTimingStats(self):
+ """Returns a list of (time, test_filename) tuples where time is the
+ time it took to run the test."""
+ return self._test_times
+
def Cancel(self):
"""Set a flag telling this thread to quit."""
self._canceled = True
@@ -339,10 +345,15 @@ class TestShellThread(threading.Thread):
# try to recover here.
self._test_shell_proc.stdin.flush()
+ start_time = time.time()
+
# ...and read the response
- return ProcessOutput(self._test_shell_proc, filename, test_uri,
- self._test_types, self._test_args,
- self._options.target)
+ failures = ProcessOutput(self._test_shell_proc, filename, test_uri,
+ self._test_types, self._test_args, self._options.target)
+
+ time_to_run_test = time.time() - start_time
+ self._test_times.append((time_to_run_test, filename))
+ return failures
def _EnsureTestShellIsRunning(self):