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 ebe9eac..9348f71 100644 --- a/tests/linda_perf.lua +++ b/tests/linda_perf.lua | |||
@@ -34,7 +34,7 @@ local function ziva( preloop, loop, batch) | |||
34 | -- prefill the linda a bit to increase fifo stress | 34 | -- prefill the linda a bit to increase fifo stress |
35 | local top = math.max( preloop, loop) | 35 | local top = math.max( preloop, loop) |
36 | local l, lane = lanes.linda() | 36 | local l, lane = lanes.linda() |
37 | local t1 = os.time() | 37 | local t1 = lanes.now_secs() |
38 | for i = 1, preloop do | 38 | for i = 1, preloop do |
39 | l:send( "key", i) | 39 | l:send( "key", i) |
40 | end | 40 | end |
@@ -59,7 +59,7 @@ local function ziva( preloop, loop, batch) | |||
59 | end | 59 | end |
60 | l:send( "done" ,"are you happy?") | 60 | l:send( "done" ,"are you happy?") |
61 | lane:join() | 61 | lane:join() |
62 | return os.difftime(os.time(), t1) | 62 | return lanes.now_secs() - t1 |
63 | end | 63 | end |
64 | 64 | ||
65 | local tests = | 65 | local tests = |
@@ -149,7 +149,7 @@ local function ziva2( preloop, loop, batch) | |||
149 | l:receive( "key") | 149 | l:receive( "key") |
150 | end | 150 | end |
151 | end | 151 | end |
152 | local t1 = os.time() | 152 | local t1 = lanes.now_secs() |
153 | -- first, prime the linda with some data | 153 | -- first, prime the linda with some data |
154 | for i = 1, preloop, step do | 154 | for i = 1, preloop, step do |
155 | batch_send() | 155 | batch_send() |
@@ -165,7 +165,7 @@ local function ziva2( preloop, loop, batch) | |||
165 | for i = 1, preloop, step do | 165 | for i = 1, preloop, step do |
166 | batch_read() | 166 | batch_read() |
167 | end | 167 | end |
168 | return os.difftime(os.time(), t1) | 168 | return lanes.now_secs() - t1 |
169 | end | 169 | end |
170 | 170 | ||
171 | local tests2 = | 171 | local tests2 = |