Description
I can build a profiled version of my application easily with this command:
stack install \
--executable-profiling \
--library-profiling \
--ghc-options='-fprof-auto'
When I run this application with +RTS -p -RTS
on the command line, it writes a .prof file as expected, and this profile covers cost centers both from my Cabal package's library and executable components.
However, the equivalent doesn't work smoothly when I try to profile the same package's benchmark suite:
stack bench \
--executable-profiling \
--library-profiling \
--ghc-options='-fprof-auto' \
--benchmark-arguments='+RTS -p -RTS'
This does produce a bench.prof
file, but the file only reports on cost centers in the benchmark component's module and its library dependencies (mostly Criterion and its dependencies), and does not report on my Cabal package's library component's cost centers at all. This is a bummer, needless to say, because it'd be natural to use the benchmark suite to profile my Cabal package's library component!