hyperion-0.1.0.0: Reliable performance measurement with robust data export.

Safe HaskellNone
LanguageHaskell2010

Hyperion.Run

Contents

Description

Run a hierarchical benchmark suite, collecting results.

Synopsis

Run benchmarks

runBenchmark Source #

Arguments

:: (BenchmarkId -> Maybe SamplingStrategy)

Name indexed batch sampling strategy.

-> Benchmark

Benchmark to be run.

-> IO (HashMap BenchmarkId Sample) 

Provided a sampling strategy (which can be keyed on the BenchmarkId), sample the runtime of all the benchmark cases in the given benchmark tree.

Benchmark transformations

shuffle :: RandomGen g => g -> [a] -> [a] Source #

Convenience wrapper around shuffle.

reorder :: RandomGen g => (g -> [Benchmark] -> [Benchmark]) -> g -> [Benchmark] -> [Benchmark] Source #

Sampling strategy selectors

filtered :: (BenchmarkId -> Bool) -> SamplingStrategy -> BenchmarkId -> Maybe SamplingStrategy Source #

Sampling strategies that filters the benchmarks based on a predicate: a benchmark is included iff the predicate is True.

uniform :: SamplingStrategy -> BenchmarkId -> Maybe SamplingStrategy Source #

Sampling strategies that ignore the name index, i.e. are uniform across all benchmarks.

Sampling strategies

defaultStrategy :: SamplingStrategy Source #

Default to 100 samples, for each batch size from 1 to 20 with a geometric progression of 1.2.

fixed :: Int64 -> SamplingStrategy Source #

Sample once a batch of fixed size.

sample :: Int64 -> SamplingStrategy -> SamplingStrategy Source #

Run a sampling strategy n times.

geometric Source #

Arguments

:: Int64

Sample size.

-> Int64

Max batch size.

-> Double

Ratio of geometric progression.

-> SamplingStrategy 

Batching strategy, following a geometric progression from 1 to the provided limit, with the given ratio.

timeBound Source #

Arguments

:: TimeSpec

Time bound

-> [Int64]

Sample sizes; may be infinite

-> SamplingStrategy 

Sampling strategy that creates samples of the specified sizes with a time bound. Sampling stops when either a sample has been sampled for each size or when the total benchmark time is greater than the specified time bound.

The actual amount of time spent may be longer since hyperion will always wait for a Sample of a given size to complete.

Strategy helpers

geometricSeries Source #

Arguments

:: Double

Geometric progress.

-> Int64

End of the series.

-> [Int64]