Skip to content

Commit

Permalink
Log when pkb returns
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 615844562
  • Loading branch information
p3rf Team authored and copybara-github committed Mar 19, 2024
1 parent 4b8a17b commit 3c35fc2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions perfkitbenchmarker/pkb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,21 +1421,23 @@ def RunBenchmarks():
)

# Write completion status file(s)
if FLAGS.completion_status_file:
with open(FLAGS.completion_status_file, 'w') as status_file:
_WriteCompletionStatusFile(benchmark_specs, status_file)
completion_status_file_name = vm_util.PrependTempDir(
COMPLETION_STATUS_FILE_NAME
)
with open(completion_status_file_name, 'w') as status_file:
_WriteCompletionStatusFile(benchmark_specs, status_file)
if FLAGS.completion_status_file:
with open(FLAGS.completion_status_file, 'w') as status_file:
_WriteCompletionStatusFile(benchmark_specs, status_file)

# Upload PKB logs to GCS after all benchmark runs are complete.
log_util.CollectPKBLogs()
all_benchmarks_succeeded = all(
spec.status == benchmark_status.SUCCEEDED for spec in benchmark_specs
)
# Upload PKB logs to GCS after all benchmark runs are complete.
log_util.CollectPKBLogs()
return 0 if all_benchmarks_succeeded else 1
return_code = 0 if all_benchmarks_succeeded else 1
logging.info('PKB exiting with return_code %s', return_code)
return return_code


def _GenerateBenchmarkDocumentation():
Expand Down

0 comments on commit 3c35fc2

Please sign in to comment.