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

Method AddSamplingCounter

be/src/util/runtime-profile-periodic.cc:93–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93RuntimeProfileBase::Counter* RuntimeProfile::AddSamplingCounter(
94 const string& name, Counter* src_counter) {
95 DCHECK(src_counter->unit() == TUnit::UNIT);
96 lock_guard<SpinLock> l(counter_map_lock_);
97 bool created;
98 Counter* dst_counter =
99 AddCounterLocked(name, TUnit::DOUBLE_VALUE, ROOT_COUNTER, &created);
100 if (!created) return dst_counter;
101 sampling_counters_.push_back(dst_counter);
102 PeriodicCounterUpdater::RegisterPeriodicCounter(src_counter, NULL, dst_counter,
103 PeriodicCounterUpdater::SAMPLING_COUNTER);
104 has_active_periodic_counters_ = true;
105 return dst_counter;
106}
107
108RuntimeProfileBase::Counter* RuntimeProfile::AddSamplingCounter(
109 const string& name, SampleFunction sample_fn) {

Callers 2

PrepareMethod · 0.80
InstantiateMethod · 0.80

Calls 3

moveFunction · 0.85
push_backMethod · 0.80
unitMethod · 0.45

Tested by

no test coverage detected