buildbox-2.2.1.1: Rehackable components for writing buildbots and test harnesses.

Safe HaskellSafe
LanguageHaskell98

BuildBox.Build.Benchmark

Synopsis

Documentation

data Benchmark result Source #

Benchmark definition.

Constructors

Benchmark 

Fields

  • benchmarkName :: String

    A unique name for the benchmark

  • benchmarkSetup :: Build ()

    Setup command to run before the main benchmark. This does not contribute to the reported time of the overall result.

  • benchmarkCommand :: Build a

    The main command to benchmark.

  • benchmarkCheck :: a -> Build result

    Check and post-process the result of the main command. This does not contribute to the reported time of the overall result.

data BenchResult result Source #

Benchmark result.

runBenchmark :: Benchmark result -> Int -> Build (BenchResult result) Source #

Run a benchmark a single time.

iterateBenchmark :: Int -> Benchmark result -> Build [BenchResult result] Source #

Run a benchmark the given number of times.

timeBuild :: Build a -> Build (Seconds, a) Source #

Run a command, returning its elapsed time.