Skip to content

Commit

Permalink
Update build docs for diagnosing slow builds
Browse files Browse the repository at this point in the history
Autoninja now has a better option for diagnosing slow builds. This
change updates the documentation for the new option.

Bug: 787983
Change-Id: I69f3ba901d3c98bd9c996b03421260559004edd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1596854
Commit-Queue: Peter Boström <pbos@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657653}
  • Loading branch information
randomascii authored and Commit Bot committed May 8, 2019
1 parent 914170d commit 8939017
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions docs/windows_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,22 +278,27 @@ different settings listed above, including different link settings and -j
values? Have you asked on the chromium-dev mailing list to see if your build is
slower than expected for your machine's specifications?

The next step is to gather some data. There are several options. Setting
[NINJA_STATUS](https://ninja-build.org/manual.html#_environment_variables) lets
you configure Ninja's output so that, for instance, you can see how many
processes are running at any given time, how long the build has been running,
etc., as shown here:
The next step is to gather some data. If you set the ``NINJA_SUMMARIZE_BUILD``
environment variable to 1 then ``autoninja`` will do a couple of things. First,
it will set the [NINJA_STATUS](https://ninja-build.org/manual.html#_environment_variables)
environment variable so that ninja will print additional information while
building Chrome. It will show how many build processes are running at any given
time, how many build steps have completed, how many build steps have completed
per second, and how long the build has been running, as shown here:

```shell
$ set NINJA_STATUS=[%r processes, %f/%t @ %o/s : %es ]
$ set NINJA_SUMMARIZE_BUILD=1
$ autoninja -C out\Default base
ninja: Entering directory `out\Default'
[1 processes, 86/86 @ 2.7/s : 31.785s ] LINK(DLL) base.dll base.dll.lib base.dll.pdb
```
In addition, if you set the ``NINJA_SUMMARIZE_BUILD`` environment variable to 1 then
autoninja will print a build performance summary when the build completes,
showing the slowest build steps and build-step types, as shown here:
This makes slow process creation immediately obvious and lets you tell quickly
if a build is running more slowly than normal.
In addition, setting ``NINJA_SUMMARIZE_BUILD=1`` tells ``autoninja`` to print a
build performance summary when the build completes, showing the slowest build
steps and slowest build-step types, as shown here:
```shell
$ set NINJA_SUMMARIZE_BUILD=1
Expand Down

0 comments on commit 8939017

Please sign in to comment.