-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeasure_nvim.sh
52 lines (43 loc) · 985 Bytes
/
measure_nvim.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
get_time() {
cat tmp | grep "NVIM STARTED" | tail -1 | cut -d ' ' -f 1
}
pf() {
printf '%s : ' "$@"
}
# FIXME: I could not add >/dev/null at the end of each warmup as Neovim
# segfaults in WSL for some reason when redirecting to stdout lmao
echo "Warmup #1"
nvim -c q 2>&1 | tee -a /dev/null
echo "Warmup #2"
nvim -c q 2>&1 | tee -a /dev/null
echo "Warmup #3"
nvim -c q 2>&1 | tee -a /dev/null
echo "Warmup #4"
nvim -c q 2>&1 | tee -a /dev/null
echo "Warmup #5"
nvim -c q 2>&1 | tee -a /dev/null
pf "No config"
nvim --clean -nu NORC --startuptime tmp
get_time
rm tmp
pf "With config"
nvim --startuptime tmp
get_time
rm tmp
pf "Opening init.lua"
nvim "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.lua" --startuptime tmp
get_time
rm tmp
pf "Opening Python file"
nvim tmp.py --startuptime tmp
get_time
rm tmp
pf "Opening C File"
nvim tmp.c --startuptime tmp
get_time
rm tmp
pf "Opening norg File"
nvim tmp.norg --startuptime tmp
get_time
rm tmp