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

Method SetStats

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

Source from the content-addressed store, hash-verified

2287}
2288
2289void RuntimeProfileBase::SummaryStatsCounter::SetStats(
2290 const TSummaryStatsCounter& counter) {
2291 // We drop this input if it looks malformed.
2292 if (counter.total_num_values < 0) return;
2293 lock_guard<SpinLock> l(lock_);
2294 unit_ = counter.unit;
2295 sum_ = counter.sum;
2296 total_num_values_ = counter.total_num_values;
2297 min_ = counter.min_value;
2298 max_ = counter.max_value;
2299
2300 value_.Store(total_num_values_ == 0 ? 0 : sum_ / total_num_values_);
2301}
2302
2303void RuntimeProfileBase::SummaryStatsCounter::SetStats(const SummaryStatsCounter& other) {
2304 lock_guard<SpinLock> ol(other.lock_);

Callers 3

UpdateMethod · 0.80

Calls 1

StoreMethod · 0.45

Tested by

no test coverage detected