I am currently trying to profile a Haskell server. The server runs forever, so I just want a profiling report for a fixed amount of time. I tried just running the program for 3 minutes, and then politely ask it to terminate, but somehow the haskell profiler doesn't obey the term signal, and generates incomplete data.
My first attempt:
timeout --signal SIGTERM 3m ./actionsDemo +RTC -hc -RTS -p -K100M
Anyone any idea how to neatly profile this server?
The methods for getting a heap profile of a running program are well documented here, section 5.5.3. In short, you just need to remove the last "incomplete" sample, and then proceed as usual.
There's also a relevant trac ticket to make hp2ps handle this on its own, but it doesn't seem to be ready yet.
For time/allocation profiling, I don't have an answer.
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