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

Safe Haskell None Haskell2010

Hyperion.Run

Description

Run a hierarchical benchmark suite, collecting results.

Synopsis

# Run benchmarks

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

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

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

# Sampling strategies

newtype SamplingStrategy Source #

Sampling strategy.

Constructors

 SamplingStrategy (Batch () -> IO Sample)

Instances

 Source # MethodsshowList :: [SamplingStrategy] -> ShowS # Source # Methods

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

Sample once a batch of fixed size.

Run a sampling strategy n times.

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.

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

Arguments

 :: Double Geometric progress. -> Int64 End of the series. -> [Int64]