@@ -23,20 +23,46 @@ Usage of kube-tmux:
2323 Separator of Context and Nasespace (default "/")
2424```
2525
26+ I’m using the follows:
27+
2628``` console
2729set -g status-right "#(kube-tmux -separator=':' -ctxFg='colour011#,bright' -ctxBg 'default' -sepFg 'colour015#,bright' -nsFg 'colour075#,bright')"
2830```
2931
3032## Benchmark
3133
34+ ### Benchmark command:
35+
36+ ``` console
37+ $ kube.tmux
38+ #[fg=blue]⎈ #[fg=colour]#[fg=]gke_asia-northeast1_cluster#[fg=colour250]:#[fg=]kube-system
39+
40+ $ kube-tmux -separator=' :' -ctxFg=' blue' -sepFg ' colour250' -nsFg ' default'
41+ #[fg=blue]gke_asia-northeast1_cluster#[fg=colour250]:#[fg=default]kube-system#[fg=default#,bg=default]
42+ ```
43+
44+ ### Note
45+
46+ - ` go version `
47+ - ` go version devel go1.17-543e098320 Wed May 5 19:17:46 2021 +0000 X:staticlockranking darwin/amd64 `
48+ - tmux ` default-shell ` is ` /bin/sh ` .
49+ - On darwin, ` "echo 3 > /proc/sys/vm/drop_caches" ` similar command is ` "sync && sudo purge" `
50+
51+ ### Result
52+
3253``` console
33- $ hyperfine -S /usr/local/ bin/bash --max-runs 10 --warmup 3 ' kube.tmux'
54+ $ hyperfine --shell / bin/sh --prepare ' sync && sudo purge ' --max-runs 10 --warmup 3 ' kube.tmux'
3455Benchmark #1: kube.tmux
35- Time (mean ± σ): 109.0 ms ± 2.7 ms [User: 102.7 ms, System: 37.0 ms]
36- Range (min … max): 106.8 ms … 116.3 ms 10 runs
56+ Time (mean ± σ): 275.2 ms ± 54.0 ms [User: 111.2 ms, System: 74.3 ms]
57+ Range (min … max): 224.3 ms … 368.1 ms 10 runs
3758
38- $ hyperfine -S /usr/local/ bin/bash --max-runs 10 --warmup 3 " kube-tmux -separator=':' -ctxFg='colour011#,bright ' -ctxBg 'default' - sepFg 'colour015#,bright ' -nsFg 'colour075#,bright '"
39- Benchmark #1: kube-tmux -separator=':' -ctxFg='colour011#,bright ' -ctxBg 'default' - sepFg 'colour015#,bright ' -nsFg 'colour075#,bright '
40- Time (mean ± σ): 10.8 ms ± 0 .6 ms [User: 6.7 ms, System: 2.7 ms]
41- Range (min … max): 10.3 ms … 12.1 ms 10 runs
59+ $ hyperfine --shell / bin/sh --prepare ' sync && sudo purge ' -- max-runs 10 --warmup 3 " kube-tmux -separator=':' -ctxFg='blue ' -sepFg 'colour250 ' -nsFg 'default '"
60+ Benchmark #1: kube-tmux -separator=':' -ctxFg='blue ' -sepFg 'colour250 ' -nsFg 'default '
61+ Time (mean ± σ): 102.2 ms ± 64 .6 ms [User: 8.0 ms, System: 35.6 ms]
62+ Range (min … max): 12.5 ms … 178.0 ms 10 runs
4263```
64+
65+ | Command | Mean [ ms] | Min [ ms] | Max [ ms] | Relative |
66+ | :----------------------------------------------------------------------------| -------------:| ---------:| ---------:| ---------:|
67+ | ` kube.tmux ` | 290.2 ± 62.9 | 223.6 | 382.2 | 1.00 |
68+ | ` kube-tmux -separator=':' -ctxFg='blue' -sepFg 'colour250' -nsFg 'default' ` | 84.2 ± 59.6 | 15.9 | 156.5 | 1.00 |
0 commit comments