Janiczek/elm-benchmark-cli-runner/1.0.0

Benchmark.Runner.Cli

This module provides a way to run benchmarks in a CLI environment.

program : Model -> Program () Model Msg

Run benchmarks.

port sendOutput : Benchmark.Runner.Cli.Output -> Cmd msg


main =
    Benchmark.Runner.Cli.program
        { suite = suite
        , sendOutput = sendOutput -- your port!
        }
type alias Output =
{ warning : Maybe String
, results :
List
{ name : List String
, nsPerRun : Maybe Float
}
}

Benchmark results, ready to be sent via port to the parent program.

The result names will contain the path to the benchmark (through all the Benchmark.describe groups etc.).

To get runs/second, you can use the following formula: 1e9 / nsPerRun.

The warning, if present, will be about low goodness of fit (<0.95 and <0.85).

type alias Model =
{ suite : Benchmark
, sendOutput : Output -> Cmd Msg
}

Model for the benchmark runner.

type Msg

Msg for the benchmark runner.