Commit ceaeca9d authored by Sergiy Belozorov's avatar Sergiy Belozorov Committed by Commit Bot

[tools] Record durations also for unsuccesful runs

This is needed to allow deriving timeout and near_timeout runnables on the
recipe side and drop corresponding fields in the output.

We also remove some unused code that was removed in previous refactoring CLs.

R=tmrts@chromium.org

No-Try: true
No-Tree-Checks: true
Bug: chromium:841700
Change-Id: Ib7cec9baceff994fb9b32be09ba4a4079ebff2c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1588417
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: 's avatarTamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61095}
parent 28294e87
......@@ -245,15 +245,6 @@ class ResultTracker(object):
return json.dumps(self.ToDict(), indent=2, separators=(',', ': '))
def Unzip(iterable):
left = []
right = []
for l, r in iterable:
left.append(l)
right.append(r)
return lambda: iter(left), lambda: iter(right)
def RunResultsProcessor(results_processor, output, count):
# Dummy pass through for null-runs.
if output.stdout is None:
......@@ -472,7 +463,6 @@ class RunnableConfig(GraphConfig):
result_tracker: ResultTracker object to be updated.
count: Index of the test run (used for better logging).
"""
result_tracker.AddRunnableDuration(self, output.duration)
if self.results_processor:
output = RunResultsProcessor(self.results_processor, output, count)
......@@ -1016,14 +1006,16 @@ def Main(argv):
runnable_name + '/' != args.filter):
continue
logging.info('>>> Running suite: %s', runnable_name)
durations = []
durations_secondary = []
for i in range(0, max(1, args.run_count or runnable.run_count)):
attempts_left = runnable.retry_count + 1
while attempts_left:
output, output_secondary = platform.Run(
runnable, i, secondary=args.shell_dir_secondary)
result_tracker.AddRunnableDuration(runnable, output.duration)
result_tracker_secondary.AddRunnableDuration(
runnable, output_secondary.duration)
if output.IsSuccess() and output_secondary.IsSuccess():
runnable.ProcessOutput(output, result_tracker, i)
if output_secondary is not NULL_OUTPUT:
......
......@@ -489,14 +489,6 @@ class PerfTest(unittest.TestCase):
self._VerifyMock(os.path.join('out', 'x64.release', 'd7'),
'--flag', '--prof', 'run.js')
def testUnzip(self):
def Gen():
for i in [1, 2, 3]:
yield i, i + 1
l, r = run_perf.Unzip(Gen())
self.assertListEqual([1, 2, 3], list(l()))
self.assertListEqual([2, 3, 4], list(r()))
#############################################################################
### System tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment