Skip to content

Commit

Permalink
Zplugin → Zinit rename
Browse files Browse the repository at this point in the history
  • Loading branch information
psprint committed Jan 26, 2020
1 parent 98f2548 commit ebfffec
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 110 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ arzzen/git-quick-stats.git

Some of the plugins are rather regular `Makefile`-based projects, like
`arzzen/git-quick-stats.git`. The `atclone''`, `make''`, ice modifiers of
Zplugin and `hook-build` tag of Zplug allow to install and use them. However
Zinit and `hook-build` tag of Zplug allow to install and use them. However
they're problematic with `zgen`, which doesn't have such hooks. For it, instead
an empty plugin [zdharma/null](https://github.com/zdharma/null) is being loaded
in a following way:
Expand Down Expand Up @@ -101,11 +101,11 @@ simplifying the test because of limited `zgen` functionality. Also, `zgen`
doesn't run the compilation (i.e. `make`) during the installation of the
plugins.

Zplug and Zplugin tests are rather identical
Zplug and Zinit tests are rather identical
([zshrc](https://github.com/zdharma/pm-perf-test/blob/master/zplug/.zshrc) for
Zplug,
[zshrc](https://github.com/zdharma/pm-perf-test/blob/master/zplugin-load/.zshrc)
for Zplugin).
[zshrc](https://github.com/zdharma/pm-perf-test/blob/master/zinit-load/.zshrc)
for Zinit).

## Results

Expand All @@ -115,16 +115,16 @@ for Zplugin).

## Result comments

The three different Zplugin results needs explaining:
The three different Zinit results needs explaining:

1. Zplugin light – plugins are being loaded without tracking, i.e.: cannot be
1. Zinit light – plugins are being loaded without tracking, i.e.: cannot be
unloaded and their reports are being empty.

2. Zplugin load – plugins are being loaded with tracking, i.e.: are available for
unload and their report data is gathered (available through `zplugin report
2. Zinit load – plugins are being loaded with tracking, i.e.: are available for
unload and their report data is gathered (available through `zinit report
{plugin-name}` command).

3. Zplugin (Turbo) load – plugins are being loaded with tracking **and in Turbo
3. Zinit (Turbo) load – plugins are being loaded with tracking **and in Turbo
mode** – i.e.: in background & after prompt – the shell is instantly ready to
use.

Expand Down
46 changes: 33 additions & 13 deletions plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@ def autolabel(rects):
titles = {
"results/zplug-inst.txt" : "zplug",
"results/zgen-inst.txt" : "zgen",
"results/zplugin-light-inst.txt" : "zplugin light",
"results/zplugin-load-inst.txt" : "zplugin load",
"results/zplugin-turbo-inst.txt" : "zplugin (Turbo) load",
"results/zinit-light-inst.txt" : "zinit light",
"results/zinit-load-inst.txt" : "zinit load",
"results/zinit-turbo-inst.txt" : "zinit (Turbo) load",

"results/zplug.txt" : "zplug",
"results/zgen.txt" : "zgen",
"results/zplugin-light.txt" : "zplugin light",
"results/zplugin-load.txt" : "zplugin load",
"results/zplugin-turbo.txt" : "zplugin (Turbo) load",
"results/zinit-light.txt" : "zinit light",
"results/zinit-load.txt" : "zinit load",
"results/zinit-turbo.txt" : "zinit (Turbo) load",
}

files_inst = [
"results/zplug-inst.txt",
"results/zgen-inst.txt",
"results/zplugin-light-inst.txt",
"results/zplugin-load-inst.txt",
"results/zplugin-turbo-inst.txt",
"results/zinit-light-inst.txt",
"results/zinit-load-inst.txt",
"results/zinit-turbo-inst.txt",
]

files_startup = [
"results/zplug.txt",
"results/zgen.txt",
"results/zplugin-light.txt",
"results/zplugin-load.txt",
"results/zplugin-turbo.txt",
"results/zinit-light.txt",
"results/zinit-load.txt",
"results/zinit-turbo.txt",
]

#
Expand All @@ -56,7 +56,7 @@ def autolabel(rects):

idata=[]
for line in lines:
if fname == "results/zplug-inst.txt" or fname == "results/zplugin-turbo-inst.txt":
if fname == "results/zplug-inst.txt" or fname == "results/zinit-turbo-inst.txt":
odd = 1 - odd
if not odd:
fields = line.split()
Expand Down Expand Up @@ -137,3 +137,23 @@ def autolabel(rects):
fig.savefig('plots/startup-times.png', transparent=False, dpi=140, bbox_inches="tight")

plt.show()

group_data = [ 195 + 159, 288 + 244, 387 + 351, 492 + 498 ]
group_names = [ "2017", "2018", "2019", "2020" ]

fig, ax = plt.subplots(figsize=(8.2, 5))
rects = ax.bar(group_names, group_data)
#ax.plot(group_names, group_data)

autolabel(rects)

#fig.tight_layout()

ax.title.set(y=1.05)

plt.title("Plugins + themes, in a year")

fig.savefig('plots/fsck.png', transparent=False, dpi=100, bbox_inches="tight")

plt.show()

3 changes: 0 additions & 3 deletions results/zgen-inst.txt

This file was deleted.

10 changes: 0 additions & 10 deletions results/zgen.txt

This file was deleted.

6 changes: 0 additions & 6 deletions results/zplug-inst.txt

This file was deleted.

20 changes: 0 additions & 20 deletions results/zplug.txt

This file was deleted.

3 changes: 0 additions & 3 deletions results/zplugin-light-inst.txt

This file was deleted.

10 changes: 0 additions & 10 deletions results/zplugin-light.txt

This file was deleted.

3 changes: 0 additions & 3 deletions results/zplugin-load-inst.txt

This file was deleted.

10 changes: 0 additions & 10 deletions results/zplugin-load.txt

This file was deleted.

6 changes: 0 additions & 6 deletions results/zplugin-turbo-inst.txt

This file was deleted.

10 changes: 0 additions & 10 deletions results/zplugin-turbo.txt

This file was deleted.

14 changes: 7 additions & 7 deletions run.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ mkdir -p results

print -P "%F{160}Removing plugins and results from previous test run…%f"

rm -rf **/(_zplug|_zgen|_zplugin)(DN) results/*.txt(DN)
rm -rf **/(_zplug|_zgen|_zinit)(DN) results/*.txt(DN)

print -P "%F{160}done%f"

print -P "\n%F{160}============================%f"
print -P "%F{160}Measuring installation time…%f"
print -P "%F{160}============================%f"

for i in zplug zgen zplugin*~*omz; do
for i in zplug zgen zinit*~*omz; do
print -P "\n%F{154}=== 3 results for %F{140}$i%F{154}: ===%f"

cd -q $i
Expand All @@ -35,16 +35,16 @@ for i in zplug zgen zplugin*~*omz; do

(( verbose )) && {
ZDOTDIR=$PWD zsh -i -c -- $cmd 2>&1 > >(grep '\[zshrc\]' >> ../results/$i-inst.txt) > >(cat)
rm -rf _(zplug|zgen|zplugin)
rm -rf _(zplug|zgen|zinit)
ZDOTDIR=$PWD zsh -i -c -- $cmd 2>&1 > >(grep '\[zshrc\]' >> ../results/$i-inst.txt) > >(cat)
rm -rf _(zplug|zgen|zplugin)
rm -rf _(zplug|zgen|zinit)
ZDOTDIR=$PWD zsh -i -c -- $cmd 2>&1 > >(grep '\[zshrc\]' >> ../results/$i-inst.txt) > >(cat)
((1))
} || {
ZDOTDIR=$PWD zsh -i -c -- $cmd |& grep '\[zshrc\]' | tee -a ../results/$i-inst.txt
rm -rf _(zplug|zgen|zplugin)
rm -rf _(zplug|zgen|zinit)
ZDOTDIR=$PWD zsh -i -c -- $cmd |& grep '\[zshrc\]' | tee -a ../results/$i-inst.txt
rm -rf _(zplug|zgen|zplugin)
rm -rf _(zplug|zgen|zinit)
ZDOTDIR=$PWD zsh -i -c -- $cmd |& grep '\[zshrc\]' | tee -a ../results/$i-inst.txt
}

Expand All @@ -55,7 +55,7 @@ print -P "\n%F{160}============================%f"
print -P "%F{160}Measuring startup-time time…%f"
print -P "%F{160}============================%f"

for i in zplug zgen zplugin*~(*omz|*txt); do
for i in zplug zgen zinit*~(*omz|*txt); do
print -P "\n%F{154}=== 10 results for %F{140}$i%F{154}: ===%f"

cd -q $i
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ebfffec

Please sign in to comment.