1212
1313from pathspec import (
1414 PathSpec )
15- from pathspec ._backends .re2 .pathspec import (
16- Re2PsBackend )
1715from pathspec ._backends .simple .pathspec import (
1816 SimplePsBackend )
1917from benchmarks .match_pathspec import (
@@ -88,7 +86,7 @@ def bench_hs_v1(
8886# Re2 backend.
8987
9088@pytest .mark .benchmark (group = GROUP )
91- def bench_re2_filtered (
89+ def bench_re2_v1 (
9290 benchmark : BenchmarkFixture ,
9391 cpython_file_match_middle : str ,
9492 cpython_gi_lines_all : list [str ],
@@ -97,52 +95,6 @@ def bench_re2_filtered(
9795 'gitwildmatch' ,
9896 cpython_gi_lines_all ,
9997 backend = 're2' ,
100- _test_backend_factory = partial (Re2PsBackend , no_reverse = True )
101- )
102- benchmark (run_match , spec , cpython_file_match_middle )
103-
104-
105- @pytest .mark .benchmark (group = GROUP )
106- def bench_re2_filtered_reversed (
107- benchmark : BenchmarkFixture ,
108- cpython_file_match_middle : str ,
109- cpython_gi_lines_all : list [str ],
110- ):
111- spec = PathSpec .from_lines (
112- 'gitwildmatch' ,
113- cpython_gi_lines_all ,
114- backend = 're2' ,
115- _test_backend_factory = Re2PsBackend ,
116- )
117- benchmark (run_match , spec , cpython_file_match_middle )
118-
119-
120- @pytest .mark .benchmark (group = GROUP )
121- def bench_re2_unfiltered (
122- benchmark : BenchmarkFixture ,
123- cpython_file_match_middle : str ,
124- cpython_gi_lines_all : list [str ],
125- ):
126- spec = PathSpec .from_lines (
127- 'gitwildmatch' ,
128- cpython_gi_lines_all ,
129- backend = 're2' ,
130- _test_backend_factory = partial (Re2PsBackend , no_filter = True , no_reverse = True )
131- )
132- benchmark (run_match , spec , cpython_file_match_middle )
133-
134-
135- @pytest .mark .benchmark (group = GROUP )
136- def bench_re2_unfiltered_reversed (
137- benchmark : BenchmarkFixture ,
138- cpython_file_match_middle : str ,
139- cpython_gi_lines_all : list [str ],
140- ):
141- spec = PathSpec .from_lines (
142- 'gitwildmatch' ,
143- cpython_gi_lines_all ,
144- backend = 're2' ,
145- _test_backend_factory = partial (Re2PsBackend , no_filter = True )
14698 )
14799 benchmark (run_match , spec , cpython_file_match_middle )
148100
0 commit comments