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

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

Issue 300873006: Use non-copying sorting in test harness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed moar comments by Michael Achenbach. Created 6 years, 7 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/execution.py
diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py
index 80a5989be2f255a672b872adca74b284ad2ef49c..ac69eab3c912c81f4a7eeb78ab727a0055e6503f 100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -64,8 +64,10 @@ class Runner(object):
self.perf_data_manager = perfdata.PerfDataManager(datapath)
self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode)
self.tests = [ t for s in suites for t in s.tests ]
- for t in self.tests:
- t.duration = self.perfdata.FetchPerfData(t) or 1.0
+ if not context.no_sorting:
+ for t in self.tests:
+ t.duration = self.perfdata.FetchPerfData(t) or 1.0
+ self.tests.sort(key=lambda t: t.duration, reverse=True)
self._CommonInit(len(self.tests), progress_indicator, context)
def _CommonInit(self, num_tests, progress_indicator, context):
@@ -94,8 +96,6 @@ class Runner(object):
# while the queue is filled.
queue = []
queued_exception = None
- if not self.context.no_sorting:
- self.tests = sorted(self.tests, key=lambda t: t.duration, reverse=True)
for test in self.tests:
assert test.id >= 0
test_map[test.id] = test
« 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