@@ -249,9 +249,17 @@ common exe-options
249 import: compile-options, optimization-options, threading-options
249 import: compile-options, optimization-options, threading-options
251-- Some benchmarks are threaded some are not
251-- Some benchmarks are threaded some are not
252+-- XXX dependencies should be separated under bench-depends
252common bench-options
253common bench-options
253 import: compile-options, optimization-options
254 import: compile-options, optimization-options
254− ghc-options: -with-rtsopts "-T"
255+ ghc-options: -with-rtsopts "-T -M256M"
256+ build-depends: mtl >= 2.2 && < 3
258+common bench-options-threaded
259+ import: compile-options, optimization-options
260+ -- -threaded and -N2 is important because some GC and space leak issues
261+ -- trigger only with these options.
262+ ghc-options: -threaded -with-rtsopts "-T -N2 -M256M"
255 build-depends: mtl >= 2.2 && < 3
263 build-depends: mtl >= 2.2 && < 3
257-------------------------------------------------------------------------------
265-------------------------------------------------------------------------------
@@ -579,7 +587,7 @@ benchmark linear
579 , inspection-testing >= 0.4 && < 0.5
587 , inspection-testing >= 0.4 && < 0.5
581benchmark linear-async
589benchmark linear-async
582− import: bench-options
590+ import: bench-options-threaded
583 cpp-options: -DLINEAR_ASYNC
591 cpp-options: -DLINEAR_ASYNC
584 type: exitcode-stdio-1.0
592 type: exitcode-stdio-1.0
585 hs-source-dirs: benchmark
593 hs-source-dirs: benchmark
@@ -599,27 +607,31 @@ benchmark linear-async
599 , inspection-testing >= 0.4 && < 0.5
607 , inspection-testing >= 0.4 && < 0.5
601benchmark linear-async-long
609benchmark linear-async-long
602− import: bench-options
610+ import: bench-options-threaded
603 cpp-options: -DLONG_BENCHMARKS
611 cpp-options: -DLONG_BENCHMARKS
604 type: exitcode-stdio-1.0
612 type: exitcode-stdio-1.0
605 hs-source-dirs: benchmark
613 hs-source-dirs: benchmark
606 main-is: LinearAsync.hs
614 main-is: LinearAsync.hs
607 other-modules: Streamly.Benchmark.Prelude
615 other-modules: Streamly.Benchmark.Prelude
608− build-depends:
616+ if flag(dev)
609− streamly
617+ buildable: True
610− , base >= 4.8 && < 5
611− , deepseq >= 1.4.1 && < 1.5
612− , random >= 1.0 && < 2.0
613− , gauge >= 0.2.4 && < 0.3
615 build-depends:
618 build-depends:
620+ , base >= 4.8 && < 5
621+ , deepseq >= 1.4.1 && < 1.5
622+ , random >= 1.0 && < 2.0
623+ , gauge >= 0.2.4 && < 0.3
616− transformers >= 0.4 && < 0.6
626+ transformers >= 0.4 && < 0.6
617− if flag(inspection)
627+ if flag(inspection)
618− build-depends: template-haskell >= 2.14 && < 2.16
628+ build-depends: template-haskell >= 2.14 && < 2.16
619− , inspection-testing >= 0.4 && < 0.5
629+ , inspection-testing >= 0.4 && < 0.5
621benchmark linear-rate
633benchmark linear-rate
622− import: bench-options
634+ import: bench-options-threaded
623 type: exitcode-stdio-1.0
635 type: exitcode-stdio-1.0
624 hs-source-dirs: benchmark
636 hs-source-dirs: benchmark
625 main-is: LinearRate.hs
637 main-is: LinearRate.hs
@@ -738,7 +750,7 @@ benchmark fileio
738 , inspection-testing >= 0.4 && < 0.5
750 , inspection-testing >= 0.4 && < 0.5
740benchmark concurrent
752benchmark concurrent
741− import: bench-options
753+ import: bench-options-threaded
742 type: exitcode-stdio-1.0
754 type: exitcode-stdio-1.0
743 hs-source-dirs: benchmark
755 hs-source-dirs: benchmark
744 main-is: Concurrent.hs
756 main-is: Concurrent.hs