miniBill/elm-faster-benchmark/2.1.1

FastBenchmark.Config

Types

type Config graph function

All the information needed to run a benchmark.

Building configuration

{ graphTitle : graph -> String
, functionToString : function -> String
, graphCodec : Codec graph
, functionCodec : Codec function
, graphs : List graph
, graphData :
graph
-> { functions : List function
, sizes : List Int
}
, runFunction : Param graph function -> () -> ()
}
-> Config graph function

Initializes the benchmark configuration with some mandatory options.

withTimeout : Float -> Config graph function -> Config graph function

Sets a timeout (in ms) for each Param.

{ times : Int
, percentage : Float
}
-> Config graph function
-> Config graph function

Try running the benchmark more times (up to times) if max - min would be more than percentage * median.

Reasonable values are 5 for times and 0.5 for percentage.

To params list

params : Config graph function -> List (Param graph function)

Gets the list of all possible params to benchmark.

Visualization

functionToString : Config graph function -> function -> String

Converts a function to a user-visible string.

graphTitle : Config graph function -> graph -> String

Gets a graph title.

Other configuration

timeout : Config graph function -> Maybe Float

Gets the timeout (in ms) for each Param.

Config graph function
-> Maybe
{ times : Int
, percentage : Float
}

Gets the retry configuration.

runFunction : Config graph function -> Param graph function -> Operation

Prepares a function for running inside a benchmark

Codecs

functionCodec : Config graph function -> Codec function

Codec for functions.

graphCodec : Config graph function -> Codec graph

Codec for graphs.