Created
July 1, 2016 18:27
-
-
Save dlai0001/3a2ccbbb8ebd7b916630acb7907c734a to your computer and use it in GitHub Desktop.
Monitor peak requests per second and average rps in locust.io
This file contains hidden or 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
ax_peak = 0; | |
ax_avg = 0; | |
ax_count = 0; | |
setInterval(function() { | |
rps = parseFloat($("#total_rps").text()) | |
ax_avg = (ax_avg * ax_count + rps) / (++ax_count); | |
if(rps > ax_peak) { | |
ax_peak = rps; | |
console.log("peak requests:" + ax_peak); | |
} | |
}, 50); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment