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

Method AddLocalTimeCounter

be/src/util/runtime-profile.cc:1191–1198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1189}
1190
1191void RuntimeProfile::AddLocalTimeCounter(const SampleFunction& counter_fn) {
1192 DerivedCounter* local_time_counter = pool_->Add(
1193 new DerivedCounter(TUnit::TIME_NS, counter_fn));
1194 lock_guard<SpinLock> l(counter_map_lock_);
1195 DCHECK(counter_map_.find(LOCAL_TIME_COUNTER_NAME) == counter_map_.end())
1196 << "LocalTimeCounter already exists in the map.";
1197 counter_map_[LOCAL_TIME_COUNTER_NAME] = local_time_counter;
1198}
1199
1200RuntimeProfileBase::Counter* RuntimeProfileBase::GetCounter(const string& name) const {
1201 lock_guard<SpinLock> l(counter_map_lock_);

Callers 1

OpenImplMethod · 0.80

Calls 3

AddMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected