@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE FlexibleContexts #-}
23
34import Streamly
@@ -81,37 +82,65 @@ main = hspec $ do
8182 -- will be effectively shorter. This becomes significant when the rates are
8283 -- lower (1 or lower). For rate 1 we lose 1 second in the end and for rate
8384 -- 10 0.1 second.
84− let rates = [1, 10, 100, 1000, 10000, 100000, 1000000]
85+ let rates = [1, 10, 100, 1000, 10000
86+#ifndef __GHCJS__
87+ , 100000, 1000000
88+#endif
89+ ]
8590 in describe "asyncly no consumer delay no producer delay" $
8691 forM_ rates (\r -> measureRate "asyncly" asyncly r 0 0 range)
8792
8893 -- XXX try staggering the dispatches to achieve higher rates
89− let rates = [1, 10, 100, 1000, 10000, 25000]
94+ let rates = [1, 10, 100, 1000
95+#ifndef __GHCJS__
96+ , 10000, 25000
97+#endif
98+ ]
9099 in describe "asyncly no consumer delay and 1 sec producer delay" $
91100 forM_ rates (\r -> measureRate "asyncly" asyncly r 0 1 range)
92101
93102 -- At lower rates (1/10) this is likely to vary quite a bit depending on
94103 -- the spread of random producer latencies generated.
95− let rates = [1, 10, 100, 1000, 10000, 25000]
104+ let rates = [1, 10, 100, 1000
105+#ifndef __GHCJS__
106+ , 10000, 25000
107+#endif
108+ ]
96109 in describe "asyncly no consumer delay and variable producer delay" $
97110 forM_ rates $ \r ->
98111 measureRate' "asyncly" asyncly r 0 (0.1, 3) range
99112
100− let rates = [1, 10, 100, 1000, 10000, 100000, 1000000]
113+ let rates = [1, 10, 100, 1000, 10000
114+#ifndef __GHCJS__
115+ , 100000, 1000000
116+#endif
117+ ]
101118 in describe "wAsyncly no consumer delay no producer delay" $
102119 forM_ rates (\r -> measureRate "wAsyncly" wAsyncly r 0 0 range)
103120
104− let rates = [1, 10, 100, 1000, 10000, 25000]
121+ let rates = [1, 10, 100, 1000
122+#ifndef __GHCJS__
123+ , 10000, 25000
124+#endif
125+ ]
105126 in describe "wAsyncly no consumer delay and 1 sec producer delay" $
106127 forM_ rates (\r -> measureRate "wAsyncly" wAsyncly r 0 1 range)
107128
108− let rates = [1, 10, 100, 1000, 10000, 100000, 1000000]
129+ let rates = [1, 10, 100, 1000, 10000
130+#ifndef __GHCJS__
131+ , 100000, 1000000
132+#endif
133+ ]
109134 in describe "aheadly no consumer delay no producer delay" $
110135 forM_ rates (\r -> measureRate "aheadly" aheadly r 0 0 range)
111136
112137 -- XXX after the change to stop workers when the heap is clearing
113138 -- thi does not work well at a 25000 ops per second, need to fix.
114− let rates = [1, 10, 100, 1000, 10000, 12500]
139+ let rates = [1, 10, 100, 1000
140+#ifndef __GHCJS__
141+ , 10000, 12500
142+#endif
143+ ]
115144 in describe "aheadly no consumer delay and 1 sec producer delay" $
116145 forM_ rates (\r -> measureRate "aheadly" aheadly r 0 1 range)
117146