Skip to content

Commit

Permalink
Stop including the walltime field in the execution log.
Browse files Browse the repository at this point in the history
We now unconditionally emit the full spawn metrics, which already include the wall time; the extra field is wasteful and potentially confusing.

Progress on #18643.

PiperOrigin-RevId: 582282615
Change-Id: I73f87f3e1c54679506acde860991ef57947262d3
  • Loading branch information
tjgq authored and copybara-github committed Nov 14, 2023
1 parent 3b0b6ed commit fa2fd23
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public void logSpawn(
}

builder.setMnemonic(spawn.getMnemonic());
builder.setWalltime(millisToProto(result.getMetrics().executionWallTimeInMs()));

if (spawn.getTargetLabel() != null) {
builder.setTargetLabel(spawn.getTargetLabel());
Expand Down
6 changes: 1 addition & 5 deletions src/main/protobuf/spawn.proto
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ message SpawnExec {
// Was the Spawn result allowed to be cached remotely.
bool remote_cacheable = 16;

// The wall time it took to execute the Spawn. This is only the time spent in
// the subprocess, not including the time doing setup and teardown.
google.protobuf.Duration walltime = 17;

// Canonical label of the target that emitted this spawn, may not always be
// set.
string target_label = 18;
Expand All @@ -189,5 +185,5 @@ message SpawnExec {
// Timing, size and memory statistics.
SpawnMetrics metrics = 20;

reserved 9;
reserved 9, 17;
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
import com.google.devtools.build.lib.vfs.SyscallCache;
import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem;
import com.google.devtools.common.options.Options;
import com.google.protobuf.Duration;
import com.google.testing.junit.testparameterinjector.TestParameter;
import com.google.testing.junit.testparameterinjector.TestParameterInjector;
import java.io.IOException;
Expand Down Expand Up @@ -466,7 +465,6 @@ public void testLogSpawn(@TestParameter LogSpawnMode mode) throws Exception {
.setRemoteCacheable(true)
.setMnemonic("MyMnemonic")
.setRunner("runner")
.setWalltime(Duration.getDefaultInstance())
.setTargetLabel("//dummy:label")
.setMetrics(Protos.SpawnMetrics.getDefaultInstance())
.setDigest(DIGEST)
Expand Down Expand Up @@ -684,7 +682,6 @@ private static SpawnExec.Builder defaultSpawnExecBuilder(String cmd) {
.setStatus("NON_ZERO_EXIT")
.setExitCode(23)
.setRemoteCacheable(true)
.setWalltime(Duration.getDefaultInstance())
.setTargetLabel("//dummy:label")
.setDigest(DIGEST)
.setMetrics(Protos.SpawnMetrics.getDefaultInstance());
Expand Down

0 comments on commit fa2fd23

Please sign in to comment.