MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / SearchCachedPCRE

Function SearchCachedPCRE

extern/re2/re2/testing/regexp_benchmark.cc:1032–1042  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030}
1031
1032void SearchCachedPCRE(benchmark::State& state, const char* regexp,
1033 const StringPiece& text, Prog::Anchor anchor,
1034 bool expect_match) {
1035 PCRE& re = *GetCachedPCRE(regexp);
1036 for (auto _ : state) {
1037 if (anchor == Prog::kAnchored)
1038 CHECK_EQ(PCRE::FullMatch(text, re), expect_match);
1039 else
1040 CHECK_EQ(PCRE::PartialMatch(text, re), expect_match);
1041 }
1042}
1043
1044void SearchCachedRE2(benchmark::State& state, const char* regexp,
1045 const StringPiece& text, Prog::Anchor anchor,

Callers

nothing calls this directly

Calls 1

GetCachedPCREFunction · 0.85

Tested by

no test coverage detected