Skip to content

Commit 993a0a5

Browse files
committed
bench script didn't work with -o, split it up per-file and added a "total"
(which you'll notice is quite a bit higher than -o would have shown)
1 parent b54bcf5 commit 993a0a5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/bench

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/bin/sh
22
set -e
33
s=startuptime.txt
4-
vim --startuptime $s -o -c qa "$@"
5-
awk '/\/after\/syntax\/css\.vim$/ {sum += $2} END {print sum}' $s
6-
rm $s
4+
[ $# = 0 ] && set -- *.* # default to all files with a dot
5+
[ $# -gt 1 ] && multi=1 || multi=
6+
for sample in "$@"; do
7+
vim --startuptime $s -c qa "$sample"
8+
run=$(awk '/\/after\/syntax\/css\.vim$/ {sum += $2} END {print sum}' "$s")
9+
rm $s
10+
echo "$run${multi:+\t$sample}"
11+
total=$(echo "${total:-0} + ${run:-0}" |bc -ql)
12+
done
13+
[ -n "$multi" ] && echo "$total\t(total)"

0 commit comments

Comments
 (0)