Lua 5.1 installed already
# yum install lua-devel
# wget http://luarocks.org/releases/luarocks-2.3.3.tar.gz
# tar -xzvf luarocks-2.2.1.tar.gz
# cd luarocks-2.2.1
# ./configure
# make bootstrap
Add luarocks to your .bash_profile
eval $(luarocks path --bin)
Installing redis -lua $ luarocks install redis-lua --local
$ yum install openssl-devel
$ wget https://github.com/giltene/wrk2/archive/master.zip
$ unzip master.zip
$ cd wrk2-master/
$ make
[user@server wrk2-master]$ ./wrk
Usage: wrk <options> <url>
Options:
-c, --connections <N> Connections to keep open
-d, --duration <T> Duration of test
-t, --threads <N> Number of threads to use
-s, --script <S> Load Lua script file
-H, --header <H> Add header to request
-L --latency Print latency statistics
-U --u_latency Print uncorrected latency statistics
--timeout <T> Socket/request timeout
-B, --batch_latency Measure latency of whole
batches of pipelined ops
(as opposed to each op)
-v, --version Print version details
-R, --rate <T> work rate (throughput)
in requests/sec (total)
[Required Parameter]
Numeric arguments may include a SI unit (1k, 1M, 1G)
Time arguments may include a time unit (2s, 2m, 2h)