Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Steps to diagnose Bazel slowness

I am experiencing a long 'clean build' time using Bazel in my current project.

What are the steps we recommend steps to diagnose this?

like image 926
Steren Avatar asked May 23 '17 14:05

Steren


People also ask

How do you run a Bazel run?

To run Bazel, go to your base workspace directory or any of its subdirectories and type bazel .

Where is Bazelrc?

Path: . bazelrc in your workspace directory (next to the main WORKSPACE file).

What does Bazel clean do?

build : Builds the specified targets. canonicalize-flags : Canonicalize Bazel flags. clean : Removes output files and optionally stops the server. cquery : Executes a post-analysis dependency graph query.


1 Answers

Try to profile your build with --profile

The syntax is bazel build --profile file //my:target

Then you can get a summary of the profiling information with bazel analyze-profile file and comprehensive chart of executed task with bazel analyze-profile --html file

like image 149
Steren Avatar answered Sep 27 '22 15:09

Steren