Skip to main content

Parse .ninja_log files and print statistics.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NinjaParser-0.0.2.tar.gz (7.5 kB view details)

Uploaded Source

File details

Details for the file NinjaParser-0.0.2.tar.gz.

File metadata

  • Download URL: NinjaParser-0.0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for NinjaParser-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c0927f269e1f05c3dbdd1ffc6b9132e0f9410279083fc73a197269f6c9774efa
MD5 6759580435b43a069be5aba814645dd3
BLAKE2b-256 fa28ad27e0c7a55db3aab791ae370995e77cb480e9d63de12c116a897be837c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page