| 1491 | } |
| 1492 | |
| 1493 | void FullMatchRE2(benchmark::State& state, const char *regexp) { |
| 1494 | std::string s = RandomText(state.range(0)); |
| 1495 | s += "ABCDEFGHIJ"; |
| 1496 | RE2 re(regexp, RE2::Latin1); |
| 1497 | for (auto _ : state) { |
| 1498 | CHECK(RE2::FullMatch(s, re)); |
| 1499 | } |
| 1500 | state.SetBytesProcessed(state.iterations() * state.range(0)); |
| 1501 | } |
| 1502 | |
| 1503 | void FullMatch_DotStar_CachedPCRE(benchmark::State& state) { FullMatchPCRE(state, "(?s).*"); } |
| 1504 | void FullMatch_DotStar_CachedRE2(benchmark::State& state) { FullMatchRE2(state, "(?s).*"); } |
no test coverage detected