Reads a .ninja_log
and ranks build time of objects.
.ninja_log
is produced by the Ninja build system.
- Ranks objects in decreasing build time
- Can show times in milliseconds or seconds
- Python 3.6 or better
Let there be a .ninja_log
in the current working directory with the following contents:
# ninja log v5
28339 37316 1568970682 a.o 21551924de56a0b0
21092 28683 1568970674 b.o e5c447592b0f338f
10 1535 1568970647 libc.a fec6486ac4c258a0
Run:
./ninja_log_analyser.py
# Similarly,
./ninja_log_analyser.py -i .ninja_log
Output:
8977ms a.o
7591ms b.o
1525ms libc.a
You need to install Pipenv first.
Run ./bootstrap-dev
to install requirements
Run pipenv run pytest
to run all tests.