Created
March 12, 2012 09:54
-
-
Save vladzloteanu/2020974 to your computer and use it in GitHub Desktop.
Performance profiling
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
# Log all slow Rails queries | |
grep -E -i "Load|Update|SQL|COUNT" answers.log | grep -E '\([2-9][0-9]{3,}\.[0-9]*ms\)' | sed 's/.*(\([0-9]*\)\.[0-9]*ms)/\1/g' > /home/vlad/profiling/slow_answers_queries.sql | |
grep -E -i "Load|Update|SQL|COUNT" auth.log | grep -E '\([1-9][0-9]{3,}\.[0-9]*ms\)' | sed 's/.*(\([0-9]*\)\.[0-9]*ms)/\1/g' > /home/vlad/profiling/slow_auth_queries.sql | |
## Ideas app | |
# test normal download | |
curl "https://domain-test.ideas.dimelo.com" --silent --silent --write-out "size_download=%{size_download}\n" --output /dev/null | |
# test gzip download | |
curl "https://domain-test.ideas.dimelo.com" --silent -H "Accept-Encoding: gzip,deflate" --silent --write-out "size_download=%{size_download}\n" --output /dev/null | |
## Answers app | |
# test normal download | |
curl "http://domain-test.answers.dimelo.com" --silent --silent --write-out "size_download=%{size_download}\n" --output /dev/null | |
# test gzip download | |
curl "http://domain-test.answers.dimelo.com" --silent -H "Accept-Encoding: gzip,deflate" --silent --write-out "size_download=%{size_download}\n" --output /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment