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

Method UpdateCounter

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

Source from the content-addressed store, hash-verified

1994}
1995
1996void RuntimeProfileBase::AveragedCounter::UpdateCounter(Counter* new_counter, int idx) {
1997 DCHECK_EQ(new_counter->unit(), unit_);
1998 DCHECK_GE(idx, 0);
1999 DCHECK_LT(idx, num_values_);
2000 if (unit_ == TUnit::DOUBLE_VALUE) {
2001 double new_val = new_counter->double_value();
2002 values_[idx].Store(BitcastToInt64(new_val));
2003 } else {
2004 values_[idx].Store(new_counter->value());
2005 }
2006 // Set has_value_ after the value is valid above so that readers won't
2007 // see invalid values.
2008 has_value_[idx].Store(true);
2009}
2010
2011void RuntimeProfileBase::AveragedCounter::Update(int start_idx,
2012 const vector<bool>& has_value, const vector<int64_t>& values) {

Callers 15

MarkActiveMethod · 0.45
StartNextScanRangeMethod · 0.45
SortInputMethod · 0.45
GetNextMethod · 0.45
OpenMethod · 0.45
ProcessPageIndexMethod · 0.45
OpenMethod · 0.45

Calls 5

BitcastToInt64Function · 0.85
double_valueMethod · 0.80
unitMethod · 0.45
StoreMethod · 0.45
valueMethod · 0.45

Tested by 1

TESTFunction · 0.36