Skip to content

Instantly share code, notes, and snippets.

@itiut
Created November 24, 2016 03:28
Show Gist options
  • Save itiut/d9c66526c8723cb98fe726977ef75ae6 to your computer and use it in GitHub Desktop.
Save itiut/d9c66526c8723cb98fe726977ef75ae6 to your computer and use it in GitHub Desktop.
Profile zsh startup scripts on microsecond scale
# Beginning of ~/.zshenv
PS4=$'%D{%s%6.}\011%N:%i> '
exec 3>&2 2> ~/tmp/zsh/zshstartup.$$.log
setopt xtrace
# ...
# ...
# End of ~/.zshrc
unsetopt xtrace
exec 2>&3 3>&-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment