How to understand the release time of Bazel?

Every time the build is done, I see something like:

Elapsed Time: 1034.748s, Critical Path: 257.54s

I wonder what is the difference between Elapsed Time and Critical Path? What could be causing the time difference?

Redirected from: https://github.com/bazelbuild/bazel/issues/3164

+5
source share
1 answer

Elapsed Time shows the time of the assembly wall, as Bazel started the first action of the assembly until the last action was completed.

The “critical path” shows the wall time spent creating the longest chain of actions, where each subsequent action depends on the output (s) of the previous one, so they must be run sequentially. The critical path is the lower limit of the net build time of this assembly; even if the processor had more cores than the number of actions that Bazel had ever performed in parallel, assembly still could not be completed faster.

The temporary difference is caused by the fact that Bazel performs other actions. There were probably more actions than just on a critical path.

+5
source

Source: https://habr.com/ru/post/1268770/


All Articles