Last active
April 14, 2019 03:48
-
-
Save dhruvasagar/d674f35dd4802a98f896267ccd90ac60 to your computer and use it in GitHub Desktop.
Simple trick to profile ZSH
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
if [[ "$ZPROF" = true ]]; then | |
zmodload zsh/zprof | |
fi | |
# ... your ZSHRC with all your scripts | |
if [[ "$ZPROF" = true ]]; then | |
zprof | |
fi |
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
profzsh() { | |
shell=${1-$SHELL} | |
ZPROF=true $shell -i -c exit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment