-
-
Save lazybios/e58a0e208b804e6c368a to your computer and use it in GitHub Desktop.
Calculate average of response time in Rails 3 server.
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
cat log/production.log| grep "^Completed .* in [0-9]*ms .*" | sed "s/.* in \([0-9]*\)ms.*/\1/" | awk '{ s += $1 } END { print "sum: ", s, " average: ", s/NR, " samples: ", NR }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment