Makes text of size nbytes, then calls run to search the text for regexp iters times.
| 176 | // Makes text of size nbytes, then calls run to search |
| 177 | // the text for regexp iters times. |
| 178 | void Search(benchmark::State& state, const char* regexp, SearchImpl* search) { |
| 179 | std::string s = RandomText(state.range(0)); |
| 180 | search(state, regexp, s, Prog::kUnanchored, false); |
| 181 | state.SetBytesProcessed(state.iterations() * state.range(0)); |
| 182 | } |
| 183 | |
| 184 | // These two are easy because they start with an A, |
| 185 | // giving the search loop something to memchr for. |
no test coverage detected