Make warp benchmarks build with modern criterion

This commit is contained in:
Ryan Scott 2016-05-17 12:41:41 -04:00
parent 007c32993f
commit 1b567285b0
2 changed files with 18 additions and 7 deletions

View File

@ -32,15 +32,15 @@ main = do
defaultMain [
bgroup "requestLine1" [
bench "parseRequestLine3" $ whnf parseRequestLine3 requestLine1
, bench "parseRequestLine2" $ parseRequestLine2 requestLine1
, bench "parseRequestLine1" $ parseRequestLine1 requestLine1
, bench "parseRequestLine0" $ parseRequestLine0 requestLine1
, bench "parseRequestLine2" $ whnfIO $ parseRequestLine2 requestLine1
, bench "parseRequestLine1" $ whnfIO $ parseRequestLine1 requestLine1
, bench "parseRequestLine0" $ whnfIO $ parseRequestLine0 requestLine1
]
, bgroup "requestLine2" [
bench "parseRequestLine3" $ whnf parseRequestLine3 requestLine2
, bench "parseRequestLine2" $ parseRequestLine2 requestLine2
, bench "parseRequestLine1" $ parseRequestLine1 requestLine2
, bench "parseRequestLine0" $ parseRequestLine0 requestLine2
, bench "parseRequestLine2" $ whnfIO $ parseRequestLine2 requestLine2
, bench "parseRequestLine1" $ whnfIO $ parseRequestLine1 requestLine2
, bench "parseRequestLine0" $ whnfIO $ parseRequestLine0 requestLine2
]
]

View File

@ -185,11 +185,22 @@ Benchmark parser
Main-Is: Parser.hs
HS-Source-Dirs: bench .
Build-Depends: base
, auto-update
, bytestring
, criterion
, containers
, criterion >= 1
, hashable
, http-date
, http-types
, network
, network
, unix-compat
if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd)
Cpp-Options: -DSENDFILEFD
Build-Depends: unix
if os(windows)
Cpp-Options: -DWINDOWS
Source-Repository head
Type: git