on 401f504 help sign in
57 lines 1.5 kB history raw
1-- |
2-- Module : Streamly.Benchmark.FileSystem.Handle
3-- Copyright : (c) 2019 Composewell Technologies
4-- License : BSD-3-Clause
5-- Maintainer : streamly@composewell.com
6-- Stability : experimental
7-- Portability : GHC
9{-# LANGUAGE CPP #-}
10{-# LANGUAGE ScopedTypeVariables #-}
12#ifdef __HADDOCK_VERSION__
13#undef INSPECTION
14#endif
16#ifdef INSPECTION
17{-# LANGUAGE TemplateHaskell #-}
18{-# OPTIONS_GHC -fplugin Test.Inspection.Plugin #-}
19#endif
21#if __GLASGOW_HASKELL__ >= 800
22#endif
24import Streamly.Benchmark.Common.Handle (mkHandleBenchEnv)
26import qualified Handle.ReadWrite as RW
27import qualified Handle.Read as RO
29import Gauge hiding (env)
30import Prelude hiding (last, length)
31import Streamly.Benchmark.Common
33-------------------------------------------------------------------------------
34--
35-------------------------------------------------------------------------------
37moduleName :: String
38moduleName = "FileSystem.Handle"
40-------------------------------------------------------------------------------
41--
42-------------------------------------------------------------------------------
44main :: IO ()
45main = do
46 (_, cfg, benches) <- parseCLIOpts defaultStreamSize
47 env <- mkHandleBenchEnv
48 runMode (mode cfg) cfg benches (allBenchmarks env)
50 where
52 allBenchmarks env =
53 [ bgroup (o_1_space_prefix moduleName) $ Prelude.concat
54 [ RO.allBenchmarks env
55 , RW.allBenchmarks env
56 ]
57 ]