on master help sign in
Move compilation memory restrictions under a flag
27ccdf4Adithya Kumar
benchmark/streamly-benchmarks.cabal+19−5
@@ -19,6 +19,11 @@ flag fusion-plugin
19 manual: True
19 manual: True
20 default: False
20 default: False
21
21
22+flag limit-build-mem
23+ description: Limits memory when building the executables
24+ manual: True
25+ default: False
26+
22flag inspection
27flag inspection
23 description: Enable inspection testing
28 description: Enable inspection testing
24 manual: True
29 manual: True
@@ -173,11 +178,13 @@ benchmark Prelude.Serial
173 , Serial.Nested
178 , Serial.Nested
174 , Serial.Exceptions
179 , Serial.Exceptions
175 , Serial.Split
180 , Serial.Split
176− ghc-options: +RTS -M2000M -RTS
177 if impl(ghcjs)
181 if impl(ghcjs)
178 buildable: False
182 buildable: False
179 else
183 else
180 buildable: True
184 buildable: True
185+ if flag(limit-build-mem)
186+ ghc-options: +RTS -M2000M -RTS
187+
181
188
182benchmark Prelude.WSerial
189benchmark Prelude.WSerial
183 import: bench-options
190 import: bench-options
@@ -202,13 +209,15 @@ benchmark Prelude.ZipSerial
202benchmark Prelude.ZipAsync
209benchmark Prelude.ZipAsync
203 import: bench-options
210 import: bench-options
204 type: exitcode-stdio-1.0
211 type: exitcode-stdio-1.0
205− ghc-options: +RTS -M1000M -RTS
206 hs-source-dirs: Streamly/Benchmark/Prelude
212 hs-source-dirs: Streamly/Benchmark/Prelude
207 main-is: ZipAsync.hs
213 main-is: ZipAsync.hs
208 if impl(ghcjs)
214 if impl(ghcjs)
209 buildable: False
215 buildable: False
210 else
216 else
211 buildable: True
217 buildable: True
218+ if flag(limit-build-mem)
219+ ghc-options: +RTS -M1000M -RTS
220+
212
221
213benchmark Prelude.Ahead
222benchmark Prelude.Ahead
214 import: bench-options-threaded
223 import: bench-options-threaded
@@ -243,13 +252,15 @@ benchmark Prelude.WAsync
243benchmark Prelude.Parallel
252benchmark Prelude.Parallel
244 import: bench-options-threaded
253 import: bench-options-threaded
245 type: exitcode-stdio-1.0
254 type: exitcode-stdio-1.0
246− ghc-options: +RTS -M2000M -RTS
247 hs-source-dirs: Streamly/Benchmark/Prelude
255 hs-source-dirs: Streamly/Benchmark/Prelude
248 main-is: Parallel.hs
256 main-is: Parallel.hs
249 if impl(ghcjs)
257 if impl(ghcjs)
250 buildable: False
258 buildable: False
251 else
259 else
252 buildable: True
260 buildable: True
261+ if flag(limit-build-mem)
262+ ghc-options: +RTS -M2000M -RTS
263+
253
264
254benchmark Data.Unfold
265benchmark Data.Unfold
255 import: bench-options
266 import: bench-options
@@ -276,12 +287,14 @@ benchmark Data.Parser.ParserD
276 type: exitcode-stdio-1.0
287 type: exitcode-stdio-1.0
277 hs-source-dirs: Streamly/Benchmark/Data/Parser
288 hs-source-dirs: Streamly/Benchmark/Data/Parser
278 main-is: ParserD.hs
289 main-is: ParserD.hs
279− ghc-options: +RTS -M750M -RTS
280 if impl(ghcjs)
290 if impl(ghcjs)
281 buildable: False
291 buildable: False
282 else
292 else
283 buildable: True
293 buildable: True
284 build-depends: exceptions >= 0.8 && < 0.11
294 build-depends: exceptions >= 0.8 && < 0.11
295+ if flag(limit-build-mem)
296+ ghc-options: +RTS -M750M -RTS
297+
285
298
286benchmark Data.Parser.ParserK
299benchmark Data.Parser.ParserK
287 import: bench-options
300 import: bench-options
@@ -314,13 +327,14 @@ benchmark Data.Parser
314 import: bench-options
327 import: bench-options
315 type: exitcode-stdio-1.0
328 type: exitcode-stdio-1.0
316 hs-source-dirs: Streamly/Benchmark/Data
329 hs-source-dirs: Streamly/Benchmark/Data
317− ghc-options: +RTS -M1000M -RTS
318 main-is: Parser.hs
330 main-is: Parser.hs
319 if impl(ghcjs)
331 if impl(ghcjs)
320 buildable: False
332 buildable: False
321 else
333 else
322 buildable: True
334 buildable: True
323 build-depends: exceptions >= 0.8 && < 0.11
335 build-depends: exceptions >= 0.8 && < 0.11
336+ if flag(limit-build-mem)
337+ ghc-options: +RTS -M1000M -RTS
324
338
325-------------------------------------------------------------------------------
339-------------------------------------------------------------------------------
326-- Raw Streams
340-- Raw Streams
test/streamly-tests.cabal+20−7
@@ -10,6 +10,11 @@ flag fusion-plugin
10 manual: True
10 manual: True
11 default: False
11 default: False
12
12
13+flag limit-build-mem
14+ description: Limits memory when building the executables
15+ manual: True
16+ default: False
17+
13flag dev
18flag dev
14 description: Development build
19 description: Development build
15 manual: True
20 manual: True
@@ -53,6 +58,7 @@ common compile-options
53 -Wredundant-constraints
58 -Wredundant-constraints
54 -Wnoncanonical-monad-instances
59 -Wnoncanonical-monad-instances
55 -Rghc-timing
60 -Rghc-timing
61+ -fno-ignore-asserts
56
62
57 if flag(has-llvm)
63 if flag(has-llvm)
58 ghc-options: -fllvm
64 ghc-options: -fllvm
@@ -61,8 +67,8 @@ common compile-options
61 ghc-options: -Wmissed-specialisations
67 ghc-options: -Wmissed-specialisations
62 -Wall-missed-specialisations
68 -Wall-missed-specialisations
63
69
64− ghc-options: -fno-ignore-asserts
70+ if flag(limit-build-mem)
65− +RTS -M512M -RTS
71+ ghc-options: +RTS -M512M -RTS
66
72
67common default-extensions
73common default-extensions
68 default-extensions:
74 default-extensions:
@@ -146,10 +152,12 @@ common lib-options
146
152
147library
153library
148 import: lib-options, test-dependencies
154 import: lib-options, test-dependencies
149− ghc-options: +RTS -M1500M -RTS
150 hs-source-dirs: lib
155 hs-source-dirs: lib
151 exposed-modules: Streamly.Test.Common
156 exposed-modules: Streamly.Test.Common
152 , Streamly.Test.Prelude.Common
157 , Streamly.Test.Prelude.Common
158+ if flag(limit-build-mem)
159+ ghc-options: +RTS -M1500M -RTS
160+
153
161
154-------------------------------------------------------------------------------
162-------------------------------------------------------------------------------
155-- Test suite options
163-- Test suite options
@@ -222,13 +230,15 @@ test-suite Data.Parser
222 import: test-options
230 import: test-options
223 type: exitcode-stdio-1.0
231 type: exitcode-stdio-1.0
224 main-is: Streamly/Test/Data/Parser.hs
232 main-is: Streamly/Test/Data/Parser.hs
233+ if flag(limit-build-mem)
225− ghc-options: +RTS -M1000M -RTS
234+ ghc-options: +RTS -M1000M -RTS
226
235
227test-suite Data.Parser.ParserD
236test-suite Data.Parser.ParserD
228 import: test-options
237 import: test-options
229 type: exitcode-stdio-1.0
238 type: exitcode-stdio-1.0
230 main-is: Streamly/Test/Data/Parser/ParserD.hs
239 main-is: Streamly/Test/Data/Parser/ParserD.hs
240+ if flag(limit-build-mem)
231− ghc-options: +RTS -M1000M -RTS
241+ ghc-options: +RTS -M1000M -RTS
232
242
233test-suite Data.SmallArray
243test-suite Data.SmallArray
234 import: test-options
244 import: test-options
@@ -287,7 +297,8 @@ test-suite Prelude.Concurrent
287 type: exitcode-stdio-1.0
297 type: exitcode-stdio-1.0
288 main-is: Streamly/Test/Prelude/Concurrent.hs
298 main-is: Streamly/Test/Prelude/Concurrent.hs
289 ghc-options: -main-is Streamly.Test.Prelude.Concurrent.main
299 ghc-options: -main-is Streamly.Test.Prelude.Concurrent.main
300+ if flag(limit-build-mem)
290− +RTS -M2000M -RTS
301+ ghc-options: +RTS -M2000M -RTS
291
302
292test-suite Prelude.Fold
303test-suite Prelude.Fold
293 import: test-options
304 import: test-options
@@ -316,7 +327,9 @@ test-suite Prelude.Serial
316 type: exitcode-stdio-1.0
327 type: exitcode-stdio-1.0
317 main-is: Streamly/Test/Prelude/Serial.hs
328 main-is: Streamly/Test/Prelude/Serial.hs
318 ghc-options: -main-is Streamly.Test.Prelude.Serial.main
329 ghc-options: -main-is Streamly.Test.Prelude.Serial.main
330+ if flag(limit-build-mem)
319− +RTS -M1500M -RTS
331+ ghc-options: +RTS -M1500M -RTS
332+
320
333
321test-suite Prelude.WAsync
334test-suite Prelude.WAsync
322 import: test-options
335 import: test-options