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

#include <runtime-profile.h>

Collaboration diagram for impala::RuntimeProfile:

Classes

class  AveragedCounter
 
class  Counter
 
class  DerivedCounter
 
class  EventSequence
 
class  HighWaterMarkCounter
 
class  ThreadCounters
 A set of counters that measure thread info, such as total time, user time, sys time. More...
 
class  TimeSeriesCounter
 

Public Types

typedef boost::function< int64_t()> DerivedCounterFunction
 
typedef StreamingSampler
< int64_t, 64 > 
StreamingCounterSampler
 

Public Member Functions

 RuntimeProfile (ObjectPool *pool, const std::string &name, bool is_averaged_profile=false)
 
 ~RuntimeProfile ()
 
void AddChild (RuntimeProfile *child, bool indent=true, RuntimeProfile *location=NULL)
 
template<class Compare >
void SortChildren (const Compare &cmp)
 
void UpdateAverage (RuntimeProfile *src)
 
void Update (const TRuntimeProfileTree &thrift_profile)
 
CounterAddCounter (const std::string &name, TUnit::type unit, const std::string &parent_counter_name="")
 
HighWaterMarkCounterAddHighWaterMarkCounter (const std::string &name, TUnit::type unit, const std::string &parent_counter_name="")
 
DerivedCounterAddDerivedCounter (const std::string &name, TUnit::type unit, const DerivedCounterFunction &counter_fn, const std::string &parent_counter_name="")
 
ThreadCountersAddThreadCounters (const std::string &prefix)
 
CounterGetCounter (const std::string &name)
 
void GetCounters (const std::string &name, std::vector< Counter * > *counters)
 
void AddInfoString (const std::string &key, const std::string &value)
 
EventSequenceAddEventSequence (const std::string &key)
 
EventSequenceAddEventSequence (const std::string &key, const TEventSequence &from)
 
EventSequenceGetEventSequence (const std::string &name) const
 Returns event sequence with the provided name if it exists, otherwise NULL. More...
 
const std::string * GetInfoString (const std::string &key) const
 
Countertotal_time_counter ()
 Returns the counter for the total elapsed time. More...
 
Counterinactive_timer ()
 
Countertotal_async_timer ()
 
int64_t local_time ()
 
void PrettyPrint (std::ostream *s, const std::string &prefix="") const
 
void ToThrift (TRuntimeProfileTree *tree) const
 
void ToThrift (std::vector< TRuntimeProfileNode > *nodes) const
 
std::string SerializeToArchiveString () const
 
void SerializeToArchiveString (std::stringstream *out) const
 
void Divide (int n)
 Divides all counters by n. More...
 
void GetChildren (std::vector< RuntimeProfile * > *children)
 
void GetAllChildren (std::vector< RuntimeProfile * > *children)
 Gets all profiles in tree, including this one. More...
 
int num_counters () const
 Returns the number of counters in this profile. More...
 
const std::string & name () const
 Returns name of this profile. More...
 
void set_name (const std::string &name)
 
int64_t metadata () const
 
void set_metadata (int64_t md)
 
CounterAddRateCounter (const std::string &name, Counter *src_counter)
 
CounterAddRateCounter (const std::string &name, DerivedCounterFunction fn, TUnit::type unit)
 
CounterAddSamplingCounter (const std::string &name, Counter *src_counter)
 
CounterAddSamplingCounter (const std::string &name, DerivedCounterFunction fn)
 Same as 'AddSamplingCounter' above except the samples are taken by calling fn. More...
 
void RegisterBucketingCounters (Counter *src_counter, std::vector< Counter * > *buckets)
 
TimeSeriesCounterAddTimeSeriesCounter (const std::string &name, TUnit::type unit, DerivedCounterFunction sample_fn)
 
TimeSeriesCounterAddTimeSeriesCounter (const std::string &name, Counter *src_counter)
 
void ComputeTimeInProfile ()
 

Static Public Member Functions

static RuntimeProfileCreateFromThrift (ObjectPool *pool, const TRuntimeProfileTree &profiles)
 Deserialize from thrift. Runtime profiles are allocated from the pool. More...
 
static int64_t UnitsPerSecond (const Counter *total_counter, const Counter *timer)
 Derived counter function: return measured throughput as input_value/second. More...
 
static int64_t CounterSum (const std::vector< Counter * > *counters)
 Derived counter function: return aggregated value. More...
 

Private Types

typedef std::map< std::string,
Counter * > 
CounterMap
 
typedef std::map< std::string,
std::set< std::string > > 
ChildCounterMap
 
typedef std::map< std::string,
RuntimeProfile * > 
ChildMap
 
typedef std::vector< std::pair
< RuntimeProfile *, bool > > 
ChildVector
 vector of (profile, indentation flag) More...
 
typedef std::map< std::string,
std::string > 
InfoStrings
 
typedef std::vector< std::string > InfoStringsDisplayOrder
 Keeps track of the order in which InfoStrings are displayed when printed. More...
 
typedef std::map< std::string,
EventSequence * > 
EventSequenceMap
 
typedef std::map< std::string,
TimeSeriesCounter * > 
TimeSeriesCounterMap
 

Private Member Functions

void Update (const std::vector< TRuntimeProfileNode > &nodes, int *idx)
 
void ComputeTimeInProfile (int64_t total_time)
 

Static Private Member Functions

static RuntimeProfileCreateFromThrift (ObjectPool *pool, const std::vector< TRuntimeProfileNode > &nodes, int *node_idx)
 
static void PrintChildCounters (const std::string &prefix, const std::string &counter_name, const CounterMap &counter_map, const ChildCounterMap &child_counter_map, std::ostream *s)
 Print the child counters of the given counter name. More...
 

Private Attributes

ObjectPoolpool_
 
bool own_pool_
 True if we have to delete the pool_ on destruction. More...
 
std::string name_
 Name for this runtime profile. More...
 
int64_t metadata_
 user-supplied, uninterpreted metadata. More...
 
bool is_averaged_profile_
 
CounterMap counter_map_
 
ChildCounterMap child_counter_map_
 
std::set< std::vector< Counter * > * > bucketing_counters_
 A set of bucket counters registered in this runtime profile. More...
 
boost::mutex counter_map_lock_
 protects counter_map_, counter_child_map_ and bucketing_counters_ More...
 
ChildMap child_map_
 
ChildVector children_
 
boost::mutex children_lock_
 
InfoStrings info_strings_
 
InfoStringsDisplayOrder info_strings_display_order_
 
boost::mutex info_strings_lock_
 Protects info_strings_ and info_strings_display_order_. More...
 
EventSequenceMap event_sequence_map_
 
boost::mutex event_sequence_lock_
 
TimeSeriesCounterMap time_series_counter_map_
 
boost::mutex time_series_counter_map_lock_
 
Counter counter_total_time_
 
Counter total_async_timer_
 
Counter inactive_timer_
 
double local_time_percent_
 
int64_t local_time_ns_
 

Static Private Attributes

static const std::string TOTAL_TIME_COUNTER_NAME = "TotalTime"
 Name of the counter maintaining the total time. More...
 
static const std::string INACTIVE_TIME_COUNTER_NAME = "InactiveTotalTime"
 
static const std::string ASYNC_TIME_COUNTER_NAME = "AsyncTotalTime"
 

Detailed Description

Runtime profile is a group of profiling counters. It supports adding named counters and being able to serialize and deserialize them. The profiles support a tree structure to form a hierarchy of counters. Runtime profiles supports measuring wall clock rate based counters. There is a single thread per process that will convert an amount (i.e. bytes) counter to a corresponding rate based counter. This thread wakes up at fixed intervals and updates all of the rate counters. Thread-safe.

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

Member Typedef Documentation

typedef std::map<std::string, std::set<std::string> > impala::RuntimeProfile::ChildCounterMap
private

Map from parent counter name to a set of child counter name. All top level counters are the child of "" (root).

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

typedef std::map<std::string, RuntimeProfile*> impala::RuntimeProfile::ChildMap
private

Child profiles. Does not own memory. We record children in both a map (to facilitate updates) and a vector (to print things in the order they were registered)

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

typedef std::vector<std::pair<RuntimeProfile*, bool> > impala::RuntimeProfile::ChildVector
private

vector of (profile, indentation flag)

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

typedef std::map<std::string, Counter*> impala::RuntimeProfile::CounterMap
private

Map from counter names to counters. The profile owns the memory for the counters.

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

typedef boost::function<int64_t ()> impala::RuntimeProfile::DerivedCounterFunction

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

typedef std::map<std::string, EventSequence*> impala::RuntimeProfile::EventSequenceMap
private

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

typedef std::map<std::string, std::string> impala::RuntimeProfile::InfoStrings
private

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

typedef std::vector<std::string> impala::RuntimeProfile::InfoStringsDisplayOrder
private

Keeps track of the order in which InfoStrings are displayed when printed.

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

typedef std::map<std::string, TimeSeriesCounter*> impala::RuntimeProfile::TimeSeriesCounterMap
private

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

Constructor & Destructor Documentation

impala::RuntimeProfile::RuntimeProfile ( ObjectPool pool,
const std::string &  name,
bool  is_averaged_profile = false 
)

Create a runtime profile object with 'name'. Counters and merged profile are allocated from pool. If is_averaged_profile is true, the counters in this profile will be derived averages (of unit AveragedCounter) from other profiles, so the counter map will be left empty Otherwise, the counter map is initialized with a single entry for TotalTime.

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

References impala::ObjectPool::Add(), ASYNC_TIME_COUNTER_NAME, counter_map_, counter_total_time_, INACTIVE_TIME_COUNTER_NAME, inactive_timer(), inactive_timer_, total_async_timer(), total_async_timer_, total_time_counter(), and TOTAL_TIME_COUNTER_NAME.

Referenced by UpdateAverage().

Member Function Documentation

void impala::RuntimeProfile::AddChild ( RuntimeProfile child,
bool  indent = true,
RuntimeProfile location = NULL 
)

Adds a child profile. This is thread safe. Checks if 'child' is already added by searching for its name in the child map, and only adds it if the name doesn't exist. 'indent' indicates whether the child will be printed w/ extra indentation relative to the parent. If location is non-null, child will be inserted after location. Location must already be added to the profile.

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

References child_map_, children_, children_lock_, and name_.

Referenced by impala::RuntimeState::CreateCodegen(), impala::ExecNode::CreateTreeHelper(), impala::BufferedBlockMgr::Init(), impala::PlanFragmentExecutor::Prepare(), impala::ImpalaServer::QueryExecState::QueryExecState(), and impala::TEST().

Counter* impala::RuntimeProfile::AddCounter ( const std::string &  name,
TUnit::type  unit,
const std::string &  parent_counter_name = "" 
)

Add a counter with 'name'/'unit'. Returns a counter object that the caller can update. The counter is owned by the RuntimeProfile object. If parent_counter_name is a non-empty string, the counter is added as a child of parent_counter_name. If the counter already exists, the existing counter object is returned.

Referenced by AddThreadCounters(), and impala::TEST().

RuntimeProfile::DerivedCounter * impala::RuntimeProfile::AddDerivedCounter ( const std::string &  name,
TUnit::type  unit,
const DerivedCounterFunction counter_fn,
const std::string &  parent_counter_name = "" 
)

Add a derived counter with 'name'/'unit'. The counter is owned by the RuntimeProfile object. If parent_counter_name is a non-empty string, the counter is added as a child of parent_counter_name. Returns NULL if the counter already exists.

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

References impala::ObjectPool::Add(), child_counter_map_, counter_map_, counter_map_lock_, impala::FindOrInsert(), is_averaged_profile_, name(), and pool_.

Referenced by impala::HdfsScanNode::Open(), impala::DataStreamSender::Prepare(), impala::ExecNode::Prepare(), and impala::TEST().

EventSequence* impala::RuntimeProfile::AddEventSequence ( const std::string &  key)

Creates and returns a new EventSequence (owned by the runtime profile) - unless a timer with the same 'key' already exists, in which case it is returned. TODO: EventSequences are not merged by Merge() or Update()

Referenced by impala::ImpalaServer::QueryExecState::QueryExecState(), and impala::TEST().

EventSequence* impala::RuntimeProfile::AddEventSequence ( const std::string &  key,
const TEventSequence &  from 
)
HighWaterMarkCounter* impala::RuntimeProfile::AddHighWaterMarkCounter ( const std::string &  name,
TUnit::type  unit,
const std::string &  parent_counter_name = "" 
)

Adds a high water mark counter to the runtime profile. Otherwise, same behavior as AddCounter()

Referenced by impala::HdfsScanNode::Open(), impala::PartitionedHashJoinNode::Prepare(), and impala::PartitionedAggregationNode::Prepare().

void impala::RuntimeProfile::AddInfoString ( const std::string &  key,
const std::string &  value 
)
Counter* impala::RuntimeProfile::AddRateCounter ( const std::string &  name,
Counter src_counter 
)

Add a rate counter to the current profile based on src_counter with name. The rate counter is updated periodically based on the src counter. The rate counter has units in src_counter unit per second. Rate counters should be stopped (by calling PeriodicCounterUpdater::StopRateCounter) as soon as the src_counter stops changing.

Referenced by impala::ScanNode::Prepare(), and impala::TEST().

Counter* impala::RuntimeProfile::AddRateCounter ( const std::string &  name,
DerivedCounterFunction  fn,
TUnit::type  unit 
)

Same as 'AddRateCounter' above except values are taken by calling fn. The resulting counter will be of 'unit'.

Counter* impala::RuntimeProfile::AddSamplingCounter ( const std::string &  name,
Counter src_counter 
)

Add a sampling counter to the current profile based on src_counter with name. The sampling counter is updated periodically based on the src counter by averaging the samples taken from the src counter. The sampling counter has the same unit as src_counter unit. Sampling counters should be stopped (by calling PeriodicCounterUpdater::StopSamplingCounter) as soon as the src_counter stops changing.

Referenced by impala::HdfsScanNode::Open(), and impala::PlanFragmentExecutor::Prepare().

Counter* impala::RuntimeProfile::AddSamplingCounter ( const std::string &  name,
DerivedCounterFunction  fn 
)

Same as 'AddSamplingCounter' above except the samples are taken by calling fn.

TimeSeriesCounter* impala::RuntimeProfile::AddTimeSeriesCounter ( const std::string &  name,
TUnit::type  unit,
DerivedCounterFunction  sample_fn 
)

Create a time series counter. This begins sampling immediately. This counter contains a number of samples that are collected periodically by calling sample_fn(). Note: these counters don't get merged (to make average profiles)

Referenced by impala::PlanFragmentExecutor::Prepare().

TimeSeriesCounter* impala::RuntimeProfile::AddTimeSeriesCounter ( const std::string &  name,
Counter src_counter 
)

Create a time series counter that samples the source counter. Sampling begins immediately. Note: these counters don't get merged (to make average profiles)

void impala::RuntimeProfile::ComputeTimeInProfile ( )

Recursively compute the fraction of the 'total_time' spent in this profile and its children. This function updates local_time_percent_ for each profile.

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

References total_time_counter().

Referenced by UpdateAverage().

void impala::RuntimeProfile::ComputeTimeInProfile ( int64_t  total_time)
private

Helper function to compute compute the fraction of the total time spent in this profile and its children. Called recusively.

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

References children_, children_lock_, inactive_timer(), is_averaged_profile_, local_time_ns_, local_time_percent_, total_async_timer(), total_time_counter(), and impala::RuntimeProfile::Counter::value().

int64_t impala::RuntimeProfile::CounterSum ( const std::vector< Counter * > *  counters)
static

Derived counter function: return aggregated value.

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

RuntimeProfile * impala::RuntimeProfile::CreateFromThrift ( ObjectPool pool,
const TRuntimeProfileTree &  profiles 
)
static

Deserialize from thrift. Runtime profiles are allocated from the pool.

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

References gen_ir_descriptions::idx.

Referenced by impala::TEST().

static RuntimeProfile* impala::RuntimeProfile::CreateFromThrift ( ObjectPool pool,
const std::vector< TRuntimeProfileNode > &  nodes,
int *  node_idx 
)
staticprivate

Create a subtree of runtime profiles from nodes, starting at *node_idx. On return, *node_idx is the index one past the end of this subtree

void impala::RuntimeProfile::Divide ( int  n)

Divides all counters by n.

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

References child_map_, children_lock_, counter_map_, and counter_map_lock_.

void impala::RuntimeProfile::GetAllChildren ( std::vector< RuntimeProfile * > *  children)

Gets all profiles in tree, including this one.

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

References child_map_, and children_lock_.

void impala::RuntimeProfile::GetChildren ( std::vector< RuntimeProfile * > *  children)

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

References child_map_, and children_lock_.

Referenced by impala::TEST().

RuntimeProfile::Counter * impala::RuntimeProfile::GetCounter ( const std::string &  name)

Gets the counter object with 'name'. Returns NULL if there is no counter with that name.

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

References counter_map_, counter_map_lock_, and name().

Referenced by GetCounters(), impala::TEST(), impala::TEST_F(), and impala::ValidateCounter().

void impala::RuntimeProfile::GetCounters ( const std::string &  name,
std::vector< Counter * > *  counters 
)

Adds all counters with 'name' that are registered either in this or in any of the child profiles to 'counters'.

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

References children_, children_lock_, and GetCounter().

RuntimeProfile::EventSequence * impala::RuntimeProfile::GetEventSequence ( const std::string &  name) const

Returns event sequence with the provided name if it exists, otherwise NULL.

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

References event_sequence_lock_, and event_sequence_map_.

const string * impala::RuntimeProfile::GetInfoString ( const std::string &  key) const

Returns a pointer to the info string value for 'key'. Returns NULL if the key does not exist.

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

References info_strings_, and info_strings_lock_.

Referenced by impala::TEST().

Counter* impala::RuntimeProfile::inactive_timer ( )
inline
int64_t impala::RuntimeProfile::local_time ( )
inline

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

References local_time_ns_.

int64_t impala::RuntimeProfile::metadata ( ) const
inline

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

References metadata_.

Referenced by impala::ExecNode::GetNodeIdFromProfile().

const std::string& impala::RuntimeProfile::name ( ) const
inline

Returns name of this profile.

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

References name_.

Referenced by AddDerivedCounter(), GetCounter(), set_name(), and impala::TEST().

int impala::RuntimeProfile::num_counters ( ) const
inline

Returns the number of counters in this profile.

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

References counter_map_.

Referenced by impala::TEST().

void impala::RuntimeProfile::PrintChildCounters ( const std::string &  prefix,
const std::string &  counter_name,
const CounterMap counter_map,
const ChildCounterMap child_counter_map,
std::ostream *  s 
)
staticprivate

Print the child counters of the given counter name.

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

References impala::PrettyPrinter::Print().

Referenced by PrettyPrint().

void impala::RuntimeProfile::RegisterBucketingCounters ( Counter src_counter,
std::vector< Counter * > *  buckets 
)

Register a bucket of counters to store the sampled value of src_counter. The src_counter is sampled periodically and the buckets are updated.

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

References bucketing_counters_, counter_map_lock_, and impala::PeriodicCounterUpdater::RegisterBucketingCounters().

Referenced by impala::HdfsScanNode::Open(), and impala::TEST().

string impala::RuntimeProfile::SerializeToArchiveString ( ) const

Serializes the runtime profile to a string. This first serializes the object using thrift compact binary format, then gzip compresses it and finally encodes it as base64. This is not a lightweight operation and should not be in the hot path.

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

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

void impala::RuntimeProfile::SerializeToArchiveString ( std::stringstream *  out) const
void impala::RuntimeProfile::set_metadata ( int64_t  md)
inline

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

References metadata_.

void impala::RuntimeProfile::set_name ( const std::string &  name)
inline

only call this on top-level profiles (because it doesn't re-file child profiles)

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

References name(), and name_.

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

template<class Compare >
void impala::RuntimeProfile::SortChildren ( const Compare &  cmp)
inline

Sorts all children according to a custom comparator. Does not invalidate pointers to profiles.

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

References children_, and children_lock_.

Counter* impala::RuntimeProfile::total_async_timer ( )
inline

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

References ASYNC_TIME_COUNTER_NAME, and counter_map_.

Referenced by ComputeTimeInProfile(), and RuntimeProfile().

void impala::RuntimeProfile::ToThrift ( TRuntimeProfileTree *  tree) const

Serializes profile to thrift. Does not hold locks when it makes any function calls.

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

Referenced by impala::FragmentMgr::FragmentExecState::ReportStatusCb(), and impala::TEST().

void impala::RuntimeProfile::ToThrift ( std::vector< TRuntimeProfileNode > *  nodes) const
int64_t impala::RuntimeProfile::UnitsPerSecond ( const Counter total_counter,
const Counter timer 
)
static
void impala::RuntimeProfile::Update ( const TRuntimeProfileTree &  thrift_profile)

Updates this profile w/ the thrift profile. Counters and child profiles in thrift_profile that already exist in this profile are updated. Counters that do not already exist are created. Info strings matched up by key and are updated or added, depending on whether the key has already been registered. TODO: Event sequences are ignored

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

Referenced by impala::TEST().

void impala::RuntimeProfile::Update ( const std::vector< TRuntimeProfileNode > &  nodes,
int *  idx 
)
private

Update a subtree of profiles from nodes, rooted at *idx. On return, *idx points to the node immediately following this subtree.

void impala::RuntimeProfile::UpdateAverage ( RuntimeProfile src)

Updates the AveragedCounter counters in this profile with the counters from the 'src' profile. If a counter is present in 'src' but missing in this profile, a new AveragedCounter is created with the same name. This method should not be invoked if is_average_profile_ is false. Obtains locks on the counter maps and child counter maps in both this and 'src' profiles.

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

References impala::ObjectPool::Add(), ASYNC_TIME_COUNTER_NAME, child_counter_map_, child_map_, children_, children_lock_, ComputeTimeInProfile(), counter_map_, counter_map_lock_, impala::FindOrInsert(), INACTIVE_TIME_COUNTER_NAME, is_averaged_profile_, metadata_, name_, pool_, RuntimeProfile(), UpdateAverage(), and impala::RuntimeProfile::AveragedCounter::UpdateCounter().

Referenced by impala::TEST(), and UpdateAverage().

Member Data Documentation

const string impala::RuntimeProfile::ASYNC_TIME_COUNTER_NAME = "AsyncTotalTime"
staticprivate

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

Referenced by RuntimeProfile(), total_async_timer(), and UpdateAverage().

std::set<std::vector<Counter*>* > impala::RuntimeProfile::bucketing_counters_
private

A set of bucket counters registered in this runtime profile.

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

Referenced by RegisterBucketingCounters(), and ~RuntimeProfile().

ChildCounterMap impala::RuntimeProfile::child_counter_map_
private

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

Referenced by AddDerivedCounter(), PrettyPrint(), and UpdateAverage().

ChildMap impala::RuntimeProfile::child_map_
private

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

Referenced by AddChild(), Divide(), GetAllChildren(), GetChildren(), and UpdateAverage().

ChildVector impala::RuntimeProfile::children_
private
boost::mutex impala::RuntimeProfile::children_lock_
mutableprivate
boost::mutex impala::RuntimeProfile::counter_map_lock_
mutableprivate

protects counter_map_, counter_child_map_ and bucketing_counters_

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

Referenced by AddDerivedCounter(), Divide(), GetCounter(), PrettyPrint(), RegisterBucketingCounters(), and UpdateAverage().

Counter impala::RuntimeProfile::counter_total_time_
private

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

Referenced by RuntimeProfile().

boost::mutex impala::RuntimeProfile::event_sequence_lock_
mutableprivate

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

Referenced by GetEventSequence(), and PrettyPrint().

EventSequenceMap impala::RuntimeProfile::event_sequence_map_
private

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

Referenced by GetEventSequence(), and PrettyPrint().

const string impala::RuntimeProfile::INACTIVE_TIME_COUNTER_NAME = "InactiveTotalTime"
staticprivate

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

Referenced by inactive_timer(), RuntimeProfile(), and UpdateAverage().

Counter impala::RuntimeProfile::inactive_timer_
private

Total time spent waiting (on non-children) that should not be counted when computing local_time_percent_. This is updated for example in the exchange node when waiting on the sender from another fragment.

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

Referenced by RuntimeProfile().

InfoStrings impala::RuntimeProfile::info_strings_
private

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

Referenced by AddInfoString(), GetInfoString(), and PrettyPrint().

InfoStringsDisplayOrder impala::RuntimeProfile::info_strings_display_order_
private

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

Referenced by AddInfoString(), and PrettyPrint().

boost::mutex impala::RuntimeProfile::info_strings_lock_
mutableprivate

Protects info_strings_ and info_strings_display_order_.

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

Referenced by AddInfoString(), GetInfoString(), and PrettyPrint().

bool impala::RuntimeProfile::is_averaged_profile_
private

True if this profile is an average derived from other profiles. All counters in this profile must be of unit AveragedCounter.

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

Referenced by AddDerivedCounter(), ComputeTimeInProfile(), and UpdateAverage().

int64_t impala::RuntimeProfile::local_time_ns_
private

Time spent in this node (not including the children). Computed in ComputeTimeInProfile()

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

Referenced by ComputeTimeInProfile(), local_time(), and PrettyPrint().

double impala::RuntimeProfile::local_time_percent_
private

Time spent in just in this profile (i.e. not the children) as a fraction of the total time in the entire profile tree.

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

Referenced by ComputeTimeInProfile(), and PrettyPrint().

int64_t impala::RuntimeProfile::metadata_
private

user-supplied, uninterpreted metadata.

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

Referenced by metadata(), set_metadata(), and UpdateAverage().

std::string impala::RuntimeProfile::name_
private

Name for this runtime profile.

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

Referenced by AddChild(), impala::RuntimeProfile::TimeSeriesCounter::DebugString(), name(), PrettyPrint(), set_name(), and UpdateAverage().

bool impala::RuntimeProfile::own_pool_
private

True if we have to delete the pool_ on destruction.

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

Referenced by ~RuntimeProfile().

ObjectPool* impala::RuntimeProfile::pool_
private

Pool for allocated counters. Usually owned by the creator of this object, but occasionally allocated in the constructor.

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

Referenced by AddDerivedCounter(), AddThreadCounters(), UpdateAverage(), and ~RuntimeProfile().

TimeSeriesCounterMap impala::RuntimeProfile::time_series_counter_map_
private

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

Referenced by PrettyPrint(), and ~RuntimeProfile().

boost::mutex impala::RuntimeProfile::time_series_counter_map_lock_
mutableprivate

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

Referenced by PrettyPrint().

Counter impala::RuntimeProfile::total_async_timer_
private

Total time that child profiles spent in an asychronous thread. This is used in the local_time_percent_ calculation.

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

Referenced by RuntimeProfile().

const string impala::RuntimeProfile::TOTAL_TIME_COUNTER_NAME = "TotalTime"
staticprivate

Name of the counter maintaining the total time.

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

Referenced by PrettyPrint(), RuntimeProfile(), and total_time_counter().


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