Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <runtime-profile.h>
Public Types | |
typedef std::pair< std::string, int64_t > | Event |
An Event is a <label, timestamp> pair. More... | |
typedef std::vector< Event > | EventList |
An EventList is a sequence of Events, in increasing timestamp order. More... | |
Public Member Functions | |
EventSequence () | |
EventSequence (const std::vector< int64_t > ×tamps, 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... | |
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.
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.
typedef std::vector<Event> impala::RuntimeProfile::EventSequence::EventList |
An EventList is a sequence of Events, in increasing timestamp order.
Definition at line 297 of file runtime-profile.h.
|
inline |
Definition at line 269 of file runtime-profile.h.
|
inline |
Helper constructor for building from Thrift.
Definition at line 272 of file runtime-profile.h.
References events_.
|
inline |
Definition at line 291 of file runtime-profile.h.
References impala::MonotonicStopWatch::ElapsedTime(), and sw_.
|
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().
|
inline |
Stores an event in sequence with the given label and the current time (relative to the first time Start() was called) as the timestamp.
Definition at line 286 of file runtime-profile.h.
References impala::MonotonicStopWatch::ElapsedTime(), events_, lock_, and sw_.
Referenced by impala::AdmissionController::AdmitQuery(), impala::ImpalaServer::QueryExecState::Cancel(), impala::ImpalaServer::QueryExecState::Done(), impala::ImpalaServer::QueryExecState::ExecQueryOrDmlRequest(), impala::TEST(), impala::ImpalaServer::QueryExecState::UpdateCatalog(), impala::ImpalaServer::QueryExecState::UpdateTableAndColumnStats(), impala::ImpalaServer::QueryExecState::WaitForChildQueries(), and impala::ScopedEvent::~ScopedEvent().
|
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.
|
private |
Stored in increasing time order.
Definition at line 314 of file runtime-profile.h.
Referenced by EventSequence(), GetEvents(), and MarkEvent().
|
private |
Protect access to events_.
Definition at line 311 of file runtime-profile.h.
Referenced by GetEvents(), and MarkEvent().
|
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().