Created
June 11, 2019 09:22
-
-
Save look4regev/089dca96d657181506647f30b1a43d68 to your computer and use it in GitHub Desktop.
Profiler to find the slowest commands happening on shell startup with 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
brew install moreutils | |
cd ~ | |
zsh -xv 2>&1 | ts -i "%.s" > zsh_startup.log | |
sort --field-separator=' ' -r -k1 zsh_startup.log> sorted.log | |
# Start a new shell | |
head sorted.log # Will show slowest operation first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment