criterion-0.1.2: Benchmarking, Performance, TestingSource codeContentsIndex
Criterion
PortabilityGHC
Stabilityexperimental
Maintainerbos@serpentine.com
Description
Core benchmarking code.
Synopsis
class Benchmarkable b where
run :: b -> Int -> IO ()
data Benchmark
bench :: Benchmarkable b => String -> b -> Benchmark
bgroup :: String -> [Benchmark] -> Benchmark
runBenchmark :: Benchmarkable b => Config -> Environment -> b -> IO Sample
runAndAnalyse :: (String -> Bool) -> Config -> Environment -> Benchmark -> IO ()
Documentation
class Benchmarkable b whereSource
A benchmarkable function or action.
Methods
run :: b -> Int -> IO ()Source
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
benchSource
:: Benchmarkable b
=> String
-> b
-> Benchmark
Create a single benchmark.
bgroupSource
:: 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 => Config -> Environment -> b -> IO SampleSource
Run a single benchmark, and return timings measured when executing it.
runAndAnalyseSource
:: String -> BoolA predicate that chooses whether to run a benchmark by its name.
-> Config
-> Environment
-> Benchmark
-> IO ()
Run, and analyse, one or more benchmarks.
Produced by Haddock version 2.6.0