1
0
Fork
You've already forked ghc-build-stats
0
No description
  • Haskell 97.9%
  • Nix 2.1%
2026年06月03日 15:05:37 +01:00
ghc-build-stats Add missing bits to .cabal file 2026年06月03日 15:04:28 +01:00
ghc-build-stats-plugin Add missing bits to .cabal file 2026年06月03日 15:04:28 +01:00
ghc-build-stats-test Initial commit 2026年06月03日 14:53:06 +01:00
.envrc Initial commit 2026年06月03日 14:53:06 +01:00
.gitignore Initial commit 2026年06月03日 14:53:06 +01:00
cabal.project Initial commit 2026年06月03日 14:53:06 +01:00
README.md Link to perfetto in README 2026年06月03日 15:05:37 +01:00
shell.nix Initial commit 2026年06月03日 14:53:06 +01:00

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