Skip to content

Instantly share code, notes, and snippets.

@digitalex
Created March 19, 2012 09:38
Show Gist options
  • Save digitalex/2105385 to your computer and use it in GitHub Desktop.
Save digitalex/2105385 to your computer and use it in GitHub Desktop.
Rails timings
grep -oP "Completed 200 OK in (\d+)ms" log/production.log | grep -oP "\d+"
# or, any request that spends at least 1ms on MassiveRecord:
cat log/production.log | grep -P "Completed 200 OK in (\d+)ms \(Views: \d+.\d+ms \| MassiveRecord: [1-9][0-9]?.\d+ms\)" | grep -oP "in \d+ms" | grep -oP "\d+" > ~/timings1.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment