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

Function SearchCachedDFA

extern/re2/re2/testing/regexp_benchmark.cc:986–997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986void SearchCachedDFA(benchmark::State& state, const char* regexp,
987 const StringPiece& text, Prog::Anchor anchor,
988 bool expect_match) {
989 Prog* prog = GetCachedProg(regexp);
990 for (auto _ : state) {
991 bool failed = false;
992 CHECK_EQ(prog->SearchDFA(text, StringPiece(), anchor, Prog::kFirstMatch,
993 NULL, &failed, NULL),
994 expect_match);
995 CHECK(!failed);
996 }
997}
998
999void SearchCachedNFA(benchmark::State& state, const char* regexp,
1000 const StringPiece& text, Prog::Anchor anchor,

Callers

nothing calls this directly

Calls 3

GetCachedProgFunction · 0.85
StringPieceClass · 0.85
SearchDFAMethod · 0.80

Tested by

no test coverage detected