No description
| ghc-build-stats | Add missing bits to .cabal file | |
| ghc-build-stats-plugin | Add missing bits to .cabal file | |
| ghc-build-stats-test | Initial commit | |
| .envrc | Initial commit | |
| .gitignore | Initial commit | |
| cabal.project | Initial commit | |
| README.md | Link to perfetto in README | |
| shell.nix | Initial commit | |
ghc-build-stats: a tool for analyzing GHC parallel builds
Overview
This package allows you to analyze GHC builds:
- Visualise the critical path
- Simulate how long the build would take with different amounts of cores. This can be visualised with perfetto.
- See the slowest modules to compile.
How to use
To instrument a package add the following to your .cabal file:
build-depends: ghc-build-stats-plugin
ghc-options: -fplugin=GHC.BuildStats.Plugin
This will produce build-stats.ndjson files in your dist-newstyle or .stack-work directories.
You can find these with find:
find -name 'build-stats.ndjson'
They can then be analysed with the ghc-build-stats executable.
You can either build it from this repo or Hackage, or you can add it to you cabal.project like so:
extra-packages: ghc-build-stats
And then run it simply as cabal run ghc-build-stats -- <path>/build-stats.ndjson