@@ -1,3 +1,4 @@
1{-# LANGUAGE FlexibleContexts #-}
2{-# LANGUAGE FlexibleContexts #-}
3import Streamly
4import Streamly
@@ -81,37 +82,65 @@ main = hspec $ do
81 -- will be effectively shorter. This becomes significant when the rates are
82 -- will be effectively shorter. This becomes significant when the rates are
82 -- lower (1 or lower). For rate 1 we lose 1 second in the end and for rate
83 -- lower (1 or lower). For rate 1 we lose 1 second in the end and for rate
83 -- 10 0.1 second.
84 -- 10 0.1 second.
84− let rates = [1, 10, 100, 1000, 10000, 100000, 1000000]
85+ let rates = [1, 10, 100, 1000, 10000
85 in describe "asyncly no consumer delay no producer delay" $
90 in describe "asyncly no consumer delay no producer delay" $
86 forM_ rates (\r -> measureRate "asyncly" asyncly r 0 0 range)
91 forM_ rates (\r -> measureRate "asyncly" asyncly r 0 0 range)
88 -- XXX try staggering the dispatches to achieve higher rates
93 -- 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
90 in describe "asyncly no consumer delay and 1 sec producer delay" $
99 in describe "asyncly no consumer delay and 1 sec producer delay" $
91 forM_ rates (\r -> measureRate "asyncly" asyncly r 0 1 range)
100 forM_ rates (\r -> measureRate "asyncly" asyncly r 0 1 range)
93 -- At lower rates (1/10) this is likely to vary quite a bit depending on
102 -- At lower rates (1/10) this is likely to vary quite a bit depending on
94 -- the spread of random producer latencies generated.
103 -- the spread of random producer latencies generated.
95− let rates = [1, 10, 100, 1000, 10000, 25000]
104+ let rates = [1, 10, 100, 1000
96 in describe "asyncly no consumer delay and variable producer delay" $
109 in describe "asyncly no consumer delay and variable producer delay" $
97 forM_ rates $ \r ->
110 forM_ rates $ \r ->
98 measureRate' "asyncly" asyncly r 0 (0.1, 3) range
111 measureRate' "asyncly" asyncly r 0 (0.1, 3) range
100− let rates = [1, 10, 100, 1000, 10000, 100000, 1000000]
113+ let rates = [1, 10, 100, 1000, 10000
101 in describe "wAsyncly no consumer delay no producer delay" $
118 in describe "wAsyncly no consumer delay no producer delay" $
102 forM_ rates (\r -> measureRate "wAsyncly" wAsyncly r 0 0 range)
119 forM_ rates (\r -> measureRate "wAsyncly" wAsyncly r 0 0 range)
104− let rates = [1, 10, 100, 1000, 10000, 25000]
121+ let rates = [1, 10, 100, 1000
105 in describe "wAsyncly no consumer delay and 1 sec producer delay" $
126 in describe "wAsyncly no consumer delay and 1 sec producer delay" $
106 forM_ rates (\r -> measureRate "wAsyncly" wAsyncly r 0 1 range)
127 forM_ rates (\r -> measureRate "wAsyncly" wAsyncly r 0 1 range)
108− let rates = [1, 10, 100, 1000, 10000, 100000, 1000000]
129+ let rates = [1, 10, 100, 1000, 10000
109 in describe "aheadly no consumer delay no producer delay" $
134 in describe "aheadly no consumer delay no producer delay" $
110 forM_ rates (\r -> measureRate "aheadly" aheadly r 0 0 range)
135 forM_ rates (\r -> measureRate "aheadly" aheadly r 0 0 range)
112 -- XXX after the change to stop workers when the heap is clearing
137 -- XXX after the change to stop workers when the heap is clearing
113 -- thi does not work well at a 25000 ops per second, need to fix.
138 -- 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
115 in describe "aheadly no consumer delay and 1 sec producer delay" $
144 in describe "aheadly no consumer delay and 1 sec producer delay" $
116 forM_ rates (\r -> measureRate "aheadly" aheadly r 0 1 range)
145 forM_ rates (\r -> measureRate "aheadly" aheadly r 0 1 range)