diff mbox series

[RFC,1/2] p7810: add more grep performance relevant cases

Message ID 20190804211509.39229-2-carenas@gmail.com (mailing list archive)
State New, archived
Headers show
Series grep: make threading smarter | expand

Commit Message

Carlo Marcelo Arenas Belón Aug. 4, 2019, 9:15 p.m. UTC
Add a baseline for a matching regex and make clear the distinction
between fixed (now using kwset) and a real simple expression.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 t/perf/p7810-grep.sh | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/t/perf/p7810-grep.sh b/t/perf/p7810-grep.sh
index 9f4ade639f..9a4e335659 100755
--- a/t/perf/p7810-grep.sh
+++ b/t/perf/p7810-grep.sh
@@ -7,13 +7,34 @@  test_description="git-grep performance in various modes"
 test_perf_large_repo
 test_checkout_worktree
 
-test_perf 'grep worktree, cheap regex' '
+test_perf 'grep worktree, fixed regex (no match)' '
 	git grep some_nonexistent_string || :
 '
+test_perf 'grep worktree, fixed regex (common)' '
+	git grep void || :
+'
+test_perf 'grep -I, fixed non binary regex (common)' '
+	git grep -i void || :
+'
+test_perf 'grep -i, fixed caseless regex (common)' '
+	git grep -i void || :
+'
+test_perf 'grep --no-index, fixed regex (common)' '
+	git grep --no-index void || :
+'
+test_perf 'grep worktree, simple regex (common)' '
+	git grep "void|int" || :
+'
+test_perf 'grep -I, simple non binary regex (common)' '
+	git grep -I "void|int" || :
+'
+test_perf 'grep -i, simple caseless regex (common)' '
+	git grep -i "void|int" || :
+'
 test_perf 'grep worktree, expensive regex' '
 	git grep "^.* *some_nonexistent_string$" || :
 '
-test_perf 'grep --cached, cheap regex' '
+test_perf 'grep --cached, fixed regex' '
 	git grep --cached some_nonexistent_string || :
 '
 test_perf 'grep --cached, expensive regex' '