Skip to content

CICD-395 · Build performance profiling ​

Encyclopedia · Monorepo and large-scale build engineering · All snippets

Previous · CICD-394 · Next · CICD-396

1. Where it fits ​

  • Placement CI evidence step.
  • Prerequisites trusted checkout with the base ref fetched and pinned package manager or build tool.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
bazel build //services/api:release --profile=build-profile.json.gz
bazel analyze-profile build-profile.json.gz > build-profile.txt

3. How it works ​

Bazel computes the requested dependency graph and builds or tests targets with the selected toolchain and execution options.

4. Verify the result ​

Compare critical-path time across matched runners with equivalent cache states.

Validation syntax-validated (Bash parse). Status definitions.