diff options
Diffstat (limited to 'tests/linda_perf.lua')
-rw-r--r-- | tests/linda_perf.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/linda_perf.lua b/tests/linda_perf.lua index bba1408..107fd25 100644 --- a/tests/linda_perf.lua +++ b/tests/linda_perf.lua | |||
@@ -68,7 +68,7 @@ local gobbler = function( l, loop, batch) | |||
68 | l:receive( "go") | 68 | l:receive( "go") |
69 | -- eat data in batches | 69 | -- eat data in batches |
70 | for i = 1, loop/batch do | 70 | for i = 1, loop/batch do |
71 | l:receive( l.batched, "key", batch) | 71 | l:receive_batched("key", batch) |
72 | -- print("gobbler:", batch) | 72 | -- print("gobbler:", batch) |
73 | end | 73 | end |
74 | print "loop is over" | 74 | print "loop is over" |
@@ -168,9 +168,9 @@ local function ziva2( preloop, loop, batch) | |||
168 | local l = lanes.linda("ziva2("..preloop..":"..loop..":"..tostring(batch)..")", group_uid) | 168 | local l = lanes.linda("ziva2("..preloop..":"..loop..":"..tostring(batch)..")", group_uid) |
169 | group_uid = (group_uid % config.nb_user_keepers) + 1 | 169 | group_uid = (group_uid % config.nb_user_keepers) + 1 |
170 | -- prefill the linda a bit to increase fifo stress | 170 | -- prefill the linda a bit to increase fifo stress |
171 | local top, step = math.max( preloop, loop), (l.batched and batch) and batch or 1 | 171 | local top, step = math.max( preloop, loop), batch or 1 |
172 | local batch_send, batch_read | 172 | local batch_send, batch_read |
173 | if l.batched and batch then | 173 | if batch then |
174 | local batch_values = {} | 174 | local batch_values = {} |
175 | for i = 1, batch do | 175 | for i = 1, batch do |
176 | table.insert( batch_values, i) | 176 | table.insert( batch_values, i) |
@@ -180,7 +180,7 @@ local function ziva2( preloop, loop, batch) | |||
180 | l:send( "key", table_unpack( batch_values)) | 180 | l:send( "key", table_unpack( batch_values)) |
181 | end | 181 | end |
182 | batch_read = function() | 182 | batch_read = function() |
183 | l:receive( l.batched, "key", batch) | 183 | l:receive_batched("key", batch) |
184 | end | 184 | end |
185 | else -- not batched | 185 | else -- not batched |
186 | batch_send = function() | 186 | batch_send = function() |