1
0
mirror of https://github.com/wg/wrk synced 2025-01-10 00:32:56 +08:00
wrk/scripts/report.lua

11 lines
347 B
Lua
Raw Normal View History

2013-12-07 13:09:44 +08:00
-- example reporting script which demonstrates a custom
-- done() function that prints latency percentiles as CSV
done = function(summary, latency, requests)
io.write("------------------------------\n")
for _, p in pairs({ 50, 90, 99, 99.999 }) do
n = latency:percentile(p)
io.write(string.format("%g%%,%d\n", p, n))
end
end