我试图加载testingnodejs helloworld,这是运行在系统1在http://10.20.10.10:5000 ,我想要从系统2pipe道http请求。Wrk需要一个脚本作为参数。 我想知道什么应该在脚本pipeline.lua? 只是url?
示例pipeline.lua脚本。
init = function(args) local r = {} r[1] = wrk.format(nil, "/?foo") r[2] = wrk.format(nil, "/?bar") r[3] = wrk.format(nil, "/?baz") req = table.concat(r) end request = function() return req end
只需更改url。 你的stream水线脚本应该看起来像 –
init = function(args) local r = {} r[1] = wrk.format(nil, "url to test") r[2] = wrk.format(nil, "url to test") r[3] = wrk.format(nil, "url to test") req = table.concat(r) end request = function() return req end
这将发送三个stream水线请求。