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

#include <runtime-profile.h>

Collaboration diagram for impala::RuntimeProfile::EventSequence:

Public Types

typedef std::pair< std::string,
int64_t > 
Event
 An Event is a <label, timestamp> pair. More...
 
typedef std::vector< EventEventList
 An EventList is a sequence of Events, in increasing timestamp order. More...
 

Public Member Functions

 EventSequence ()
 
 EventSequence (const std::vector< int64_t > &timestamps, const std::vector< std::string > &labels)
 Helper constructor for building from Thrift. More...
 
void Start ()
 Starts the timer without resetting it. More...
 
void MarkEvent (const std::string &label)
 
int64_t ElapsedTime ()
 
void GetEvents (std::vector< Event > *events)
 
void ToThrift (TEventSequence *seq) const
 

Private Attributes

boost::mutex lock_
 Protect access to events_. More...
 
EventList events_
 Stored in increasing time order. More...
 
MonotonicStopWatch sw_
 Timer which allows events to be timestamped when they are recorded. More...
 

Detailed Description

An EventSequence captures a sequence of events (each added by calling MarkEvent). Each event has a text label, and a time (measured relative to the moment Start() was called as t=0). It is useful for tracking the evolution of some serial process, such as the query lifecycle.

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

Member Typedef Documentation

typedef std::pair<std::string, int64_t> impala::RuntimeProfile::EventSequence::Event

An Event is a <label, timestamp> pair.

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

An EventList is a sequence of Events, in increasing timestamp order.

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

Constructor & Destructor Documentation

impala::RuntimeProfile::EventSequence::EventSequence ( )
inline

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

impala::RuntimeProfile::EventSequence::EventSequence ( const std::vector< int64_t > &  timestamps,
const std::vector< std::string > &  labels 
)
inline

Helper constructor for building from Thrift.

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

References events_.

Member Function Documentation

int64_t impala::RuntimeProfile::EventSequence::ElapsedTime ( )
inline

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

References impala::MonotonicStopWatch::ElapsedTime(), and sw_.

void impala::RuntimeProfile::EventSequence::GetEvents ( std::vector< Event > *  events)
inline

Copies the member events_ into the supplied vector 'events'. The supplied vector 'events' is cleared before this.

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

References events_, and lock_.

Referenced by impala::TEST().

void impala::RuntimeProfile::EventSequence::Start ( )
inline

Starts the timer without resetting it.

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

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

Referenced by impala::ImpalaServer::QueryExecState::QueryExecState().

void impala::RuntimeProfile::EventSequence::ToThrift ( TEventSequence *  seq) const

Definition at line 888 of file runtime-profile.cc.

Member Data Documentation

EventList impala::RuntimeProfile::EventSequence::events_
private

Stored in increasing time order.

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

Referenced by EventSequence(), GetEvents(), and MarkEvent().

boost::mutex impala::RuntimeProfile::EventSequence::lock_
private

Protect access to events_.

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

Referenced by GetEvents(), and MarkEvent().

MonotonicStopWatch impala::RuntimeProfile::EventSequence::sw_
private

Timer which allows events to be timestamped when they are recorded.

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

Referenced by ElapsedTime(), MarkEvent(), and Start().


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