Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::ScopedTimer< T > Class Template Reference

#include <runtime-profile.h>

Collaboration diagram for impala::ScopedTimer< T >:

Public Member Functions

 ScopedTimer (RuntimeProfile::Counter *counter)
 
void Stop ()
 
void Start ()
 
void UpdateCounter ()
 
void ReleaseCounter ()
 Updates the underlying counter for the final time and clears the pointer to it. More...
 
 ~ScopedTimer ()
 Update counter when object is destroyed. More...
 

Private Member Functions

 ScopedTimer (const ScopedTimer &timer)
 Disable copy constructor and assignment. More...
 
ScopedTimeroperator= (const ScopedTimer &timer)
 

Private Attributes

sw_
 
RuntimeProfile::Countercounter_
 

Detailed Description

template<class T>
class impala::ScopedTimer< T >

Utility class to update time elapsed when the object goes out of scope. 'T' must implement the StopWatch "interface" (Start,Stop,ElapsedTime) but we use templates not to pay for virtual function overhead.

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

Constructor & Destructor Documentation

template<class T>
impala::ScopedTimer< T >::ScopedTimer ( RuntimeProfile::Counter counter)
inline

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

template<class T>
impala::ScopedTimer< T >::~ScopedTimer ( )
inline

Update counter when object is destroyed.

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

template<class T>
impala::ScopedTimer< T >::ScopedTimer ( const ScopedTimer< T > &  timer)
private

Disable copy constructor and assignment.

Member Function Documentation

template<class T>
ScopedTimer& impala::ScopedTimer< T >::operator= ( const ScopedTimer< T > &  timer)
private
template<class T>
void impala::ScopedTimer< T >::ReleaseCounter ( )
inline

Updates the underlying counter for the final time and clears the pointer to it.

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

template<class T>
void impala::ScopedTimer< T >::Start ( )
inline
template<class T>
void impala::ScopedTimer< T >::Stop ( )
inline

Member Data Documentation


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