File: Bench.hs

package info (click to toggle)
haskell-binary-parsers 0.2.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,252 kB
  • sloc: haskell: 2,156; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import Criterion.Main
import qualified Aeson
import qualified AesonBP
import qualified HttpReq
import Data.List

main :: IO ()
main = do
    http <- HttpReq.headers

    putStrLn "start benchmark http request parser"

    defaultMain http

    putStrLn "start benchmark JSON parser"

    aeson <- Aeson.aeson
    aesonbp <- AesonBP.aeson
    aesonLazy <- Aeson.aesonLazy
    aesonbpLazy <- AesonBP.aesonLazy

    (defaultMain . concat . transpose) [ aeson, aesonbp, aesonLazy, aesonbpLazy ]