Skip to content

Commit

Permalink
Add benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
icidasset committed Jan 1, 2019
1 parent 43e5aef commit 718580e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
elm-stuff
benchmarks/benchmarks.html
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
.PHONY: benchmarks


all: docs test


# Benchmarks
benchmarks:
(cd benchmarks; elm make Benchmarks.elm --output benchmarks.html)


# Generate documentation
docs:
elm make --docs=docs.json
Expand Down
20 changes: 20 additions & 0 deletions benchmarks/Benchmarks.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module Main exposing (main)

import Benchmark exposing (..)
import Benchmark.Runner
import Binary


main : Benchmark.Runner.BenchmarkProgram
main =
Benchmark.Runner.program suite


suite : Benchmark
suite =
describe "Binary"
[ describe "Converters"
[ benchmark "fromHex" <|
\_ -> Binary.fromHex (String.repeat 512 "F")
]
]
31 changes: 31 additions & 0 deletions benchmarks/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"type": "application",
"source-directories": [
".",
"../src"
],
"elm-version": "0.19.0",
"dependencies": {
"direct": {
"elm/core": "1.0.2",
"elm-community/list-extra": "8.1.0",
"elm-explorations/benchmark": "1.0.1"
},
"indirect": {
"BrianHicks/elm-trend": "2.1.2",
"Skinney/murmur3": "2.0.8",
"elm/browser": "1.0.1",
"elm/html": "1.0.0",
"elm/json": "1.1.2",
"elm/regex": "1.0.0",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"mdgriffith/style-elements": "5.0.1"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"elm-community/list-extra": "8.1.0 <= v < 9.0.0"
},
"test-dependencies": {}
}
}

0 comments on commit 718580e

Please sign in to comment.