Skip to content

Commit

Permalink
RemoteSpawnRunner: record inbetween phases in timing profile
Browse files Browse the repository at this point in the history
After an action was executed remotely, RemoteSpawnRunner would use
the timestamps in the execution metadata to record appropriate timing
phases into the JSON profile.

However, there are durations in-between the existing phases that are
unaccounted for. Depending on the RBE server implemenation, these
phases could mean different things:
- Sandbox preparation
- Cleaning up sandbox environments post-execution
- Others

Missing these durations inside the timing profile would cause confusion
to end users as it would be interpreted as nothing happened in between
the existing phases.

Add these durations into the profile as "pre-X" phases so that user is
aware of activities could still be happening during that time. RBE
server implementation should be able to alter these label
programmatically if necessary.
  • Loading branch information
sluongng committed Dec 7, 2023
1 parent d7adb9a commit 4f4de83
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,18 +339,36 @@ private static void profileAccounting(ExecutedActionMetadata executedActionMetad
executedActionMetadata.getWorkerStartTimestamp(),
REMOTE_QUEUE,
"queue");
logProfileTask(
converter,
executedActionMetadata.getWorkerStartTimestamp(),
executedActionMetadata.getInputFetchStartTimestamp(),
REMOTE_SETUP,
"pre-fetch");
logProfileTask(
converter,
executedActionMetadata.getInputFetchStartTimestamp(),
executedActionMetadata.getInputFetchCompletedTimestamp(),
REMOTE_SETUP,
"fetch");
logProfileTask(
converter,
executedActionMetadata.getInputFetchCompletedTimestamp(),
executedActionMetadata.getExecutionStartTimestamp(),
REMOTE_PROCESS_TIME,
"pre-execute");
logProfileTask(
converter,
executedActionMetadata.getExecutionStartTimestamp(),
executedActionMetadata.getExecutionCompletedTimestamp(),
REMOTE_PROCESS_TIME,
"execute");
logProfileTask(
converter,
executedActionMetadata.getExecutionCompletedTimestamp(),
executedActionMetadata.getOutputUploadStartTimestamp(),
UPLOAD_TIME,
"pre-upload");
logProfileTask(
converter,
executedActionMetadata.getOutputUploadStartTimestamp(),
Expand Down

0 comments on commit 4f4de83

Please sign in to comment.