
Tim Chevalier wrote:
On 12/15/07, Peter Hercek
wrote: Try the -Rghc-timing flag. Interesting, that one does not work in my program compiled with ghc 6.8.1 (looks like ghc runtime does not consume it but passes it to my haskell code). +RTS -tstderr works but its usability is
Tim Chevalier wrote: limited since it provides only elapsed time and not the process cpu times.
Sorry, my mistake -- it's an RTS option, so:
./program +RTS -Rghc-timing -RTS
and I guess you have to compile with -prof.
I guess it is just buggy in 6.8.1. That option does not seem to work, not even as an RTS option and even when I compile with "-prof -auto-all". But the user guide states that the result should be the same as with "+RTS -tstderr" and if so then it is not that interesting (since cpu times are missing). Btw, "+RTS -tstderr" works without -prof too, which is nice :) I liked the idea that ghc generated exe can report its times too (I meant also cpu times and not only the elapsed time) but external programs work well for this too, so never mind. Thanks, Peter.