| 265 | ->Arg(BenchmarkParam::kRecursivePlanningWithConstantFolding); |
| 266 | |
| 267 | void BM_Comparisons(benchmark::State& state) { |
| 268 | auto param = static_cast<BenchmarkParam>(state.range(0)); |
| 269 | state.SetLabel(LabelForParam(param)); |
| 270 | |
| 271 | ASSERT_OK_AND_ASSIGN(ParsedExpr expr, parser::Parse(R"( |
| 272 | v11 < v12 && v12 < v13 |
| 273 | && v21 > v22 && v22 > v23 |
| 274 | && v31 == v32 && v32 == v33 |
| 275 | && v11 != v12 && v12 != v13 |
| 276 | )")); |
| 277 | |
| 278 | google::protobuf::Arena arena; |
| 279 | InterpreterOptions options = OptionsForParam(param, arena); |
| 280 | |
| 281 | auto builder = CreateCelExpressionBuilder(options); |
| 282 | auto reg_status = RegisterBuiltinFunctions(builder->GetRegistry()); |
| 283 | ASSERT_OK(reg_status); |
| 284 | |
| 285 | for (auto _ : state) { |
| 286 | ASSERT_OK_AND_ASSIGN( |
| 287 | auto expression, |
| 288 | builder->CreateExpression(&expr.expr(), &expr.source_info())); |
| 289 | arena.Reset(); |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | BENCHMARK(BM_Comparisons) |
| 294 | ->Arg(BenchmarkParam::kDefault) |
nothing calls this directly
no test coverage detected