Android: re-add perf test summary.
This was lost when we unified the perf test runner in crrev.com/217665. BUG=343900 Review URL: https://codereview.chromium.org/166433004 git-svn-id: http://src.chromium.org/svn/trunk/src/build@251650 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
65096f9ce7
Коммит
1413e72314
|
@ -81,6 +81,24 @@ def PrintTestOutput(test_name):
|
||||||
return persisted_result['exit_code']
|
return persisted_result['exit_code']
|
||||||
|
|
||||||
|
|
||||||
|
def PrintSummary(test_names):
|
||||||
|
logging.info('*' * 80)
|
||||||
|
logging.info('Sharding summary')
|
||||||
|
total_time = 0
|
||||||
|
for test_name in test_names:
|
||||||
|
file_name = os.path.join(constants.PERF_OUTPUT_DIR, test_name)
|
||||||
|
if not os.path.exists(file_name):
|
||||||
|
logging.info('%s : No status file found', test_name)
|
||||||
|
continue
|
||||||
|
with file(file_name, 'r') as f:
|
||||||
|
result = pickle.loads(f.read())
|
||||||
|
logging.info('%s : exit_code=%d in %d secs at %s',
|
||||||
|
result['name'], result['exit_code'], result['total_time'],
|
||||||
|
result['device'])
|
||||||
|
total_time += result['total_time']
|
||||||
|
logging.info('Total steps time: %d secs', total_time)
|
||||||
|
|
||||||
|
|
||||||
class _HeartBeatLogger(object):
|
class _HeartBeatLogger(object):
|
||||||
# How often to print the heartbeat on flush().
|
# How often to print the heartbeat on flush().
|
||||||
_PRINT_INTERVAL = 30.0
|
_PRINT_INTERVAL = 30.0
|
||||||
|
|
|
@ -649,6 +649,8 @@ def _RunPerfTests(options, args, error_func, devices):
|
||||||
if perf_options.single_step:
|
if perf_options.single_step:
|
||||||
return perf_test_runner.PrintTestOutput('single_step')
|
return perf_test_runner.PrintTestOutput('single_step')
|
||||||
|
|
||||||
|
perf_test_runner.PrintSummary(tests)
|
||||||
|
|
||||||
# Always return 0 on the sharding stage. Individual tests exit_code
|
# Always return 0 on the sharding stage. Individual tests exit_code
|
||||||
# will be returned on the print_step stage.
|
# will be returned on the print_step stage.
|
||||||
return 0
|
return 0
|
||||||
|
|
Загрузка…
Ссылка в новой задаче