FIX: Add missing option to apache bench.

This commit is contained in:
Guo Xiang Tan 2017-09-13 16:10:58 +08:00
parent 64c154d9df
commit 4c1fa759e5
1 changed files with 2 additions and 2 deletions

View File

@ -154,9 +154,9 @@ def bench(path, name)
puts "Running apache bench warmup"
add = ""
add = "-c 3 " if @unicorn
`ab #{add} -n 10 "http://127.0.0.1:#{@port}#{path}"`
`ab #{add} -n 20 -l "http://127.0.0.1:#{@port}#{path}"`
puts "Benchmarking #{name} @ #{path}"
`ab -n #{@iterations} -e tmp/ab.csv "http://127.0.0.1:#{@port}#{path}"`
`ab #{add} -n #{@iterations} -l -e tmp/ab.csv "http://127.0.0.1:#{@port}#{path}"`
percentiles = Hash[*[50, 75, 90, 99].zip([]).flatten]
CSV.foreach("tmp/ab.csv") do |percent, time|