NinjaParser
NinjaParser is a Python module to parse .ninja_log files and print build times.
If you have been complaining about long build times you may have switched to ninja from make. If not, you should give it a try.
Along with being faster, ninja also provides a log file, .ninja_log containing timings for each built object.
This information can be helpful to understand the bottlenecks in your building process. However, this file needs to be parsed to be comprehensible.
NinjaParser prints a sorted list of built times with percentages for the top ten objects. You can also use -f option to filter objects that
you want to print aggregated stats.
Usage
ninjaparser [-h] [-t TOP] [-f FILTER] [path ...]
Parse .ninja_log files.
positional arguments:
path Path to .ninja_log file or the directory that contains it. Default is the current directory. (default: None)
optional arguments:
-h, --help show this help message and exit
-t TOP, --top TOP Print only top `n` items. Prints top 10 by default. Use -t -1 to print all. (default: 10)
-f FILTER, --filter FILTER
Print aggregated stats for objects that includes the filter. Default is an empty string, no filtering. (default: )
Installation
NinjaParser is just a single file, you can either download the file and start using it or you can use pip to install it.
pip install ninjaparser
Metadata
Release files for NinjaParser 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| NinjaParser-0.0.2.tar.gz | 7.5 kB | Details |
Release files / NinjaParser-0.0.2.tar.gz
| Download URL | NinjaParser-0.0.2.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0927f269e1f05c3dbdd1ffc6b9132e0f9410279083fc73a197269f6c9774efa
|
|
BLAKE2b-256 checksum How to use checksums |
fa28ad27e0c7a55db3aab791ae370995e77cb480e9d63de12c116a897be837c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.10
|