Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <runtime-profile.h>
Public Member Functions | |
ThreadCounterMeasurement (RuntimeProfile::ThreadCounters *counters) | |
void | Stop () |
Stop and update the counter. More... | |
~ThreadCounterMeasurement () | |
Update counter when object is destroyed. More... | |
Private Member Functions | |
ThreadCounterMeasurement (const ThreadCounterMeasurement &timer) | |
Disable copy constructor and assignment. More... | |
ThreadCounterMeasurement & | operator= (const ThreadCounterMeasurement &timer) |
Private Attributes | |
bool | stop_ |
rusage | usage_base_ |
MonotonicStopWatch | sw_ |
RuntimeProfile::ThreadCounters * | counters_ |
Utility class to update ThreadCounter when the object goes out of scope or when Stop is called. Threads measurements will then be taken using getrusage. This is ~5x slower than ScopedTimer due to calling getrusage.
Definition at line 747 of file runtime-profile.h.
|
inline |
Definition at line 749 of file runtime-profile.h.
References impala::MonotonicStopWatch::Start(), sw_, and usage_base_.
|
inline |
Update counter when object is destroyed.
Definition at line 780 of file runtime-profile.h.
References Stop().
|
private |
Disable copy constructor and assignment.
|
private |
|
inline |
Stop and update the counter.
Definition at line 758 of file runtime-profile.h.
References impala::RuntimeProfile::Counter::Add(), counters_, impala::MonotonicStopWatch::ElapsedTime(), impala::RuntimeProfile::ThreadCounters::involuntary_context_switches_, impala::MonotonicStopWatch::Stop(), stop_, sw_, impala::RuntimeProfile::ThreadCounters::sys_time_, impala::RuntimeProfile::ThreadCounters::total_time_, usage_base_, impala::RuntimeProfile::ThreadCounters::user_time_, and impala::RuntimeProfile::ThreadCounters::voluntary_context_switches_.
Referenced by ~ThreadCounterMeasurement().
|
private |
Definition at line 792 of file runtime-profile.h.
Referenced by Stop().
|
private |
Definition at line 789 of file runtime-profile.h.
Referenced by Stop().
|
private |
Definition at line 791 of file runtime-profile.h.
Referenced by Stop(), and ThreadCounterMeasurement().
|
private |
Definition at line 790 of file runtime-profile.h.
Referenced by Stop(), and ThreadCounterMeasurement().