lue-bird / elm-alternative-benchmark-runner / Benchmark.Runner.Alternative

Run benchmarks in the browser.

import Benchmark.Runner.Alternative as BenchmarkRunner.


type alias Program =
Platform.Program () Model Msg

A benchmark runner program. See program for how to create one.

program : Benchmark -> Program

Run benchmarks with defaultOptions.

main =
    BenchmarkRunner.program suite

options

programWith : Options -> Benchmark -> Program

Run benchmarks with custom Options.

main =
    programWith { defaultOptions | theme = Light }


type alias Options =
{ theme : Theme }

Options to start the BenchmarkProgram with:

theme

Theme.

defaultOptions : Options

{ theme = darkTheme } and default rendering.


type alias Theme =
{ background : Color
, foreground : Color 
}

Color theme. Defaults are darkTheme and lightTheme.

darkTheme : Theme

White stuff on a black background.

lightTheme : Theme

Black stuff on a white background.

to write your own runner

progressBenchmark : Benchmark -> Platform.Cmd.Cmd Msg

Benchmark.step if the benchmark still hasn't received all results.