This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Read the binary file, lua takes binary files with no difference to strings(all UNIX;https://www.lua.org/pil/21.2.2.html). But, use 'b' tag | |
local inp = assert(io.open("xxxx.xml.gz", "rb")) | |
local data = inp:read("*all") | |
--HTTP custom settings | |
--Remember to set the schema, host and port here otherwise it will use default. | |
wrk.scheme = "http" | |
wrk.host = "localhost" | |
wrk.port = 3000 |