Created
January 19, 2021 19:20
-
-
Save hoang-tranviet/4c607e3eb0569af53afab0160ed01ab7 to your computer and use it in GitHub Desktop.
lua script for wrk tool to get raw latency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- done() function that prints latency percentiles as CSV | |
done = function(summary, latency, requests) | |
epoch = os.time() | |
f = io.open(epoch .. ".csv", "a+") | |
f.write("------------------------------\n") | |
f.write("epoch", os.time()) | |
f.write("number_requests:", summary.requests) | |
-- for i, val in ipairs(latency) do | |
for i = 1, summary.requests do | |
val = latency(i) | |
f.write(string.format("%g\t %d \n", i, val)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment