Profile the Dhall Command (#608)

This benchmark allows one to run:

```
$ stack bench --profile --library-profiling dhall:dhall-command <<< "/path/to/my-dhall-fille.dhall"
```

And the profiling information will then be output in dhall-command.prof.
This commit is contained in:
Fintan Halpenny 2018-09-28 16:29:38 +01:00 committed by Gabriel Gonzalez
parent 218e90af7c
commit 900053a09d
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,20 @@
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Dhall.Main as Main
import Dhall.Binary (defaultProtocolVersion)
options :: Main.Options
options = Main.Options
{ Main.mode = Main.Default False
, Main.explain = False
, Main.plain = False
, Main.ascii = False
, Main.protocolVersion = defaultProtocolVersion
}
main :: IO ()
main = do
Main.command options

View File

@ -321,3 +321,13 @@ Benchmark deep-nested-large-record
criterion >= 1.1 && < 1.6,
dhall
Default-Language: Haskell2010
Benchmark dhall-command
Type: exitcode-stdio-1.0
Main-Is: benchmark/dhall-command/Main.hs
Build-Depends:
base >= 4 && < 5 ,
dhall
Default-Language: Haskell2010
ghc-options: -rtsopts -O2