Created
December 4, 2017 06:02
-
-
Save chiastolite/2e80b1bac8ca28fced1b1eb713b129ec to your computer and use it in GitHub Desktop.
activerecord-cause tip
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
# ログからクエリ発行が多いとこを特定するために呼出元を回数順に並べるやつ | |
# 途中のsedは色付け用のエスケープシーケンスを消すやつ | |
grep 'ActiveRecord::Cause' log/development.log| sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | sort |uniq -c | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment