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:
parent
218e90af7c
commit
900053a09d
20
benchmark/dhall-command/Main.hs
Normal file
20
benchmark/dhall-command/Main.hs
Normal 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
|
10
dhall.cabal
10
dhall.cabal
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user