Remove 'disable_ffi' support.

pull/10/head
Robert G. Jakabosky 15 years ago
parent f13a4ef914
commit 503f7c3177

@ -90,6 +90,7 @@ Running benchmarks
When running the benchmarks you will need run two different scripts (one 'local' and one 'remote'). Both scripts can be run on the same computer or on different computers. Make sure to start the 'local' script first.
Throughput benchmark:
# first start local script
$ luajit-2 perf/local_thr.lua "tcp://lo:5555" 30 1000000
@ -97,11 +98,11 @@ Throughput benchmark:
$ luajit-2 perf/remote_thr.lua "tcp://localhost:5555" 30 1000000
Latency benchmark:
# first start local script
$ luajit-2 perf/local_lat.lua "tcp://lo:5555" 1 100000
# then in another window start remote script
$ luajit-2 perf/remote_lat.lua "tcp://localhost:5555" 1 100000
You can disable the FFI support when running under LuaJIT2 by passing a forth parameter `disable_ffi`

@ -19,20 +19,15 @@
-- THE SOFTWARE.
if not arg[3] then
print("usage: lua local_lat.lua <bind-to> <message-size> <roundtrip-count> [<zmq-module>]")
print("usage: lua local_lat.lua <bind-to> <message-size> <roundtrip-count>")
os.exit()
end
local bind_to = arg[1]
local message_size = tonumber(arg[2])
local roundtrip_count = tonumber(arg[3])
local mod = arg[4] or "zmq"
if mod == 'disable_ffi' then
disable_ffi = true
mod = 'zmq'
end
local zmq = require(mod)
local zmq = require'zmq'
local ctx = zmq.init(1)
local s = ctx:socket(zmq.REP)

@ -19,20 +19,15 @@
-- THE SOFTWARE.
if not arg[3] then
print("usage: lua local_thr.lua <bind-to> <message-size> <message-count> [<zmq-module>]")
print("usage: lua local_thr.lua <bind-to> <message-size> <message-count>")
os.exit()
end
local bind_to = arg[1]
local message_size = tonumber(arg[2])
local message_count = tonumber(arg[3])
local mod = arg[4] or "zmq"
if mod == 'disable_ffi' then
disable_ffi = true
mod = 'zmq'
end
local zmq = require(mod)
local zmq = require'zmq'
local socket = require"socket"
local time = socket.gettime

@ -19,20 +19,15 @@
-- THE SOFTWARE.
if not arg[3] then
print("usage: lua remote_lat.lua <connect-to> <message-size> <roundtrip-count> [<zmq-module>]")
print("usage: lua remote_lat.lua <connect-to> <message-size> <roundtrip-count>")
os.exit()
end
local connect_to = arg[1]
local message_size = tonumber(arg[2])
local roundtrip_count = tonumber(arg[3])
local mod = arg[4] or "zmq"
if mod == 'disable_ffi' then
disable_ffi = true
mod = 'zmq'
end
local zmq = require(mod)
local zmq = require'zmq'
local socket = require"socket"
local time = socket.gettime

@ -19,20 +19,15 @@
-- THE SOFTWARE.
if not arg[3] then
print("usage: lua remote_thr.lua <connect-to> <message-size> <message-count> [<zmq-module>]")
print("usage: lua remote_thr.lua <connect-to> <message-size> <message-count>")
os.exit()
end
local connect_to = arg[1]
local message_size = tonumber(arg[2])
local message_count = tonumber(arg[3])
local mod = arg[4] or "zmq"
if mod == 'disable_ffi' then
disable_ffi = true
mod = 'zmq'
end
local zmq = require(mod)
local zmq = require'zmq'
local ctx = zmq.init(1)
local s = ctx:socket(zmq.PUB)

Loading…
Cancel
Save