criterion-0.4.0: Robust, reliable performance measurement and analysisSource codeContentsIndex
Core benchmarking code.
class Benchmarkable a where
run :: a -> Int -> IO ()
data Benchmark
data Pure
nf :: NFData b => (a -> b) -> a -> Pure
whnf :: (a -> b) -> a -> Pure
bench :: Benchmarkable b => String -> b -> Benchmark
bgroup :: String -> [Benchmark] -> Benchmark
runBenchmark :: Benchmarkable b => Environment -> b -> Criterion Sample
runAndAnalyse :: (String -> Bool) -> Environment -> Benchmark -> Criterion ()
class Benchmarkable a whereSource
A benchmarkable function or action.
:: aThe function or action to benchmark.
-> IntThe number of times to run or evaluate it.
-> IO ()
Run a function or action the specified number of times.
show/hide Instances
data Benchmark Source
A benchmark may consist of either a single Benchmarkable item with a name, created with bench, or a (possibly nested) group of Benchmarks, created with bgroup.
show/hide Instances
data Pure Source
A container for a pure function to benchmark, and an argument to supply to it each time it is evaluated.
show/hide Instances
nf :: NFData b => (a -> b) -> a -> PureSource
whnf :: (a -> b) -> a -> PureSource
:: Benchmarkable b
=> String
-> b
-> Benchmark
Create a single benchmark.
:: StringA name to identify the group of benchmarks.
-> [Benchmark]Benchmarks to group under this name.
-> Benchmark
Group several benchmarks together under a common name.
runBenchmark :: Benchmarkable b => Environment -> b -> Criterion SampleSource
Run a single benchmark, and return timings measured when executing it.
:: String -> BoolA predicate that chooses whether to run a benchmark by its name.
-> Environment
-> Benchmark
-> Criterion ()
Run, and analyse, one or more benchmarks.
Produced by Haddock version 2.6.0