Skip to content

Commit

Permalink
Log the execution time of each plugin. This allows for identification…
Browse files Browse the repository at this point in the history
… and optimization of plugins taking the longest time.

PiperOrigin-RevId: 666334401
Change-Id: I7c922ed89b1463cdf3268bd77ac37a55e5dd74eb
  • Loading branch information
tooryx authored and copybara-github committed Aug 22, 2024
1 parent f8cff2a commit a184c09
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ private <T> PluginExecutionResult<T> buildSucceededResult(
if (executionStopwatch.isRunning()) {
executionStopwatch.stop();
}
logger.atInfo().log(
"%s plugin execution finished in %d (ms)",
executorConfig.matchedPlugin().pluginDefinition().pluginInfo().name(),
executionStopwatch.elapsed().toMillis());
return PluginExecutionResult.<T>builder()
.setExecutionStatus(ExecutionStatus.SUCCEEDED)
.setResultData(resultData)
Expand Down

0 comments on commit a184c09

Please sign in to comment.