criterion-1.1.0.0: Robust, reliable performance measurement and analysis

Copyright | (c) 2009 Neil Brown
License | BSD-style
Maintainer | bos@serpentine.com
Stability | experimental
Portability | GHC
Safe Haskell | None
Language | Haskell98

Criterion.Monad

Description

The environment in which most criterion code executes.

Synopsis

- data Criterion a
- withConfig :: Config -> Criterion a -> IO a
- getGen :: Criterion GenIO
- getOverhead :: Criterion Double

# Documentation

data Criterion a Source

The monad in which most criterion code executes.

Instances

Monad Criterion Source |
Functor Criterion Source |
Applicative Criterion Source |
MonadIO Criterion Source |
MonadReader Config Criterion Source |
CritHPrintfType (Criterion a) Source |

withConfig :: Config -> Criterion a -> IO a Source

Run a `Criterion` action with the given `Config`.

getGen :: Criterion GenIO Source

Return a random number generator, creating one if necessary.

This is not currently thread-safe, but in a harmless way (we might call `createSystemRandom` more than once if multiple threads race).

getOverhead :: Criterion Double Source

Return an estimate of the measurement overhead.