Skip to content

Commit 3594985

Browse files
p3rf Teamcopybara-github
p3rf Team
authored andcommitted
Log when pkb returns
PiperOrigin-RevId: 615844562
1 parent 4b8a17b commit 3594985

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

perfkitbenchmarker/pkb.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -1421,21 +1421,23 @@ def RunBenchmarks():
14211421
)
14221422

14231423
# Write completion status file(s)
1424+
if FLAGS.completion_status_file:
1425+
with open(FLAGS.completion_status_file, 'w') as status_file:
1426+
_WriteCompletionStatusFile(benchmark_specs, status_file)
14241427
completion_status_file_name = vm_util.PrependTempDir(
14251428
COMPLETION_STATUS_FILE_NAME
14261429
)
14271430
with open(completion_status_file_name, 'w') as status_file:
14281431
_WriteCompletionStatusFile(benchmark_specs, status_file)
1429-
if FLAGS.completion_status_file:
1430-
with open(FLAGS.completion_status_file, 'w') as status_file:
1431-
_WriteCompletionStatusFile(benchmark_specs, status_file)
14321432

1433+
# Upload PKB logs to GCS after all benchmark runs are complete.
1434+
log_util.CollectPKBLogs()
14331435
all_benchmarks_succeeded = all(
14341436
spec.status == benchmark_status.SUCCEEDED for spec in benchmark_specs
14351437
)
1436-
# Upload PKB logs to GCS after all benchmark runs are complete.
1437-
log_util.CollectPKBLogs()
1438-
return 0 if all_benchmarks_succeeded else 1
1438+
return_code = 0 if all_benchmarks_succeeded else 1
1439+
logging.info('PKB exiting with return_code %s', return_code)
1440+
return return_code
14391441

14401442

14411443
def _GenerateBenchmarkDocumentation():

0 commit comments

Comments
 (0)