How to get build statistics programmatically?

225 views
Skip to first unread message

Konstantin

unread,
Apr 14, 2022, 1:18:54 PM4/14/22
to bazel-discuss
We are looking for a way to extract some statistics after the build, such as 
  • Number of actions executed locally
  • Number of cached actions used (local and remote separately)
  • Number of actions executed remotely.
  • Maybe some stats about the action types, like how many actions of each type were executed.
Is there a way to get that?

Thank you!
Konstantin

Keith Smiley

unread,
Apr 14, 2022, 1:35:13 PM4/14/22
to Konstantin, bazel-discuss
You can definitely parse this out of the execution log. https://docs.bazel.build/versions/main/command-line-reference.html#flag--execution_log_binary_file
--
Keith Smiley


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/4fc60e66-3002-4dc6-a7b7-73e6149af15an%40googlegroups.com.

Konstantin

unread,
Apr 14, 2022, 2:29:59 PM4/14/22
to bazel-discuss
Unfortunately our build is huge, executes hundreds of thousands actions and execution log gets ginormous (50 Gb) and brings substantial perf hit both at generation and parsing. 

At this time we try to see if --profile option can provide sufficient data cheaper.

nicolay...@gmail.com

unread,
Apr 14, 2022, 10:53:43 PM4/14/22
to bazel-discuss
I found running Build Event Service in a big build farm is a very valuable source of the information you are looking for (and in real-time!).


One of the easiest way to try this is to spawn BuildBuddy service: https://github.com/buildbuddy-io/buildbuddy/blob/master/docs/on-prem.md

Damian Akpan

unread,
Apr 15, 2022, 10:16:02 AM4/15/22
to bazel-discuss
There's a service we use called Buildbuddy that implements the BES proto. 
It has these statistics you described along with other things.

Tobias Werth

unread,
Apr 19, 2022, 3:16:18 AM4/19/22
to Damian Akpan, bazel-discuss
I recommend looking at the ActionSummary in the BEP and see if that has all the information you need.



--

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. 

     

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Reply all
Reply to author
Forward
0 new messages