mirror of
https://github.com/composewell/streamly.git
synced 2024-09-11 19:47:10 +03:00
Remove use-gauge build flag
This commit is contained in:
parent
7b5478d9f0
commit
633bb185a8
@ -18,7 +18,7 @@ import qualified Streamly.Data.Fold as FL
|
||||
import qualified Streamly.Internal.Data.Stream as S
|
||||
import qualified Streamly.Internal.Data.Stream.IsStream as Internal
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import System.Random
|
||||
|
||||
maxValue :: Int
|
||||
|
@ -9,7 +9,7 @@ import qualified Streamly.Data.Fold as Fold
|
||||
import qualified Streamly.Data.Stream as S
|
||||
import qualified Streamly.Internal.Data.Stream as Stream
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common hiding (benchPureSrc)
|
||||
import qualified Stream.Common as P
|
||||
|
||||
|
@ -47,7 +47,7 @@ import qualified Streamly.Internal.Data.StreamK as StreamK
|
||||
import qualified Streamly.Internal.FileSystem.Handle as Handle
|
||||
import qualified Streamly.Internal.Unicode.Stream as Unicode
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
import Control.Monad.IO.Class (MonadIO)
|
||||
|
@ -41,7 +41,7 @@ import qualified Streamly.Internal.Data.Unfold as Unfold
|
||||
import qualified Streamly.Internal.Data.Pipe as Pipe
|
||||
import qualified Streamly.Internal.Data.Stream as Stream
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
import Prelude hiding (all, any, take, unzip, sequence_, filter)
|
||||
|
||||
|
@ -13,7 +13,7 @@ import qualified Streamly.Internal.Data.Ring as Ring
|
||||
import qualified Streamly.Internal.Data.Stream as Stream
|
||||
|
||||
import Streamly.Benchmark.Common
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
{-# INLINE source #-}
|
||||
source :: (Monad m, Num a, Stream.Enumerable a) =>
|
||||
|
@ -49,7 +49,7 @@ import qualified Streamly.Internal.Data.MutArray as MArray
|
||||
import qualified Streamly.Internal.Data.Fold as Fold
|
||||
import qualified Streamly.Internal.Data.Stream as Stream
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common hiding (benchPureSrc)
|
||||
|
||||
type Stream = MutArray
|
||||
|
@ -49,7 +49,7 @@ import qualified Streamly.Data.Stream as Stream
|
||||
import qualified Streamly.Internal.Data.Producer as Producer
|
||||
import qualified Streamly.Internal.Data.Stream as Stream
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
|
||||
|
@ -48,7 +48,7 @@ import qualified Streamly.Data.Parser as PRD
|
||||
import qualified Streamly.Internal.Data.ParserK as PR
|
||||
import qualified Streamly.Internal.Data.StreamK as StreamK
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -16,7 +16,7 @@ import qualified Streamly.Internal.Data.Array as Array
|
||||
import qualified Streamly.Internal.Data.Ring as Ring
|
||||
import qualified Data.Foldable as P
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
import Prelude as P
|
||||
|
@ -42,7 +42,7 @@ import Streamly.Internal.Data.Serialize.TH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
#ifndef USE_UNBOX
|
||||
|
@ -104,7 +104,7 @@ import qualified Streamly.Internal.Data.Stream as StreamK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Prelude hiding (Foldable(..), mapM, replicate)
|
||||
|
||||
#ifdef USE_STREAMK
|
||||
|
@ -21,7 +21,7 @@ import qualified Streamly.Data.Fold as Fold
|
||||
import qualified Streamly.Data.Stream as Stream
|
||||
import qualified Streamly.Internal.Data.Stream.Concurrent as Async
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Prelude hiding (mapM)
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
|
@ -57,7 +57,7 @@ import qualified Streamly.Internal.Data.Stream as StreamK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
import Prelude hiding (length, sum, or, and, any, all, notElem, elem, (!!),
|
||||
lookup, repeat, minimum, maximum, product, last, mapM_, init)
|
||||
|
@ -45,7 +45,7 @@ import qualified Streamly.Internal.Data.Stream as Stream
|
||||
import qualified Streamly.Internal.Data.Stream.Exception.Lifted as Stream
|
||||
#endif
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Prelude hiding (last, length)
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
|
@ -54,7 +54,7 @@ import qualified Streamly.Internal.Data.Stream as StreamK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Stream.Common
|
||||
import Streamly.Benchmark.Common
|
||||
import Prelude hiding (concatMap)
|
||||
|
@ -40,7 +40,7 @@ import qualified Stream.Common as Common
|
||||
#endif
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
import qualified Prelude
|
||||
|
||||
|
@ -37,7 +37,7 @@ import qualified Control.Monad.State.Strict as State
|
||||
#endif
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
import Prelude hiding (reverse, tail)
|
||||
|
||||
|
@ -61,7 +61,7 @@ import qualified Streamly.Internal.Data.Stream as K
|
||||
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Benchmark.Common
|
||||
import Stream.Common
|
||||
import Prelude hiding (reverse, tail)
|
||||
|
@ -35,7 +35,7 @@ import qualified Streamly.Internal.FileSystem.Handle as IFH
|
||||
import qualified Streamly.Internal.Unicode.Stream as IUS
|
||||
import qualified Streamly.Prelude as S
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Prelude hiding (last, length)
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
|
@ -27,7 +27,7 @@ import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Monad (when)
|
||||
import Data.Maybe (isJust)
|
||||
import Gauge (bench, nfIO, bgroup, Benchmark, defaultMain)
|
||||
import Test.Tasty.Bench (bench, nfIO, bgroup, Benchmark, defaultMain)
|
||||
import System.Random (randomRIO)
|
||||
import Prelude hiding (tail, mapM_, foldl, last, map, mapM, concatMap, zip)
|
||||
|
||||
|
@ -37,7 +37,7 @@ import qualified Data.List as List
|
||||
|
||||
import qualified Streamly.Internal.Data.StreamK as S
|
||||
|
||||
import Gauge (bench, nfIO, bgroup, Benchmark, defaultMain)
|
||||
import Test.Tasty.Bench (bench, nfIO, bgroup, Benchmark, defaultMain)
|
||||
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
|
@ -23,7 +23,7 @@ import qualified Streamly.Internal.Data.StreamK.Alt as S
|
||||
-- import qualified Streamly.Internal.Data.SVar as S
|
||||
|
||||
import Streamly.Benchmark.Common
|
||||
import Gauge (bgroup, Benchmark, defaultMain)
|
||||
import Test.Tasty.Bench (bgroup, Benchmark, defaultMain)
|
||||
|
||||
value :: Int
|
||||
value = 100000
|
||||
|
@ -37,7 +37,7 @@ import qualified Streamly.Internal.Data.StreamK as S
|
||||
import qualified Streamly.Internal.Data.Stream as D
|
||||
import qualified Streamly.Internal.Data.Fold as Fold
|
||||
|
||||
import Gauge (bgroup, Benchmark, defaultMain)
|
||||
import Test.Tasty.Bench (bgroup, Benchmark, defaultMain)
|
||||
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
|
@ -58,7 +58,7 @@ import qualified Streamly.Internal.Data.StreamK as StreamK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Stream.Common hiding (scanl')
|
||||
import Streamly.Benchmark.Common
|
||||
import Prelude hiding (sequence, mapM)
|
||||
|
@ -36,7 +36,7 @@ import qualified Streamly.Internal.Data.Stream as S
|
||||
import qualified Streamly.Internal.Data.Stream as D
|
||||
import qualified Streamly.Internal.Data.StreamK as K
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Prelude hiding (take, filter, zipWith, map, mapM, takeWhile)
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
|
@ -22,7 +22,7 @@ import Streamly.Benchmark.Common.Handle (mkHandleBenchEnv)
|
||||
import qualified Handle.ReadWrite as RW
|
||||
import qualified Handle.Read as RO
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Prelude hiding (last, length)
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
|
@ -41,7 +41,7 @@ import qualified Streamly.Internal.Unicode.Stream as IUS
|
||||
import qualified Streamly.Data.Stream.Prelude as S
|
||||
import qualified Streamly.Unicode.Stream as SS
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Prelude hiding (last, length)
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
|
||||
|
@ -34,7 +34,7 @@ import qualified Streamly.Internal.FileSystem.Handle as IFH
|
||||
import qualified Streamly.Data.Array as A
|
||||
import qualified Streamly.Data.Stream.Prelude as S
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
|
||||
#ifdef INSPECTION
|
||||
|
@ -10,7 +10,7 @@
|
||||
import Control.Concurrent (threadDelay)
|
||||
import Control.Monad (when)
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Prelude as S
|
||||
import System.Random (randomRIO)
|
||||
|
||||
|
@ -15,7 +15,7 @@ import qualified Streamly.Prelude as S
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
moduleName :: String
|
||||
moduleName = "Prelude.Ahead"
|
||||
|
@ -16,7 +16,7 @@ import qualified Streamly.Internal.Data.Stream.IsStream.Transform as Transform
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
moduleName :: String
|
||||
moduleName = "Prelude.Async"
|
||||
|
@ -15,7 +15,7 @@ import Streamly.Prelude
|
||||
, fromWAsync, parallel, fromParallel
|
||||
)
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import qualified Streamly.Prelude as S
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -30,7 +30,7 @@ import qualified Streamly.Internal.Data.Stream.IsStream as Stream
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
#ifdef INSPECTION
|
||||
import GHC.Types (SPEC(..))
|
||||
|
@ -22,7 +22,7 @@ import qualified Streamly.Internal.Data.Stream.IsStream as Internal
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
moduleName :: String
|
||||
moduleName = "Prelude.Parallel"
|
||||
|
@ -14,7 +14,7 @@ import qualified Streamly.Prelude as S
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
moduleName :: String
|
||||
moduleName = "Prelude.Rate"
|
||||
|
@ -15,7 +15,7 @@ import qualified Streamly.Prelude as S
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
moduleName :: String
|
||||
moduleName = "Prelude.WAsync"
|
||||
|
@ -29,7 +29,7 @@ import qualified Streamly.Internal.Data.Unfold as UF
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
#ifdef INSPECTION
|
||||
import GHC.Types (SPEC(..))
|
||||
|
@ -15,7 +15,7 @@ import qualified Streamly.Prelude as S
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
moduleName :: String
|
||||
moduleName = "Prelude.ZipAsync"
|
||||
|
@ -29,7 +29,7 @@ import qualified Streamly.Prelude as S
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Prelude hiding (sourceUnfoldrM)
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
#ifdef INSPECTION
|
||||
import GHC.Types (SPEC(..))
|
||||
|
@ -16,7 +16,7 @@ import Control.DeepSeq (NFData(..))
|
||||
import Streamly.Internal.Data.Array (Array)
|
||||
import System.FilePath (dropExtensions, takeFileName)
|
||||
import System.FilePath.Posix ((</>))
|
||||
import Gauge.Main (Benchmark, bench, bgroup, defaultMain, env, nfIO)
|
||||
import Test.Tasty.Bench (Benchmark, bench, bgroup, defaultMain, env, nfIO)
|
||||
import Streamly.Internal.Unicode.Char
|
||||
( NormalizationMode(NFC, NFD, NFKC, NFKD)
|
||||
, normalize
|
||||
|
@ -31,7 +31,7 @@ import qualified Streamly.Data.Array as Array
|
||||
import qualified Streamly.Data.Stream as Stream
|
||||
import qualified Streamly.Internal.Unicode.Parser as PRU
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
runParser :: Int -> (Stream IO Char -> IO a) -> IO ()
|
||||
|
@ -33,7 +33,7 @@ import qualified Streamly.Internal.FileSystem.Handle as Handle
|
||||
import qualified Streamly.Internal.Unicode.Array as UnicodeArr
|
||||
import qualified Streamly.Internal.Unicode.Stream as Unicode
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Streamly.Benchmark.Common
|
||||
import Streamly.Benchmark.Common.Handle
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
import Data.Char (chr)
|
||||
import Streamly.Internal.Unicode.Utf8 (Utf8)
|
||||
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
import Streamly.Benchmark.Common
|
||||
|
||||
import qualified Streamly.Internal.Unicode.Utf8 as Utf8
|
||||
|
@ -56,7 +56,7 @@ import System.Random (randomRIO)
|
||||
import qualified Streamly.Internal.Data.Fold as Fold
|
||||
import qualified Streamly.Internal.Data.Stream as S
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Benchmark Prefixes
|
||||
|
@ -46,7 +46,7 @@ import System.Process (callCommand)
|
||||
|
||||
import Data.IORef
|
||||
import Prelude hiding (last, length)
|
||||
import Gauge hiding (env)
|
||||
import Test.Tasty.Bench hiding (env)
|
||||
|
||||
|
||||
scratchDir :: String
|
||||
|
@ -82,7 +82,7 @@ import qualified Streamly.Internal.Data.Stream.IsStream.Type as IsStream
|
||||
import qualified Streamly.Internal.Data.Pipe as Pipe
|
||||
import qualified Streamly.Internal.Data.Stream.Serial as Serial
|
||||
|
||||
import Gauge
|
||||
import Test.Tasty.Bench
|
||||
import Streamly.Internal.Data.Time.Units
|
||||
|
||||
-- Common polymorphic stream APIs used across multiple stream modules
|
||||
|
@ -54,11 +54,6 @@ flag opt
|
||||
manual: True
|
||||
default: True
|
||||
|
||||
flag use-gauge
|
||||
description: Use gauge instead of tasty-bench for benchmarking
|
||||
manual: True
|
||||
default: False
|
||||
|
||||
flag use-streamly-core
|
||||
description: Benchmark only core package
|
||||
manual: True
|
||||
@ -195,22 +190,12 @@ common bench-depends
|
||||
, directory >= 1.2.2 && < 1.4
|
||||
, filepath >= 1.4.1 && < 1.5
|
||||
, ghc-prim >= 0.4 && < 0.12
|
||||
, tasty-bench >= 0.3 && < 0.4
|
||||
, tasty >= 1.4.1 && < 1.6
|
||||
, streamly-core
|
||||
|
||||
if flag(use-streamly-core)
|
||||
build-depends: streamly-core
|
||||
else
|
||||
if !flag(use-streamly-core)
|
||||
build-depends: streamly
|
||||
, streamly-core
|
||||
|
||||
if flag(use-gauge)
|
||||
build-depends: gauge >= 0.2.4 && < 0.3
|
||||
else
|
||||
build-depends: tasty-bench >= 0.3 && < 0.4
|
||||
, tasty >= 1.4.1 && < 1.6
|
||||
mixins: tasty-bench
|
||||
(Test.Tasty.Bench as Gauge
|
||||
, Test.Tasty.Bench as Gauge.Main
|
||||
)
|
||||
|
||||
if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
|
||||
build-depends:
|
||||
|
Loading…
Reference in New Issue
Block a user