mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Set NINJA_STATUS for better build performance summarizing
When NINJA_SUMMARIZE_BUILD=1 then autoninja prints a summary of build performance at the end. This change makes it so that ninja prints more detailed build statistics during the build. In particular, slow process creation is a common but difficult to see bottleneck. This change makes it so that if NINJA_SUMMARIZE_BUILD=1 then the number of running build processes will be displayed. Bug: 787983 Change-Id: Ic0907e23e7f762e23e4795059b37085e0cb8c4ea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1582802 Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This commit is contained in:
@@ -3,9 +3,17 @@
|
||||
:: Use of this source code is governed by a BSD-style license that can be
|
||||
:: found in the LICENSE file.
|
||||
|
||||
setlocal
|
||||
|
||||
REM Set unique build ID.
|
||||
FOR /f "usebackq tokens=*" %%a in (`python -c "import uuid; print uuid.uuid4()"`) do set AUTONINJA_BUILD_ID=%%a
|
||||
|
||||
REM If a build performance summary has been requested then also set NINJA_STATUS
|
||||
REM to trigger more verbose status updates. In particular this makes it possible
|
||||
REM to see how quickly process creation is happening - often a critical clue on
|
||||
REM Windows. The trailing space is intentional.
|
||||
if "%NINJA_SUMMARIZE_BUILD%" == "1" set NINJA_STATUS=[%%r processes, %%f/%%t @ %%o/s : %%es ]
|
||||
|
||||
REM Execute whatever is printed by autoninja.py.
|
||||
REM Also print it to reassure that the right settings are being used.
|
||||
FOR /f "usebackq tokens=*" %%a in (`python %~dp0autoninja.py "%*"`) do echo %%a & %%a
|
||||
|
||||
Reference in New Issue
Block a user