Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::ThreadCounterMeasurement Class Reference

#include <runtime-profile.h>

Collaboration diagram for impala::ThreadCounterMeasurement:

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...
 
ThreadCounterMeasurementoperator= (const ThreadCounterMeasurement &timer)
 

Private Attributes

bool stop_
 
rusage usage_base_
 
MonotonicStopWatch sw_
 
RuntimeProfile::ThreadCounterscounters_
 

Detailed Description

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.

Constructor & Destructor Documentation

impala::ThreadCounterMeasurement::ThreadCounterMeasurement ( RuntimeProfile::ThreadCounters counters)
inline

Definition at line 749 of file runtime-profile.h.

References impala::MonotonicStopWatch::Start(), sw_, and usage_base_.

impala::ThreadCounterMeasurement::~ThreadCounterMeasurement ( )
inline

Update counter when object is destroyed.

Definition at line 780 of file runtime-profile.h.

References Stop().

impala::ThreadCounterMeasurement::ThreadCounterMeasurement ( const ThreadCounterMeasurement timer)
private

Disable copy constructor and assignment.

Member Function Documentation

ThreadCounterMeasurement& impala::ThreadCounterMeasurement::operator= ( const ThreadCounterMeasurement timer)
private

Member Data Documentation

RuntimeProfile::ThreadCounters* impala::ThreadCounterMeasurement::counters_
private

Definition at line 792 of file runtime-profile.h.

Referenced by Stop().

bool impala::ThreadCounterMeasurement::stop_
private

Definition at line 789 of file runtime-profile.h.

Referenced by Stop().

MonotonicStopWatch impala::ThreadCounterMeasurement::sw_
private

Definition at line 791 of file runtime-profile.h.

Referenced by Stop(), and ThreadCounterMeasurement().

rusage impala::ThreadCounterMeasurement::usage_base_
private

Definition at line 790 of file runtime-profile.h.

Referenced by Stop(), and ThreadCounterMeasurement().


The documentation for this class was generated from the following file: