Skip to content

Commit b72a496

Browse files
committed
README: add usage and benchmark
1 parent dda04ec commit b72a496

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
11
# kube-tmux
22

33
Command kube-tmux prints Kubernetes context and namespace to tmux status line.
4+
5+
## Usage
6+
7+
```console
8+
$ kube-tmux -h
9+
Usage of kube-tmux:
10+
-ctxBg string
11+
Context background colour
12+
-ctxFg string
13+
Context foreground colour
14+
-nsBg string
15+
Nasespace background colour
16+
-nsFg string
17+
Nasespace foreground colour
18+
-sepBg string
19+
Separator background colour
20+
-sepFg string
21+
Separator foreground colour
22+
-separator string
23+
Separator of Context and Nasespace (default "/")
24+
```
25+
26+
```console
27+
set -g status-right "#(kube-tmux -separator=':' -ctxFg='colour011#,bright' -ctxBg 'default' -sepFg 'colour015#,bright' -nsFg 'colour075#,bright')"
28+
```
29+
30+
## Benchmark
31+
32+
```console
33+
$ hyperfine -S /usr/local/bin/bash --max-runs 10 --warmup 3 'kube.tmux'
34+
Benchmark #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
37+
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
42+
```

0 commit comments

Comments
 (0)