functions.zsh: add timeplugins func

This commit is contained in:
surtur 2023-08-18 16:25:33 +02:00
parent 86448eacc3
commit 0206842488
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -37,6 +37,18 @@ timesh() {
for i in $(seq 1 10); do time $shell -i -c exit; done for i in $(seq 1 10); do time $shell -i -c exit; done
} }
timeplugins() {
for plugin ($plugins); do
timer=$(($(date +%s%N)/1000000))
if [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
source $ZSH/plugins/$plugin/$plugin.plugin.zsh
fi
now=$(($(date +%s%N)/1000000))
elapsed=$(($now-$timer))
echo $elapsed":" $plugin;
done
}
delete-branches() { delete-branches() {
git branch | git branch |