BenchmarkHistory- Benchmark functions with history

Safe HaskellNone




gcStatDiff :: Num a => (GCStats -> a) -> GCStats -> GCStats -> a Source

benchmark Source


:: (NFData e, NFData a, NFData b) 
=> Int

multiplicity of the benchmark run

-> String

name of the benchmark file

-> (a -> e)

environment generator (not benched)

-> (e -> a -> b)

given environment, input, create output

-> a


-> IO ExitCode

run everything, return exit code based on performance

Benchmark a function. The function should take a /considerable amount of time/ to finish, since the benchmarking system is designed to measure coarse-grained timings.

call :: NFData b => (a -> b) -> a -> IO b Source

toBlocks :: [Int] -> [a] -> [[a]] Source

Divide data into blocks

eachBlock :: (GCStats -> r) -> (Int -> r -> r -> Double) -> [[Stats]] -> [(TimeStamp, Double)] Source

for each block, perform an op and return first time stamp and op result

basicStats :: [(TimeStamp, Double)] -> IO ExitCode Source

Statistics for data. We allow one standard deviation or 5% of the mean as error margin before we flag the running time as being slow enough to raise an ExitFailure 1.