Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <runtime-profile.h>
Public Member Functions | |
AveragedCounter (TUnit::type unit) | |
void | UpdateCounter (Counter *new_counter) |
virtual void | Set (double value) |
virtual void | Set (int64_t value) |
virtual void | Add (int64_t delta) |
void | BitOr (int64_t delta) |
Use this to update if the counter is a bitmap. More... | |
virtual int64_t | value () const |
virtual double | double_value () const |
TUnit::type | unit () const |
Protected Attributes | |
AtomicInt< int64_t > | value_ |
TUnit::type | unit_ |
Private Attributes | |
boost::unordered_map< Counter *, int64_t > | counter_value_map_ |
Map from counters to their existing values. Modified via UpdateCounter(). More... | |
double | current_double_sum_ |
int64_t | current_int_sum_ |
An AveragedCounter maintains a set of counters and its value is the average of the values in that set. The average is updated through calls to UpdateCounter(), which may add a new counter or update an existing counter. Set() and Add() should not be called.
Definition at line 183 of file runtime-profile.h.
|
inline |
Definition at line 185 of file runtime-profile.h.
|
inlinevirtual |
Reimplemented from impala::RuntimeProfile::Counter.
Definition at line 228 of file runtime-profile.h.
|
inlineinherited |
Use this to update if the counter is a bitmap.
Definition at line 98 of file runtime-profile.h.
References impala::RuntimeProfile::Counter::value_.
Referenced by impala::DiskIoMgr::ReadRange().
|
inlinevirtualinherited |
Definition at line 110 of file runtime-profile.h.
References impala::RuntimeProfile::Counter::value_.
Referenced by impala::TEST(), and UpdateCounter().
|
inlinevirtual |
The value for this counter should be updated through UpdateCounter(). Set() and Add() should not be used.
Reimplemented from impala::RuntimeProfile::Counter.
Definition at line 220 of file runtime-profile.h.
|
inlinevirtual |
Reimplemented from impala::RuntimeProfile::Counter.
Definition at line 224 of file runtime-profile.h.
|
inlineinherited |
Definition at line 114 of file runtime-profile.h.
References impala::RuntimeProfile::Counter::unit_.
Referenced by impala::ScopedTimer< impala::MonotonicStopWatch >::ScopedTimer(), impala::TEST(), and impala::RuntimeProfile::UnitsPerSecond().
|
inline |
Update counter_value_map_ with the new counter. This may require the counter to be added to the map. No locks are obtained within this class because UpdateCounter() is called from UpdateAverage(), which obtains locks on the entire counter map in a profile.
Definition at line 195 of file runtime-profile.h.
References counter_value_map_, current_double_sum_, current_int_sum_, impala::RuntimeProfile::Counter::double_value(), impala::RuntimeProfile::Counter::unit_, impala::RuntimeProfile::Counter::value(), and impala::RuntimeProfile::Counter::value_.
Referenced by impala::TEST(), and impala::RuntimeProfile::UpdateAverage().
|
inlinevirtualinherited |
Reimplemented in impala::RuntimeProfile::DerivedCounter.
Definition at line 108 of file runtime-profile.h.
References impala::RuntimeProfile::Counter::value_.
Referenced by impala::HdfsScanNode::Close(), impala::RuntimeProfile::ComputeTimeInProfile(), impala::BufferedBlockMgr::DebugInternal(), impala::HdfsScanNode::EnoughMemoryForScannerThread(), impala::Coordinator::BackendExecState::GetNodeThroughput(), impala::Coordinator::BackendExecState::GetNumScanRangesCompleted(), impala::MemTracker::peak_consumption(), impala::HdfsScanNode::ScannerThread(), impala::RuntimeProfile::Counter::Set(), impala::HdfsScanNode::StopAndFinalizeCounters(), impala::PeriodicCounterUpdater::StopBucketingCounters(), impala::TEST(), impala::TEST_F(), impala::HdfsScanNode::ThreadTokenAvailableCb(), impala::RuntimeProfile::UnitsPerSecond(), UpdateCounter(), and impala::ValidateCounter().
|
private |
Map from counters to their existing values. Modified via UpdateCounter().
Definition at line 234 of file runtime-profile.h.
Referenced by UpdateCounter().
|
private |
Current sums of values from counter_value_map_. Only one of these is used, depending on the unit of the counter. current_double_sum_ is used for DOUBLE_VALUE, current_int_sum_ otherwise.
Definition at line 239 of file runtime-profile.h.
Referenced by UpdateCounter().
|
private |
Definition at line 240 of file runtime-profile.h.
Referenced by UpdateCounter().
|
protectedinherited |
Definition at line 120 of file runtime-profile.h.
Referenced by impala::RuntimeProfile::Counter::unit(), and UpdateCounter().
|
protectedinherited |
Definition at line 119 of file runtime-profile.h.
Referenced by impala::RuntimeProfile::Counter::Add(), impala::RuntimeProfile::HighWaterMarkCounter::Add(), impala::RuntimeProfile::Counter::BitOr(), impala::RuntimeProfile::Counter::double_value(), impala::RuntimeProfile::Counter::Set(), impala::RuntimeProfile::HighWaterMarkCounter::Set(), impala::RuntimeProfile::HighWaterMarkCounter::TryAdd(), UpdateCounter(), and impala::RuntimeProfile::Counter::value().