mirror of
https://github.com/git/git.git
synced 2024-11-15 13:43:45 +01:00
24 lines
512 B
Bash
24 lines
512 B
Bash
|
#!/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
|