Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: tools/testrunner/local/progress.py

Issue 1863793005: [test] Report more test duration data. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Float + total. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/progress.py
diff --git a/tools/testrunner/local/progress.py b/tools/testrunner/local/progress.py
index 4e1be3e4cf60d48e3f373408884bb7775051f78f..e27344a2a4164a5d9c75f6fabfcd531663ecdd48 100644
--- a/tools/testrunner/local/progress.py
+++ b/tools/testrunner/local/progress.py
@@ -34,6 +34,7 @@ import time
from . import execution
from . import junit_output
+from . import statusfile
ABS_PATH_PREFIX = os.getcwd() + os.sep
@@ -329,6 +330,12 @@ class JsonTestProgressIndicator(ProgressIndicator):
# Buildbot might start out with an empty file.
complete_results = json.loads(f.read() or "[]")
+ duration_mean = None
+ if self.tests:
+ # Get duration mean.
+ duration_mean = (
+ sum(t.duration for t in self.tests) / float(len(self.tests)))
+
# Sort tests by duration.
timed_tests = [t for t in self.tests if t.duration is not None]
timed_tests.sort(lambda a, b: cmp(b.duration, a.duration))
@@ -338,6 +345,7 @@ class JsonTestProgressIndicator(ProgressIndicator):
"flags": test.flags,
"command": self._EscapeCommand(test).replace(ABS_PATH_PREFIX, ""),
"duration": test.duration,
+ "marked_slow": statusfile.IsSlow(test.outcomes),
} for test in timed_tests[:20]
]
@@ -346,6 +354,8 @@ class JsonTestProgressIndicator(ProgressIndicator):
"mode": self.mode,
"results": self.results,
"slowest_tests": slowest_tests,
+ "duration_mean": duration_mean,
+ "test_total": len(self.tests),
})
with open(self.json_test_results, "w") as f:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698