on master help sign in
use stack and heap limits on benchmarks
d6993b7Harendra Kumar
benchmark/BaseStreams.hs+21
@@ -41,6 +41,7 @@ benchFold :: NFData b
41 => String -> (t IO Int -> IO b) -> (Int -> t IO Int) -> Benchmark
41 => String -> (t IO Int -> IO b) -> (Int -> t IO Int) -> Benchmark
42benchFold name f src = bench name $ nfIO $ randomRIO (1,1) >>= f . src
42benchFold name f src = bench name $ nfIO $ randomRIO (1,1) >>= f . src
43
43
44+#ifdef DEVBUILD
44-- | Takes a source, and uses it with a default drain/fold method.
45-- | Takes a source, and uses it with a default drain/fold method.
45{-# INLINE benchD #-}
46{-# INLINE benchD #-}
46benchD :: String -> (Int -> D.Stream IO Int) -> Benchmark
47benchD :: String -> (Int -> D.Stream IO Int) -> Benchmark
@@ -49,6 +50,7 @@ benchD name f = bench name $ nfIO $ randomRIO (1,1) >>= D.toNull . f
49{-# INLINE benchK #-}
50{-# INLINE benchK #-}
50benchK :: String -> (Int -> K.Stream IO Int) -> Benchmark
51benchK :: String -> (Int -> K.Stream IO Int) -> Benchmark
51benchK name f = bench name $ nfIO $ randomRIO (1,1) >>= K.toNull . f
52benchK name f = bench name $ nfIO $ randomRIO (1,1) >>= K.toNull . f
53+#endif
52
54
53{-
55{-
54_benchId :: NFData b => String -> (Ops.Stream m Int -> Identity b) -> Benchmark
56_benchId :: NFData b => String -> (Ops.Stream m Int -> Identity b) -> Benchmark
@@ -75,10 +77,14 @@ main =
75 [ benchIO "toNull" D.toNull D.sourceUnfoldrM
77 [ benchIO "toNull" D.toNull D.sourceUnfoldrM
76 , benchIO "mapM_" D.mapM_ D.sourceUnfoldrM
78 , benchIO "mapM_" D.mapM_ D.sourceUnfoldrM
77 , benchIO "uncons" D.uncons D.sourceUnfoldrM
79 , benchIO "uncons" D.uncons D.sourceUnfoldrM
80+#ifdef DEVBUILD
81+ -- XXX these consume too much stack space, need to fix or segregate in
82+ -- another benchmark.
78 , benchFold "tail" D.tail D.sourceUnfoldrM
83 , benchFold "tail" D.tail D.sourceUnfoldrM
79 , benchIO "nullTail" D.nullTail D.sourceUnfoldrM
84 , benchIO "nullTail" D.nullTail D.sourceUnfoldrM
80 , benchIO "headTail" D.headTail D.sourceUnfoldrM
85 , benchIO "headTail" D.headTail D.sourceUnfoldrM
81 , benchFold "toList" D.toList D.sourceUnfoldrM
86 , benchFold "toList" D.toList D.sourceUnfoldrM
87+#endif
82 , benchFold "foldl'" D.foldl D.sourceUnfoldrM
88 , benchFold "foldl'" D.foldl D.sourceUnfoldrM
83 , benchFold "last" D.last D.sourceUnfoldrM
89 , benchFold "last" D.last D.sourceUnfoldrM
84 ]
90 ]
@@ -186,6 +192,9 @@ main =
186 , benchIO "filter-scan" (D.filterScan 4) D.sourceUnfoldrM
192 , benchIO "filter-scan" (D.filterScan 4) D.sourceUnfoldrM
187 , benchIO "filter-map" (D.filterMap 4) D.sourceUnfoldrM
193 , benchIO "filter-map" (D.filterMap 4) D.sourceUnfoldrM
188 ]
194 ]
195+#ifdef DEVBUILD
196+ -- XXX these consume too much stack space, need to fix or segregate in
197+ -- another benchmark.
189 , bgroup "iterated"
198 , bgroup "iterated"
190 [ benchD "mapM" D.iterateMapM
199 [ benchD "mapM" D.iterateMapM
191 , benchD "scan(1/10)" D.iterateScan
200 , benchD "scan(1/10)" D.iterateScan
@@ -197,6 +206,7 @@ main =
197 , benchD "iterateM" D.iterateM
206 , benchD "iterateM" D.iterateM
198
207
199 ]
208 ]
209+#endif
200 ]
210 ]
201 , bgroup "list"
211 , bgroup "list"
202 [ bgroup "elimination"
212 [ bgroup "elimination"
@@ -228,10 +238,14 @@ main =
228 , benchIO "mapM_" K.mapM_ K.sourceUnfoldrM
238 , benchIO "mapM_" K.mapM_ K.sourceUnfoldrM
229 , benchIO "uncons" K.uncons K.sourceUnfoldrM
239 , benchIO "uncons" K.uncons K.sourceUnfoldrM
230 , benchFold "init" K.init K.sourceUnfoldrM
240 , benchFold "init" K.init K.sourceUnfoldrM
241+#ifdef DEVBUILD
242+ -- XXX these consume too much stack space, need to fix or segregate in
243+ -- another benchmark.
231 , benchFold "tail" K.tail K.sourceUnfoldrM
244 , benchFold "tail" K.tail K.sourceUnfoldrM
232 , benchIO "nullTail" K.nullTail K.sourceUnfoldrM
245 , benchIO "nullTail" K.nullTail K.sourceUnfoldrM
233 , benchIO "headTail" K.headTail K.sourceUnfoldrM
246 , benchIO "headTail" K.headTail K.sourceUnfoldrM
234 , benchFold "toList" K.toList K.sourceUnfoldrM
247 , benchFold "toList" K.toList K.sourceUnfoldrM
248+#endif
235 , benchFold "foldl'" K.foldl K.sourceUnfoldrM
249 , benchFold "foldl'" K.foldl K.sourceUnfoldrM
236 , benchFold "last" K.last K.sourceUnfoldrM
250 , benchFold "last" K.last K.sourceUnfoldrM
237 ]
251 ]
@@ -260,7 +274,10 @@ main =
260 (K.sourceUnfoldrMN (K.value `div` 4))
274 (K.sourceUnfoldrMN (K.value `div` 4))
261 , benchIO "intersperse" (K.intersperse 1) (K.sourceUnfoldrMN K.value2)
275 , benchIO "intersperse" (K.intersperse 1) (K.sourceUnfoldrMN K.value2)
262 , benchIO "interspersePure" (K.intersperse 1) (K.sourceUnfoldrN K.value2)
276 , benchIO "interspersePure" (K.intersperse 1) (K.sourceUnfoldrN K.value2)
277+#ifdef DEVBUILD
278+ -- XXX this consumes too much heap
263 , benchIO "foldlS" (K.foldlS 1) K.sourceUnfoldrM
279 , benchIO "foldlS" (K.foldlS 1) K.sourceUnfoldrM
280+#endif
264 ]
281 ]
265 , bgroup "transformationX4"
282 , bgroup "transformationX4"
266 [ benchIO "scan" (K.scan 4) K.sourceUnfoldrM
283 [ benchIO "scan" (K.scan 4) K.sourceUnfoldrM
@@ -332,6 +349,9 @@ main =
332 , benchIO "filter-scan" (K.filterScan 4) K.sourceUnfoldrM
349 , benchIO "filter-scan" (K.filterScan 4) K.sourceUnfoldrM
333 , benchIO "filter-map" (K.filterMap 4) K.sourceUnfoldrM
350 , benchIO "filter-map" (K.filterMap 4) K.sourceUnfoldrM
334 ]
351 ]
352+#ifdef DEVBUILD
353+ -- XXX these consume too much stack space, need to fix or segregate in
354+ -- another benchmark.
335 , bgroup "iterated"
355 , bgroup "iterated"
336 [ benchK "mapM" K.iterateMapM
356 [ benchK "mapM" K.iterateMapM
337 , benchK "scan(1/10)" K.iterateScan
357 , benchK "scan(1/10)" K.iterateScan
@@ -341,6 +361,7 @@ main =
341 , benchK "dropWhileFalse(1/10)" K.iterateDropWhileFalse
361 , benchK "dropWhileFalse(1/10)" K.iterateDropWhileFalse
342 , benchK "dropWhileTrue" K.iterateDropWhileTrue
362 , benchK "dropWhileTrue" K.iterateDropWhileTrue
343 ]
363 ]
364+#endif
344 ]
365 ]
345 , bgroup "streamDK"
366 , bgroup "streamDK"
346 [ bgroup "generation"
367 [ bgroup "generation"
benchmark/Linear.hs+19−10
@@ -434,16 +434,6 @@ main = do
434 , benchIOSink value "filter-scanl1" (Ops.filterScanl1 4)
434 , benchIOSink value "filter-scanl1" (Ops.filterScanl1 4)
435 , benchIOSink value "filter-map" (Ops.filterMap value 4)
435 , benchIOSink value "filter-map" (Ops.filterMap value 4)
436 ]
436 ]
437− , bgroup "iterated"
438− [ benchIOSrc serially "mapM" Ops.iterateMapM
439− , benchIOSrc serially "scan(1/100)" Ops.iterateScan
440− , benchIOSrc serially "scanl1(1/100)" Ops.iterateScanl1
441− , benchIOSrc serially "filterEven" Ops.iterateFilterEven
442− , benchIOSrc serially "takeAll" (Ops.iterateTakeAll value)
443− , benchIOSrc serially "dropOne" Ops.iterateDropOne
444− , benchIOSrc serially "dropWhileFalse" (Ops.iterateDropWhileFalse value)
445− , benchIOSrc serially "dropWhileTrue" (Ops.iterateDropWhileTrue value)
446− ]
447 ]
437 ]
448 , bgroup "wSerially"
438 , bgroup "wSerially"
449 [ bgroup "transformation"
439 [ bgroup "transformation"
@@ -460,11 +450,24 @@ main = do
460 --
450 --
461 -- These are also the operations that programmers should be aware of and
451 -- These are also the operations that programmers should be aware of and
462 -- should avoid using in a streaming application.
452 -- should avoid using in a streaming application.
453+
454+ -- XXX stack dominant (upto 1M), segregate?
455+ , bgroup "iterated"
456+ [ benchIOSrc serially "mapM" Ops.iterateMapM
457+ , benchIOSrc serially "scan(1/100)" Ops.iterateScan
458+ , benchIOSrc serially "scanl1(1/100)" Ops.iterateScanl1
459+ , benchIOSrc serially "filterEven" Ops.iterateFilterEven
460+ , benchIOSrc serially "takeAll" (Ops.iterateTakeAll value)
461+ , benchIOSrc serially "dropOne" Ops.iterateDropOne
462+ , benchIOSrc serially "dropWhileFalse" (Ops.iterateDropWhileFalse value)
463+ , benchIOSrc serially "dropWhileTrue" (Ops.iterateDropWhileTrue value)
464+ ]
463 , bgroup "buffered"
465 , bgroup "buffered"
464 [ -- Inherently non-streaming operations
466 [ -- Inherently non-streaming operations
465
467
466 -- Right folds for reducing are inherently non-streaming as the
468 -- Right folds for reducing are inherently non-streaming as the
467 -- expression needs to be fully built before it can be reduced.
469 -- expression needs to be fully built before it can be reduced.
470+ -- XXX Stack dominant (up to 4MB), segregate?
468 benchIOSink bufValue "foldrM/reduce/IO" Ops.foldrMReduce
471 benchIOSink bufValue "foldrM/reduce/IO" Ops.foldrMReduce
469 , benchIdentitySink bufValue "foldrM/reduce/Identity" Ops.foldrMReduce
472 , benchIdentitySink bufValue "foldrM/reduce/Identity" Ops.foldrMReduce
470
473
@@ -476,12 +479,15 @@ main = do
476 , benchIdentitySink bufValue "foldlM'/build/Identity" Ops.foldlM'Build
479 , benchIdentitySink bufValue "foldlM'/build/Identity" Ops.foldlM'Build
477
480
478 -- accumulation due to strictness of IO monad
481 -- accumulation due to strictness of IO monad
482+ -- XXX Stack dominant, segregate?
479 , benchIOSink bufValue "foldrM/build/IO" Ops.foldrMBuild
483 , benchIOSink bufValue "foldrM/build/IO" Ops.foldrMBuild
480 , benchPureSinkIO bufValue "traversable/mapM" Ops.traversableMapM
484 , benchPureSinkIO bufValue "traversable/mapM" Ops.traversableMapM
481
485
482 -- Converting the stream to a list or pure stream
486 -- Converting the stream to a list or pure stream
487+ -- XXX Stack dominant, segregate?
483 , benchIOSink bufValue "toList" Ops.toList
488 , benchIOSink bufValue "toList" Ops.toList
484 , benchIOSink bufValue "toListRev" Ops.toListRev
489 , benchIOSink bufValue "toListRev" Ops.toListRev
490+
485 , benchIOSink bufValue "toStream" (S.fold IP.toStream)
491 , benchIOSink bufValue "toStream" (S.fold IP.toStream)
486 , benchIOSink bufValue "toStreamRev" (S.fold IP.toStreamRev)
492 , benchIOSink bufValue "toStreamRev" (S.fold IP.toStreamRev)
487
493
@@ -506,9 +512,12 @@ main = do
506 nf Ops.showInstanceList (mkList bufValue))
512 nf Ops.showInstanceList (mkList bufValue))
507
513
508 -- XXX streaming operations that can potentially be fixed
514 -- XXX streaming operations that can potentially be fixed
515+
516+ -- XXX These consume a lot of stack, fix or segregate
509 , benchPureSink bufValue "foldable/sum" Ops.foldableSum
517 , benchPureSink bufValue "foldable/sum" Ops.foldableSum
510 , benchIOSink bufValue "tail" Ops.tail
518 , benchIOSink bufValue "tail" Ops.tail
511 , benchIOSink bufValue "nullHeadTail" Ops.nullHeadTail
519 , benchIOSink bufValue "nullHeadTail" Ops.nullHeadTail
520+
512 , benchIOSrc1 "concatUnfoldInterleaveRepl (x/4,4)"
521 , benchIOSrc1 "concatUnfoldInterleaveRepl (x/4,4)"
513 (Ops.concatUnfoldInterleaveRepl4xN bufValue)
522 (Ops.concatUnfoldInterleaveRepl4xN bufValue)
514 , benchIOSrc1 "concatUnfoldRoundrobinRepl (x/4,4)"
523 , benchIOSrc1 "concatUnfoldRoundrobinRepl (x/4,4)"
benchmark/Nested.hs+1
@@ -35,6 +35,7 @@ main = do
35 , benchIO "toNull" $ Ops.toNull linearCount serially
35 , benchIO "toNull" $ Ops.toNull linearCount serially
36 , benchIO "toNull3" $ Ops.toNull3 linearCount serially
36 , benchIO "toNull3" $ Ops.toNull3 linearCount serially
37 -- , benchIO "toList" $ Ops.toList linearCount serially
37 -- , benchIO "toList" $ Ops.toList linearCount serially
38+ -- XXX takes too much stack space
38 , benchIO "toListSome" $ Ops.toListSome linearCount serially
39 , benchIO "toListSome" $ Ops.toListSome linearCount serially
39 , benchIO "filterAllOut" $ Ops.filterAllOut linearCount serially
40 , benchIO "filterAllOut" $ Ops.filterAllOut linearCount serially
40 , benchIO "filterAllIn" $ Ops.filterAllIn linearCount serially
41 , benchIO "filterAllIn" $ Ops.filterAllIn linearCount serially
benchmark/NestedConcurrent.hs+1
@@ -43,6 +43,7 @@ main = do
43 , benchIO "toNull" $ Ops.toNull linearCount aheadly
43 , benchIO "toNull" $ Ops.toNull linearCount aheadly
44 , benchIO "toNull3" $ Ops.toNull3 linearCount aheadly
44 , benchIO "toNull3" $ Ops.toNull3 linearCount aheadly
45 -- , benchIO "toList" $ Ops.toList linearCount aheadly
45 -- , benchIO "toList" $ Ops.toList linearCount aheadly
46+ -- XXX consumes too much stack space
46 , benchIO "toListSome" $ Ops.toListSome linearCount aheadly
47 , benchIO "toListSome" $ Ops.toListSome linearCount aheadly
47 , benchIO "filterAllOut" $ Ops.filterAllOut linearCount aheadly
48 , benchIO "filterAllOut" $ Ops.filterAllOut linearCount aheadly
48 , benchIO "filterAllIn" $ Ops.filterAllIn linearCount aheadly
49 , benchIO "filterAllIn" $ Ops.filterAllIn linearCount aheadly
benchmark/StreamDKOps.hs+2−3
@@ -13,9 +13,8 @@ module StreamDKOps where
13-- import Control.Monad (when)
13-- import Control.Monad (when)
14-- import Data.Maybe (isJust)
14-- import Data.Maybe (isJust)
15import Prelude
15import Prelude
16− (Monad, Int, (+), ($), (.), return, even, (>), (<=), div,
16+ (Monad, Int, (+), (.), return, undefined, Maybe(..), round, (/),
17− subtract, undefined, Maybe(..), not, (>>=),
17+ (**), (>))
18− maxBound, flip, (<$>), (<*>), round, (/), (**), (<))
19import qualified Prelude as P
18import qualified Prelude as P
20-- import qualified Data.List as List
19-- import qualified Data.List as List
21
20
streamly.cabal+32−25
@@ -262,7 +262,7 @@ common exe-options
262-- XXX dependencies should be separated under bench-depends
262-- XXX dependencies should be separated under bench-depends
263common bench-options
263common bench-options
264 import: compile-options, optimization-options
264 import: compile-options, optimization-options
265− ghc-options: -with-rtsopts "-T -M256M"
265+ ghc-options: -with-rtsopts "-T -K32K -M16M"
266 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
266 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
267 ghc-options: -fplugin Fusion.Plugin
267 ghc-options: -fplugin Fusion.Plugin
268 build-depends:
268 build-depends:
@@ -273,7 +273,7 @@ common bench-options-threaded
273 import: compile-options, optimization-options
273 import: compile-options, optimization-options
274 -- -threaded and -N2 is important because some GC and space leak issues
274 -- -threaded and -N2 is important because some GC and space leak issues
275 -- trigger only with these options.
275 -- trigger only with these options.
276− ghc-options: -threaded -with-rtsopts "-T -N2 -M256M"
276+ ghc-options: -threaded -with-rtsopts "-T -N2 -K32K -M16M"
277 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
277 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
278 ghc-options: -fplugin Fusion.Plugin
278 ghc-options: -fplugin Fusion.Plugin
279 build-depends:
279 build-depends:
@@ -670,6 +670,9 @@ benchmark linear
670 import: bench-options
670 import: bench-options
671 type: exitcode-stdio-1.0
671 type: exitcode-stdio-1.0
672 hs-source-dirs: benchmark
672 hs-source-dirs: benchmark
673+ -- XXX heap/stack limits can be reduced once we split out the buffered
674+ -- benchmarks into a separate suite
675+ ghc-options: -with-rtsopts "-T -K4M -M128M"
673 main-is: Linear.hs
676 main-is: Linear.hs
674 other-modules: Streamly.Benchmark.Prelude, Common
677 other-modules: Streamly.Benchmark.Prelude, Common
675 build-depends:
678 build-depends:
@@ -689,6 +692,7 @@ benchmark nested
689 import: bench-options
692 import: bench-options
690 type: exitcode-stdio-1.0
693 type: exitcode-stdio-1.0
691 hs-source-dirs: benchmark
694 hs-source-dirs: benchmark
695+ ghc-options: -with-rtsopts "-T -K256K -M16M"
692 main-is: Nested.hs
696 main-is: Nested.hs
693 other-modules: NestedOps, Common
697 other-modules: NestedOps, Common
694 build-depends:
698 build-depends:
@@ -705,6 +709,7 @@ benchmark nested-unfold
705 import: bench-options
709 import: bench-options
706 type: exitcode-stdio-1.0
710 type: exitcode-stdio-1.0
707 hs-source-dirs: benchmark
711 hs-source-dirs: benchmark
712+ ghc-options: -with-rtsopts "-T -K64K -M16M"
708 main-is: NestedUnfold.hs
713 main-is: NestedUnfold.hs
709 other-modules: NestedUnfoldOps, Common
714 other-modules: NestedUnfoldOps, Common
710 build-depends:
715 build-depends:
@@ -721,6 +726,7 @@ benchmark unpinned-array
721 import: bench-options
726 import: bench-options
722 type: exitcode-stdio-1.0
727 type: exitcode-stdio-1.0
723 hs-source-dirs: benchmark
728 hs-source-dirs: benchmark
729+ ghc-options: -with-rtsopts "-T -K1K -M128M"
724 main-is: Streamly/Benchmark/Data/Array.hs
730 main-is: Streamly/Benchmark/Data/Array.hs
725 other-modules: Streamly.Benchmark.Data.ArrayOps
731 other-modules: Streamly.Benchmark.Data.ArrayOps
726 build-depends:
732 build-depends:
@@ -737,6 +743,7 @@ benchmark prim-array
737 import: bench-options
743 import: bench-options
738 type: exitcode-stdio-1.0
744 type: exitcode-stdio-1.0
739 hs-source-dirs: benchmark
745 hs-source-dirs: benchmark
746+ ghc-options: -with-rtsopts "-T -K64K -M32M"
740 main-is: Streamly/Benchmark/Data/Prim/Array.hs
747 main-is: Streamly/Benchmark/Data/Prim/Array.hs
741 other-modules: Streamly.Benchmark.Data.Prim.ArrayOps
748 other-modules: Streamly.Benchmark.Data.Prim.ArrayOps
742 build-depends:
749 build-depends:
@@ -753,6 +760,7 @@ benchmark small-array
753 import: bench-options
760 import: bench-options
754 type: exitcode-stdio-1.0
761 type: exitcode-stdio-1.0
755 hs-source-dirs: benchmark
762 hs-source-dirs: benchmark
763+ ghc-options: -with-rtsopts "-T -K128K -M16M"
756 main-is: Streamly/Benchmark/Data/SmallArray.hs
764 main-is: Streamly/Benchmark/Data/SmallArray.hs
757 other-modules: Streamly.Benchmark.Data.SmallArrayOps
765 other-modules: Streamly.Benchmark.Data.SmallArrayOps
758 build-depends:
766 build-depends:
@@ -769,6 +777,7 @@ benchmark array
769 import: bench-options
777 import: bench-options
770 type: exitcode-stdio-1.0
778 type: exitcode-stdio-1.0
771 hs-source-dirs: benchmark
779 hs-source-dirs: benchmark
780+ ghc-options: -with-rtsopts "-T -K64K -M128M"
772 main-is: Array.hs
781 main-is: Array.hs
773 other-modules: ArrayOps
782 other-modules: ArrayOps
774 build-depends:
783 build-depends:
@@ -809,6 +818,7 @@ benchmark linear-async
809 import: bench-options-threaded
818 import: bench-options-threaded
810 type: exitcode-stdio-1.0
819 type: exitcode-stdio-1.0
811 hs-source-dirs: benchmark
820 hs-source-dirs: benchmark
821+ ghc-options: -with-rtsopts "-T -N2 -K64K -M16M"
812 main-is: LinearAsync.hs
822 main-is: LinearAsync.hs
813 other-modules: Streamly.Benchmark.Prelude, Common
823 other-modules: Streamly.Benchmark.Prelude, Common
814 build-depends:
824 build-depends:
@@ -828,6 +838,8 @@ benchmark nested-concurrent
828 import: bench-options-threaded
838 import: bench-options-threaded
829 type: exitcode-stdio-1.0
839 type: exitcode-stdio-1.0
830 hs-source-dirs: benchmark
840 hs-source-dirs: benchmark
841+ -- XXX this can be lowered once we split out the finite benchmarks
842+ ghc-options: -with-rtsopts "-T -N2 -K256K -M128M"
831 main-is: NestedConcurrent.hs
843 main-is: NestedConcurrent.hs
832 other-modules: NestedOps, Common
844 other-modules: NestedOps, Common
833 build-depends:
845 build-depends:
@@ -844,6 +856,7 @@ benchmark parallel
844 import: bench-options-threaded
856 import: bench-options-threaded
845 type: exitcode-stdio-1.0
857 type: exitcode-stdio-1.0
846 hs-source-dirs: benchmark
858 hs-source-dirs: benchmark
859+ ghc-options: -with-rtsopts "-T -N2 -K128K -M256M"
847 main-is: Parallel.hs
860 main-is: Parallel.hs
848 other-modules: Streamly.Benchmark.Prelude, NestedOps, Common
861 other-modules: Streamly.Benchmark.Prelude, NestedOps, Common
849 build-depends:
862 build-depends:
@@ -883,14 +896,11 @@ benchmark concurrent
883 type: exitcode-stdio-1.0
896 type: exitcode-stdio-1.0
884 hs-source-dirs: benchmark
897 hs-source-dirs: benchmark
885 main-is: Concurrent.hs
898 main-is: Concurrent.hs
886− if flag(dev)
899+ ghc-options: -with-rtsopts "-T -N2 -K256K -M384M"
887− buildable: True
888− build-depends:
900+ build-depends:
889− streamly
901+ streamly
890− , base >= 4.8 && < 5
902+ , base >= 4.8 && < 5
891− , gauge >= 0.2.4 && < 0.3
903+ , gauge >= 0.2.4 && < 0.3
892− else
893− buildable: False
894
904
895-------------------------------------------------------------------------------
905-------------------------------------------------------------------------------
896-- Internal benchmarks
906-- Internal benchmarks
@@ -900,21 +910,22 @@ benchmark base
900 import: bench-options
910 import: bench-options
901 type: exitcode-stdio-1.0
911 type: exitcode-stdio-1.0
902 hs-source-dirs: benchmark
912 hs-source-dirs: benchmark
913+ if flag(dev)
914+ cpp-options: -DDEVBUILD
915+ ghc-options: -with-rtsopts "-T -K2M -M16M"
916+ else
917+ ghc-options: -with-rtsopts "-T -K128K -M16M"
903 main-is: BaseStreams.hs
918 main-is: BaseStreams.hs
904 other-modules: StreamDOps
919 other-modules: StreamDOps
905 , StreamKOps
920 , StreamKOps
906 , StreamDKOps
921 , StreamDKOps
907
922
908− if flag(dev)
909− buildable: True
910− build-depends:
923+ build-depends:
911 streamly
924 streamly
912 , base >= 4.8 && < 5
925 , base >= 4.8 && < 5
913 , deepseq >= 1.4.1 && < 1.5
926 , deepseq >= 1.4.1 && < 1.5
914 , random >= 1.0 && < 2.0
927 , random >= 1.0 && < 2.0
915 , gauge >= 0.2.4 && < 0.3
928 , gauge >= 0.2.4 && < 0.3
916− else
917− buildable: False
918
929
919executable nano-bench
930executable nano-bench
920 import: bench-options
931 import: bench-options
@@ -931,20 +942,16 @@ executable nano-bench
931 buildable: False
942 buildable: False
932
943
933benchmark adaptive
944benchmark adaptive
934− import: bench-options
945+ import: bench-options-threaded
935 type: exitcode-stdio-1.0
946 type: exitcode-stdio-1.0
936 hs-source-dirs: benchmark
947 hs-source-dirs: benchmark
937 main-is: Adaptive.hs
948 main-is: Adaptive.hs
938 default-language: Haskell2010
949 default-language: Haskell2010
939− if flag(dev)
940− buildable: True
941− build-depends:
950+ build-depends:
942− streamly
951+ streamly
943− , base >= 4.8 && < 5
952+ , base >= 4.8 && < 5
944− , gauge >= 0.2.4 && < 0.3
953+ , gauge >= 0.2.4 && < 0.3
945− , random >= 1.0 && < 2.0
954+ , random >= 1.0 && < 2.0
946− else
947− buildable: False
948
955
949executable chart
956executable chart
950 default-language: Haskell2010
957 default-language: Haskell2010