Created
August 8, 2012 14:14
-
-
Save jeffreybaird/3295351 to your computer and use it in GitHub Desktop.
Find out which classes are called most often (stolen from gary bearnhart)
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
| grep -rh '^[[:space:]]*\(class\|module\)\b' app lib --include='*.rb' | | |
| sed 's/^[[:space:]]*//' | | |
| cut -d ' ' -f 2 | | |
| while read class; do | |
| echo "`grep -rl "\b$class\b" app lib --include="*.rb" | wc -l` $class"; | |
| done | | |
| sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment