Revision: 21569
Author:   [email protected]
Date:     Wed May 28 13:01:47 2014 UTC
Log:      Use non-copying sorting in test harness.

[email protected]

Review URL: https://codereview.chromium.org/300873006
http://code.google.com/p/v8/source/detail?r=21569

Modified:
 /branches/bleeding_edge/tools/testrunner/local/execution.py

=======================================
--- /branches/bleeding_edge/tools/testrunner/local/execution.py Wed May 28 10:49:10 2014 UTC +++ /branches/bleeding_edge/tools/testrunner/local/execution.py Wed May 28 13:01:47 2014 UTC
@@ -64,8 +64,10 @@
     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 @@
     # 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

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to