Skip to content

Commit

Permalink
Add profiles to the call sites of updateRunfiles
Browse files Browse the repository at this point in the history
To make it easier to debug #20748.

Closes #20783.

PiperOrigin-RevId: 596824058
Change-Id: I1dd6b940c30bd6c4b99904d19667f48a389b3a41
  • Loading branch information
coeuvre authored and copybara-github committed Jan 9, 2024
1 parent 9d0468a commit 18c8839
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)
SpawnMetrics.Builder spawnMetrics = SpawnMetrics.Builder.forLocalExec();
Stopwatch totalTimeStopwatch = Stopwatch.createStarted();
Stopwatch setupTimeStopwatch = Stopwatch.createStarted();
runfilesTreeUpdater.updateRunfiles(
spawn.getRunfilesSupplier(), spawn.getEnvironment(), context.getFileOutErr());
try (var s = Profiler.instance().profile("updateRunfiles")) {
runfilesTreeUpdater.updateRunfiles(
spawn.getRunfilesSupplier(), spawn.getEnvironment(), context.getFileOutErr());
}
if (Spawns.shouldPrefetchInputsForLocalExecution(spawn)) {
context.prefetchInputsAndWait();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)
String.format(
"%s worker %s", spawn.getMnemonic(), spawn.getResourceOwner().describe()))) {

runfilesTreeUpdater.updateRunfiles(
spawn.getRunfilesSupplier(), spawn.getEnvironment(), context.getFileOutErr());
try (var s = Profiler.instance().profile("updateRunfiles")) {
runfilesTreeUpdater.updateRunfiles(
spawn.getRunfilesSupplier(), spawn.getEnvironment(), context.getFileOutErr());
}

InputMetadataProvider inputFileCache = context.getInputMetadataProvider();

Expand Down

0 comments on commit 18c8839

Please sign in to comment.