"Fossies" - the Fresh Open Source Software Archive

Member "wrk-4.2.0/scripts/report.lua" (7 Feb 2021, 347 Bytes) of package /linux/www/wrk-4.2.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lua source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 -- example reporting script which demonstrates a custom
    2 -- done() function that prints latency percentiles as CSV
    3 
    4 done = function(summary, latency, requests)
    5    io.write("------------------------------\n")
    6    for _, p in pairs({ 50, 90, 99, 99.999 }) do
    7       n = latency:percentile(p)
    8       io.write(string.format("%g%%,%d\n", p, n))
    9    end
   10 end