EngFlow / bazel_invocation_analyzer

A tool that automatically analyzes a Bazel build's profile and offers suggestions on how to make it faster.
https://analyzer.engflow.com
Apache License 2.0
90 stars 10 forks source link

[BazelProfile] Support reading action count of Bazel profiles generated with Bazel 7 #115

Closed saraadams closed 11 months ago

saraadams commented 11 months ago

With Bazel 7, the action count events are no longer part of the Main Thread, as they no longer include a tid. This PR changes the logic, so that the action count can be retrieved both for older styleand newer style profiles.

Contributes to #113.

saraadams commented 11 months ago

Highlighted in https://github.com/bazelbuild/bazel/issues/18548#issuecomment-1823361627 I plan to work on a patch to reintroduce the tid tomorrow, which would greatly simplify this PR. Some of the changes might still be beneficial, though. Converting to draft for now.

saraadams commented 11 months ago

If https://github.com/bazelbuild/bazel/pull/20300 is accepted, the tid should again be present.

saraadams commented 11 months ago

(I also verified that for Bazel 6.4.0 the tid is still present.)

saraadams commented 11 months ago

Closing, as https://github.com/bazelbuild/bazel/pull/20300 was merged and gets rid of the regression.