on master help sign in
use -threaded, -N2, -M256M options for threaded benchmarks

Many issues are observed only with -threaded and -N2. We are also limiting the heap memory to 256MB as all the benchmarks should ideally finish well below that, there should be nothing that consumes a whole lot of memory. If we find such genuine benchmarks we can make exceptions for those.

commit292766153d028a5c59104a92056d0458505b8502 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 25 Dec 2019, 21:26 (7 years ago) parent998f496
1 file changed+28−16
streamly.cabal+28−16
streamly.cabal+28−16
@@ -249,9 +249,17 @@ common exe-options
249249 import: compile-options, optimization-options, threading-options
250250
251251-- Some benchmarks are threaded some are not
252+-- XXX dependencies should be separated under bench-depends
252253common bench-options
253254 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
257+
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"
255263 build-depends: mtl >= 2.2 && < 3
256264
257265-------------------------------------------------------------------------------
@@ -579,7 +587,7 @@ benchmark linear
579587 , inspection-testing >= 0.4 && < 0.5
580588
581589benchmark linear-async
582− import: bench-options
590+ import: bench-options-threaded
583591 cpp-options: -DLINEAR_ASYNC
584592 type: exitcode-stdio-1.0
585593 hs-source-dirs: benchmark
@@ -599,27 +607,31 @@ benchmark linear-async
599607 , inspection-testing >= 0.4 && < 0.5
600608
601609benchmark linear-async-long
602− import: bench-options
610+ import: bench-options-threaded
603611 cpp-options: -DLONG_BENCHMARKS
604612 type: exitcode-stdio-1.0
605613 hs-source-dirs: benchmark
606614 main-is: LinearAsync.hs
607615 other-modules: Streamly.Benchmark.Prelude
608− build-depends:
609− streamly
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
614− if impl(ghc < 8.0)
616+ if flag(dev)
617+ buildable: True
615618 build-depends:
616− transformers >= 0.4 && < 0.6
617− if flag(inspection)
618− build-depends: template-haskell >= 2.14 && < 2.16
619− , inspection-testing >= 0.4 && < 0.5
619+ streamly
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
624+ if impl(ghc < 8.0)
625+ build-depends:
626+ transformers >= 0.4 && < 0.6
627+ if flag(inspection)
628+ build-depends: template-haskell >= 2.14 && < 2.16
629+ , inspection-testing >= 0.4 && < 0.5
630+ else
631+ buildable: False
620632
621633benchmark linear-rate
622− import: bench-options
634+ import: bench-options-threaded
623635 type: exitcode-stdio-1.0
624636 hs-source-dirs: benchmark
625637 main-is: LinearRate.hs
@@ -738,7 +750,7 @@ benchmark fileio
738750 , inspection-testing >= 0.4 && < 0.5
739751
740752benchmark concurrent
741− import: bench-options
753+ import: bench-options-threaded
742754 type: exitcode-stdio-1.0
743755 hs-source-dirs: benchmark
744756 main-is: Concurrent.hs