SBench-0.2.0: A benchmark suite for runtime and heap measurements over a series of inputs.

Safe HaskellNone

Test.SBench.Time.Series.Test

Description

Functions for runtime tests are provided. They are basically a wrapper to a call to the criterion function Criterion.Main.defaultMainWith. The measurement data (usually stored in temp.csv) is than postprocessed by extracting only the mean runtime for each run and tupling it with the respective input seed. Results are then returned as list of tuples and optionally stored in a .sbench file (see Test.File.FileOps).

Synopsis

Documentation

runtimeSeries :: (NFData b, Show c, Real c) => EvalMod -> Maybe (BuildOptions, ExeOptions, FilePath, Title) -> Algorithm (a -> b) -> DataGen (c -> a) -> [Seed c] -> IO [(c, Double)]Source

As runtimeSeriesWith, but Criterion.Config.Config is set to a default.

runtimeSeriesWithSource

Arguments

:: (NFData b, Show c, Real c) 
=> Config

see Criterion.Config.Config

-> EvalMod

Evaluation level of the input before starting the measurement. Either weak head normal form (WHNF) or normal form (NF)

-> Maybe (BuildOptions, ExeOptions, FilePath, Title)

Choose, whether you want to create a .sbench file and if give meta information about build options, execution options as well as the file name for the .sbench file and the title for the measurements that should be stored as meta information.

-> Algorithm (a -> b)

The function that is to be tested.

-> DataGen (c -> a)

The input data generator

-> [Seed c]

Seeds to the input data generator. For each seed a measurement is performed. A list of seeds might be generated via Test.SBench.Auxiliar.Datagen.makeGens

-> IO [(c, Double)]

series of the measurements as seed-runtime pairs.

Most general function to perform runtime measurements for a series of inputs.

nfRuntimeSeries :: (NFData b, Show c, Real c) => Maybe (BuildOptions, ExeOptions, FilePath, Title) -> Algorithm (a -> b) -> DataGen (c -> a) -> [Seed c] -> IO [(c, Double)]Source

whnfRuntimeSeries :: (NFData b, Show c, Real c) => Maybe (BuildOptions, ExeOptions, FilePath, Title) -> Algorithm (a -> b) -> DataGen (c -> a) -> [Seed c] -> IO [(c, Double)]Source