-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathreport.lua
More file actions
14 lines (14 loc) · 832 Bytes
/
report.lua
File metadata and controls
14 lines (14 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
done = function(summary, latency, requests)
filename = "stats.csv"
statsfile = assert(io.open(filename, "a"))
statsfile.write(statsfile, string.format("%.2f,", latency.min));
statsfile.write(statsfile, string.format("%.2f,", latency.max));
statsfile.write(statsfile, string.format("%.2f,", latency.mean));
statsfile.write(statsfile, string.format("%.2f,", latency.stdev));
statsfile.write(statsfile, string.format("%d,", summary.duration));
statsfile.write(statsfile, string.format("%d,", summary.requests));
statsfile.write(statsfile, string.format("%d,", summary.bytes));
statsfile.write(statsfile, string.format("%.2f,", summary.requests / summary.duration * 1e6));
statsfile.write(statsfile, string.format("%.2f\n", summary.bytes / summary.duration * 1e6));
statsfile.close()
end