We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5dda713 commit 1db0b4dCopy full SHA for 1db0b4d
tests/bench
@@ -1,11 +1,12 @@
1
#!/bin/sh
2
-set -e
3
s=startuptime.txt
4
-[ $# = 0 ] && set -- *.* # default to all files with a dot
+this=$(realpath "$0" 2>/dev/null || readlink -f "$0")
+[ $# = 0 ] && cd "${this%/*}" && set -- *.* # default to all files with a dot
5
+target="${this%/tests/*}/after/syntax/css.vim"
6
[ $# -gt 1 ] && multi=1 || multi=
7
for sample in "$@"; do
8
vim --startuptime $s -c qa "$sample"
- run=$(awk '/\/after\/syntax\/css\.vim$/ {sum += $2} END {print sum}' "$s")
9
+ run=$(awk -v t="$target" 'index($0, t) {sum += $2} END {print sum}' "$s")
10
rm $s
11
echo "$run${multi:+\t$sample}"
12
total="${total:-0} + ${run:-0}"
0 commit comments