Skip to content

Commit

Permalink
Rename PROCESS_TIME to REMOTE_PROCESS_TIME
Browse files Browse the repository at this point in the history
to reflect the fact that it's used to mark remote execution wall time.

Currently, PROCESS_TIME is used in LocalSpawnRunner to record the local execution time, but displayed as remote execution time in the Profiler which is confusing. This change reduces the chance PROCESS_TIME is misused in the future and a following change will fix LocalSpawnRunner.

PiperOrigin-RevId: 552467817
Change-Id: I4383be640571fd816fb2c71fec29f60e693d4347
  • Loading branch information
coeuvre authored and copybara-github committed Jul 31, 2023
1 parent be63eee commit cbbe54b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ private SpawnResult start()
TerminationStatus terminationStatus;
try (SilentCloseable c =
Profiler.instance()
.profile(ProfilerTask.PROCESS_TIME, spawn.getResourceOwner().getMnemonic())) {
.profile(
ProfilerTask.REMOTE_PROCESS_TIME, spawn.getResourceOwner().getMnemonic())) {
needCleanup = true;
Subprocess subprocess = subprocessBuilder.start();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum ProfilerTask {
Threshold.FIFTY_MILLIS,
/* collectsSlowestInstances= */ true),
UPLOAD_TIME("Remote execution upload time", Threshold.FIFTY_MILLIS),
PROCESS_TIME("Remote execution process wall time", Threshold.FIFTY_MILLIS),
REMOTE_PROCESS_TIME("Remote execution process wall time", Threshold.FIFTY_MILLIS),
REMOTE_QUEUE("Remote execution queuing time", Threshold.FIFTY_MILLIS),
REMOTE_SETUP("Remote execution setup", Threshold.FIFTY_MILLIS),
FETCH("Remote execution file fetching", Threshold.FIFTY_MILLIS),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package com.google.devtools.build.lib.remote;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.devtools.build.lib.profiler.ProfilerTask.PROCESS_TIME;
import static com.google.devtools.build.lib.profiler.ProfilerTask.REMOTE_DOWNLOAD;
import static com.google.devtools.build.lib.profiler.ProfilerTask.REMOTE_EXECUTION;
import static com.google.devtools.build.lib.profiler.ProfilerTask.REMOTE_PROCESS_TIME;
import static com.google.devtools.build.lib.profiler.ProfilerTask.REMOTE_QUEUE;
import static com.google.devtools.build.lib.profiler.ProfilerTask.REMOTE_SETUP;
import static com.google.devtools.build.lib.profiler.ProfilerTask.UPLOAD_TIME;
Expand Down Expand Up @@ -342,7 +342,7 @@ private static void profileAccounting(ExecutedActionMetadata executedActionMetad
converter,
executedActionMetadata.getExecutionStartTimestamp(),
executedActionMetadata.getExecutionCompletedTimestamp(),
PROCESS_TIME,
REMOTE_PROCESS_TIME,
"execute");
logProfileTask(
converter,
Expand Down

0 comments on commit cbbe54b

Please sign in to comment.