MCPcopy Create free account
hub / github.com/apache/impala / SetUp

Method SetUp

be/src/codegen/llvm-codegen-cache-test.cc:45–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43class 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;

Callers

nothing calls this directly

Calls 7

CreateClass · 0.85
resetMethod · 0.65
InitMethod · 0.45
CreateQueryStateMethod · 0.45
query_stateMethod · 0.45
AddMethod · 0.45
obj_poolMethod · 0.45

Tested by

no test coverage detected