
17 Jul
2012
17 Jul
'12
4:52 p.m.
See the second argument of "defaultMainWith" http://hackage.haskell.org/packages/archive/criterion/0.6.0.0/doc/html/Crite....
the "prep" argument is run before the entire suite is run (i.e. once per criterion main invocation); I'm looking for some way to run code before and after each function being benchmarked (and different code around different functions being benchmarked). It looks like criterion is fairly hard-wired to time everything that is done to run a test, so I guess the answer to my question is a straightforward "no" :) I think I'd have to modify the Benchmarkable typeclass to have a setup and teardown in order to do what I want. Maybe I'll give that a shot.