on master help sign in
Disable rate tests taking too much memory
b829858Harendra Kumar
bin/test.sh+1
@@ -107,6 +107,7 @@ test_exe_rts_opts () {
107 Data.Array.Foreign) echo -n "-M128M" ;;
107 Data.Array.Foreign) echo -n "-M128M" ;;
108 Data.Array.Prim) echo -n "-M128M" ;;
108 Data.Array.Prim) echo -n "-M128M" ;;
109 Data.Array.Prim.Pinned) echo -n "-M128M" ;;
109 Data.Array.Prim.Pinned) echo -n "-M128M" ;;
110+ Prelude.Rate) echo -n "-M512M" ;;
110 # For -O0 case writeChunks test fails, maybe we should have a separate flag
111 # For -O0 case writeChunks test fails, maybe we should have a separate flag
111 # for O0 case?
112 # for O0 case?
112 FileSystem.Handle) echo -n "-K16M" ;;
113 FileSystem.Handle) echo -n "-K16M" ;;
test/Streamly/Test/Prelude/Rate.hs+17−15
@@ -177,9 +177,11 @@ main = hspec $ do
177 forM_ rates (\r -> measureRate "asyncly" fromAsync r 0 0 range)
177 forM_ rates (\r -> measureRate "asyncly" fromAsync r 0 0 range)
178
178
179 -- XXX try staggering the dispatches to achieve higher rates
179 -- XXX try staggering the dispatches to achieve higher rates
180+ -- Producer delay causes a lot of threads to be created, consuming large
181+ -- amounts of memory at higher rates.
180− let rates = [1, 10, 100, 1000
182+ let rates = [1, 10, 100
181−#ifndef __GHCJS__
183+#if !defined(__GHCJS__) && defined USE_LARGE_MEMORY
182− , 10000, 25000
184+ 1000, 10000, 25000
183#endif
185#endif
184 ]
186 ]
185 in describe "asyncly no consumer delay and 1 sec producer delay" $
187 in describe "asyncly no consumer delay and 1 sec producer delay" $
@@ -187,12 +189,12 @@ main = hspec $ do
187
189
188 -- At lower rates (1/10) this is likely to vary quite a bit depending on
190 -- At lower rates (1/10) this is likely to vary quite a bit depending on
189 -- the spread of random producer latencies generated.
191 -- the spread of random producer latencies generated.
190− let rates = [1, 10, 100, 1000
192+ let rates = [1, 10, 100
191−#ifndef __GHCJS__
193+#if !defined(__GHCJS__) && defined USE_LARGE_MEMORY
192− , 10000, 25000
194+ , 1000, 10000, 25000
193#endif
195#endif
194 ]
196 ]
195− in describe "asyncly no consumer delay and variable producer delay" $
197+ in describe "asyncly, no consumer delay and variable producer delay" $
196 forM_ rates $ \r ->
198 forM_ rates $ \r ->
197 measureRateVariable "asyncly" fromAsync r 0 (0.1, 3) range
199 measureRateVariable "asyncly" fromAsync r 0 (0.1, 3) range
198
200
@@ -201,15 +203,15 @@ main = hspec $ do
201 , 100000, 1000000
203 , 100000, 1000000
202#endif
204#endif
203 ]
205 ]
204− in describe "fromWAsync no consumer delay no producer delay" $
206+ in describe "fromWAsync, no consumer delay no producer delay" $
205 forM_ rates (\r -> measureRate "fromWAsync" fromWAsync r 0 0 range)
207 forM_ rates (\r -> measureRate "fromWAsync" fromWAsync r 0 0 range)
206
208
207 let rates = [1, 10, 100, 1000
209 let rates = [1, 10, 100, 1000
208−#ifndef __GHCJS__
210+#if !defined(__GHCJS__) && defined USE_LARGE_MEMORY
209 , 10000, 25000
211 , 10000, 25000
210#endif
212#endif
211 ]
213 ]
212− in describe "fromWAsync no consumer delay and 1 sec producer delay" $
214+ in describe "fromWAsync, no consumer delay and 1 sec producer delay" $
213 forM_ rates (\r -> measureRate "fromWAsync" fromWAsync r 0 1 range)
215 forM_ rates (\r -> measureRate "fromWAsync" fromWAsync r 0 1 range)
214
216
215 let rates = [1, 10, 100, 1000, 10000
217 let rates = [1, 10, 100, 1000, 10000
@@ -217,20 +219,20 @@ main = hspec $ do
217 , 100000, 1000000
219 , 100000, 1000000
218#endif
220#endif
219 ]
221 ]
220− in describe "aheadly no consumer delay no producer delay" $
222+ in describe "aheadly, no consumer delay no producer delay" $
221 forM_ rates (\r -> measureRate "aheadly" fromAhead r 0 0 range)
223 forM_ rates (\r -> measureRate "aheadly" fromAhead r 0 0 range)
222
224
223 -- XXX after the change to stop workers when the heap is clearing
225 -- XXX after the change to stop workers when the heap is clearing
224 -- thi does not work well at a 25000 ops per second, need to fix.
226 -- thi does not work well at a 25000 ops per second, need to fix.
225 let rates = [1, 10, 100, 1000
227 let rates = [1, 10, 100, 1000
226−#ifndef __GHCJS__
228+#if !defined(__GHCJS__) && defined USE_LARGE_MEMORY
227 , 10000, 12500
229 , 10000, 12500
228#endif
230#endif
229 ]
231 ]
230− in describe "aheadly no consumer delay and 1 sec producer delay" $
232+ in describe "aheadly, no consumer delay and 1 sec producer delay" $
231 forM_ rates (\r -> measureRate "aheadly" fromAhead r 0 1 range)
233 forM_ rates (\r -> measureRate "aheadly" fromAhead r 0 1 range)
232
234
233− describe "asyncly with 1 sec producer delay and some consumer delay" $ do
235+ describe "asyncly, some consumer delay and 1 sec producer delay" $ do
234 -- ideally it should take 10 x 1 + 1 seconds
236 -- ideally it should take 10 x 1 + 1 seconds
235 forM_ [1] (\r -> measureRate "asyncly" fromAsync r 1 1 (11, 16))
237 forM_ [1] (\r -> measureRate "asyncly" fromAsync r 1 1 (11, 16))
236 -- ideally it should take 10 x 2 + 1 seconds
238 -- ideally it should take 10 x 2 + 1 seconds
@@ -238,7 +240,7 @@ main = hspec $ do
238 -- ideally it should take 10 x 3 + 1 seconds
240 -- ideally it should take 10 x 3 + 1 seconds
239 forM_ [1] (\r -> measureRate "asyncly" fromAsync r 3 1 (31, 33))
241 forM_ [1] (\r -> measureRate "asyncly" fromAsync r 3 1 (31, 33))
240
242
241− describe "aheadly with 1 sec producer delay and some consumer delay" $ do
243+ describe "aheadly, some consumer delay and 1 sec producer delay" $ do
242 forM_ [1] (\r -> measureRate "aheadly" fromAhead r 1 1 (11, 16))
244 forM_ [1] (\r -> measureRate "aheadly" fromAhead r 1 1 (11, 16))
243 forM_ [1] (\r -> measureRate "aheadly" fromAhead r 2 1 (21, 23))
245 forM_ [1] (\r -> measureRate "aheadly" fromAhead r 2 1 (21, 23))
244 forM_ [1] (\r -> measureRate "aheadly" fromAhead r 3 1 (31, 33))
246 forM_ [1] (\r -> measureRate "aheadly" fromAhead r 3 1 (31, 33))