| 43 | class LlvmCodeGenCacheTest : public testing::Test { |
| 44 | public: |
| 45 | virtual void SetUp() { |
| 46 | FLAGS_codegen_cache_capacity = "0"; |
| 47 | // Using single shard makes the logic of scenarios simple for capacity and |
| 48 | // eviction-related behavior. |
| 49 | FLAGS_cache_force_single_shard = true; |
| 50 | metrics_.reset(new MetricGroup("codegen-cache-test")); |
| 51 | profile_ = RuntimeProfile::Create(&obj_pool_, "codegen-cache-test"); |
| 52 | test_env_.reset(new TestEnv); |
| 53 | ASSERT_OK(test_env_->Init()); |
| 54 | RuntimeState* runtime_state_; |
| 55 | ASSERT_OK(test_env_->CreateQueryState(0, &query_options_, &runtime_state_)); |
| 56 | QueryState* qs = runtime_state_->query_state(); |
| 57 | TPlanFragment* fragment = qs->obj_pool()->Add(new TPlanFragment()); |
| 58 | PlanFragmentCtxPB* fragment_ctx = qs->obj_pool()->Add(new PlanFragmentCtxPB()); |
| 59 | fragment_state_ = |
| 60 | qs->obj_pool()->Add(new FragmentState(qs, *fragment, *fragment_ctx)); |
| 61 | } |
| 62 | |
| 63 | virtual void TearDown() { |
| 64 | FLAGS_cache_force_single_shard = false; |
nothing calls this directly
no test coverage detected