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

[benchmarking] Return failure when uploading benchmarks timed out

Currently when the build failed on uploading perf data, it will not be
reported. We should return failure when this happens.

Bug: chromium:1035935
Change-Id: I1c01e30747266263bbd1ed8ea83754c21fc5846c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1984724
Commit-Queue: Wenbin Zhang <wenbinzhang@google.com>
Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728753}
parent 9ebd1301
......@@ -487,13 +487,15 @@ def _handle_perf_results(
# the problem is fixed on the dashboard side.
# pool = multiprocessing.Pool(_GetCpuCount())
pool = multiprocessing.Pool(2)
upload_result_timeout = False
try:
async_result = pool.map_async(
_upload_individual_benchmark, invocations)
# TODO(crbug.com/947035): What timeout is reasonable?
results = async_result.get(timeout=4000)
except multiprocessing.TimeoutError:
logging.error('Failed uploading benchmarks to perf dashboard in parallel')
upload_result_timeout = True
logging.error('Timeout uploading benchmarks to perf dashboard in parallel')
results = []
for benchmark_name in benchmark_directory_map:
results.append((benchmark_name, False))
......@@ -530,7 +532,7 @@ def _handle_perf_results(
extra_links[logdog_label] = logdog_stream
end_time = time.time()
print_duration('Uploading results to perf dashboard', begin_time, end_time)
if upload_failures_counter > 0:
if upload_result_timeout or upload_failures_counter > 0:
return 1, benchmark_upload_result_map
return 0, benchmark_upload_result_map
......
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