Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lue-bird/elm-alternative-benchmark-runner
run benchmarks in a clean ui & more (multi-compare, ...)
https://github.com/lue-bird/elm-alternative-benchmark-runner
benchmark benchmark-runner elm
Last synced: 26 days ago
JSON representation
run benchmarks in a clean ui & more (multi-compare, ...)
- Host: GitHub
- URL: https://github.com/lue-bird/elm-alternative-benchmark-runner
- Owner: lue-bird
- License: mit
- Created: 2021-06-04T13:36:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-26T11:01:27.000Z (over 3 years ago)
- Last Synced: 2024-12-09T18:02:06.002Z (about 1 month ago)
- Topics: benchmark, benchmark-runner, elm
- Language: Elm
- Homepage: https://package.elm-lang.org/packages/lue-bird/elm-alternative-benchmark-runner/latest/
- Size: 166 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changes.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
## alternative-benchmark-runner
Extends [elm-explorations/benchmark](https://package.elm-lang.org/packages/elm-explorations/benchmark/latest/):
- [compare _multiple_ benchmarks](https://github.com/elm-explorations/benchmark/issues/2)
- run in a cleaner interface
- dark and light mode![Benchmark example](https://raw.githubusercontent.com/lue-bird/alternative-benchmark-runner/master/benchmark-example.png)
- [warn about low goodness of fit](https://github.com/elm-explorations/benchmark/issues/4)
- compatible with all your existing benchmarks. Simply replace `Benchmark.Runner.program` with `Benchmark.Runner.Alternative.program````elm
import Benchmark exposing (describe)
import Benchmark.Alternative exposing (rank)
import Benchmark.Runner.Alternative as BenchmarkRunnermain =
BenchmarkRunner.program suitesuite =
describe "array"
[ rank "range from 0"
(\f -> f 100)
[ ( "with initialize", from0WithInitialize )
, ( "with List.range", from0WithListRange )
, ( "with indexedMap", from0WithIndexedMap )
]
]from0WithInitialize length =
Array.initialize length identityfrom0WithListRange length =
Array.fromList (List.range 0 (length - 1))from0WithIndexedMap length =
Array.repeat length ()
|> Array.indexedMap (\i _ -> i)
```To customize the options:
```elm
import Benchmark.Runner.Alternative as BenchmarkRunner exposing (defaultOptions, lightTheme)main =
BenchmarkRunner.programWith
{ defaultOptions | theme = lightTheme }
suite
```Have suggestions? → [contributing](https://github.com/lue-bird/elm-alternative-benchmark-runner/blob/master/contributing.md).