Commit abee0224 authored by Wenbin Zhang's avatar Wenbin Zhang Committed by Commit Bot

[benchmarking] Add similar time log for gtests

Add log to make execution time of gtest visible from task page.

Bug: chromium:1138988
Change-Id: I12072412628e612c38c3bc172b2bb94bd115b5ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511029
Auto-Submit: Wenbin Zhang <wenbinzhang@google.com>
Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822821}
parent 05045156
...@@ -275,6 +275,8 @@ def write_simple_test_results(return_code, output_filepath, benchmark_name): ...@@ -275,6 +275,8 @@ def write_simple_test_results(return_code, output_filepath, benchmark_name):
def execute_gtest_perf_test(command_generator, output_paths, use_xvfb=False): def execute_gtest_perf_test(command_generator, output_paths, use_xvfb=False):
start = time.time()
env = os.environ.copy() env = os.environ.copy()
# Assume we want to set up the sandbox environment variables all the # Assume we want to set up the sandbox environment variables all the
# time; doing so is harmless on non-Linux platforms and is needed # time; doing so is harmless on non-Linux platforms and is needed
...@@ -336,6 +338,10 @@ def execute_gtest_perf_test(command_generator, output_paths, use_xvfb=False): ...@@ -336,6 +338,10 @@ def execute_gtest_perf_test(command_generator, output_paths, use_xvfb=False):
return_code = 1 return_code = 1
write_simple_test_results(return_code, output_paths.test_results, write_simple_test_results(return_code, output_paths.test_results,
output_paths.name) output_paths.name)
print_duration(
'executing gtest %s' % command_generator.executable_name, start)
return return_code return return_code
......
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