Is there a way to get total heap consumption (and consumption of specific datatypes) in app runtime (GHC)? I'm writing profiler for my interpreter, so I can't use standard ways.
You can get the total heap consumption and other stats via getGCStats
in module GHC.Stats, at least if you run your program with +RTS -T
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With