This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.

Benchmark.Runner

Browser Benchmark Runner

program : Benchmark -> BenchmarkProgram

Create a runner program from a benchmark. For example:

main : BenchmarkProgram
main =
    Runner.program <|
        Benchmark.describe "your benchmarks"
            [{- your benchmarks here -}]

Compile this and visit the result in your browser to run the benchmarks.

type alias BenchmarkProgram = Program Never Model Msg

A handy type alias for values produced by program

module Benchmark.Runner exposing (BenchmarkProgram, program)

{-| Browser Benchmark Runner

@docs program, BenchmarkProgram

-}

import Benchmark exposing (Benchmark)
import Benchmark.Runner.App as App exposing (Model, Msg)
import Html


{-| A handy type alias for values produced by [`program`](#program)
-}
type alias BenchmarkProgram =
    Program Never Model Msg


{-| Create a runner program from a benchmark. For example:

    main : BenchmarkProgram
    main =
        Runner.program <|
            Benchmark.describe "your benchmarks"
                [{- your benchmarks here -}]

Compile this and visit the result in your browser to run the
benchmarks.

-}
program : Benchmark -> BenchmarkProgram
program benchmark =
    Html.program
        { init = App.init benchmark
        , update = App.update
        , view = App.view
        , subscriptions = always Sub.none
        }