I have done live heap profiles on similar applications using GHC’s eventlog combined with eventlog2html. The important piece is the GHC RTS option --eventlog-flush-interval
: 5.7. Runtime system (RTS) options — Glasgow Haskell Compiler 9.10.1 User's Guide
A crude live render can then be accomplished with a file-watcher like entr
, e.g.
ls *.eventlog | entr -s 'eventlog2html $0'
Granted this was only for heap profiling, but hopefully it helps you. Further efforts in live profiling have led to GitHub - well-typed/ghc-eventlog-socket: Pipe the GHC eventlog stream to a UNIX domain socket and Glasgow Haskell Compiler / ghc-debug · GitLab, but these are a little more involved.