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

Method AddDerivedCounter

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

Source from the content-addressed store, hash-verified

1157ADD_COUNTER_IMPL(AddConcurrentTimerCounter, ConcurrentTimerCounter);
1158
1159RuntimeProfile::DerivedCounter* RuntimeProfile::AddDerivedCounter(
1160 const string& name, TUnit::type unit,
1161 const SampleFunction& counter_fn, const string& parent_counter_name) {
1162 lock_guard<SpinLock> l(counter_map_lock_);
1163 if (counter_map_.find(name) != counter_map_.end()) return NULL;
1164 DerivedCounter* counter = pool_->Add(new DerivedCounter(unit, counter_fn));
1165 counter_map_[name] = counter;
1166 set<string>* child_counters =
1167 FindOrInsert(&child_counter_map_, parent_counter_name, set<string>());
1168 child_counters->insert(name);
1169 return counter;
1170}
1171
1172RuntimeProfile::ThreadCounters* RuntimeProfile::AddThreadCounters(
1173 const string& prefix) {

Callers 7

ClientRequestStateMethod · 0.80
PrepareMethod · 0.80
PrepareMethod · 0.80
PrepareMethod · 0.80
PrepareMethod · 0.80
TESTFunction · 0.80
InstantiateMethod · 0.80

Calls 5

FindOrInsertFunction · 0.85
findMethod · 0.45
endMethod · 0.45
AddMethod · 0.45
insertMethod · 0.45

Tested by 1

TESTFunction · 0.64