Hadrian: trace the execution of expensive Cabal calls
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Thu, 14 Mar 2019 14:12:20 +0000 (14:12 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Wed, 27 Mar 2019 11:20:03 +0000 (07:20 -0400)
commit646f2e79c5d6e79341693b1b9660da974102cec2
tree47aec452033043e7caa84130eff5020123dcbde8
parentab41c1b429374e22f51c06128c173ef4f14be67d
Hadrian: trace the execution of expensive Cabal calls

We use Cabal to parse, configure, register and copy packages, which are
expensive operations that are currently not visible to Shake's profiling
infrastructure. By using `traced` we tell Shake to add these IO actions
to the profiling report, helping us to identify performance bottlenecks.

We use short tracing keys, as recommended in Shake docs: the name of the
current target is already available in the rest of the profiling
information.
hadrian/src/Hadrian/Haskell/Cabal/Parse.hs