| 236 | BENCHMARK(BM_EnumResolution256Candidate)->ThreadRange(1, 32); |
| 237 | |
| 238 | void BM_NestedComprehension(benchmark::State& state) { |
| 239 | auto param = static_cast<BenchmarkParam>(state.range(0)); |
| 240 | state.SetLabel(LabelForParam(param)); |
| 241 | |
| 242 | ASSERT_OK_AND_ASSIGN(ParsedExpr expr, parser::Parse(R"( |
| 243 | [4, 5, 6].all(x, [1, 2, 3].all(y, x > y) && [7, 8, 9].all(z, x < z)) |
| 244 | )")); |
| 245 | |
| 246 | google::protobuf::Arena arena; |
| 247 | InterpreterOptions options = OptionsForParam(param, arena); |
| 248 | |
| 249 | auto builder = CreateCelExpressionBuilder(options); |
| 250 | auto reg_status = RegisterBuiltinFunctions(builder->GetRegistry()); |
| 251 | ASSERT_OK(reg_status); |
| 252 | |
| 253 | for (auto _ : state) { |
| 254 | ASSERT_OK_AND_ASSIGN( |
| 255 | auto expression, |
| 256 | builder->CreateExpression(&expr.expr(), &expr.source_info())); |
| 257 | arena.Reset(); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | BENCHMARK(BM_NestedComprehension) |
| 262 | ->Arg(BenchmarkParam::kDefault) |
nothing calls this directly
no test coverage detected