
10 Mar
2007
10 Mar
'07
9:42 a.m.
Hi Donald,
This stuff is surprisingly tricky for some reason. Have a look at the gtop (C?) lib (there's also a perl binding used for the shootout).
I'm not sure why shells in general don't provide a 'memory' combinator, considering we have 'time'.
I don't want to do this in the shell, but if I did "-RTS -t" already dumps it to a file and I can get the answer from there. The example I want is: do x <- getCPUTime compute y <- getCPUTime z <- getMemoryUse print "Your computation took {y-x}ms and {z}kb" Thanks Neil