summaryrefslogtreecommitdiff
path: root/t/perf/p7810-grep.sh
blob: 9f4ade639f74604e05fb42d236caf0ad621c3f7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
 
test_description="git-grep performance in various modes"
 
. ./perf-lib.sh
 
test_perf_large_repo
test_checkout_worktree
 
test_perf 'grep worktree, cheap regex' '
	git grep some_nonexistent_string || :
'
test_perf 'grep worktree, expensive regex' '
	git grep "^.* *some_nonexistent_string$" || :
'
test_perf 'grep --cached, cheap regex' '
	git grep --cached some_nonexistent_string || :
'
test_perf 'grep --cached, expensive regex' '
	git grep --cached "^.* *some_nonexistent_string$" || :
'
 
test_done