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

#include <timer-metric.h>

Inheritance diagram for impala::TimerMetric:
Collaboration diagram for impala::TimerMetric:

Public Member Functions

virtual void ToJson (rapidjson::Document *document, rapidjson::Value *val)
 name, value, human_readable, description More...
 
virtual void ToLegacyJson (rapidjson::Document *document)
 This method is kept for backwards-compatibility with CM5.0. More...
 
virtual std::string ToHumanReadable ()
 
const std::string & key () const
 
const std::string & description () const
 

Protected Member Functions

void AddStandardFields (rapidjson::Document *document, rapidjson::Value *val)
 

Protected Attributes

const std::string key_
 Unique key identifying this metric. More...
 
const std::string description_
 

Detailed Description

Definition at line 8 of file timer-metric.h.

Member Function Documentation

void Metric::AddStandardFields ( rapidjson::Document *  document,
rapidjson::Value *  val 
)
protectedinherited

Convenience method to add standard fields (name, description, human readable string) to 'val'.

Definition at line 46 of file metrics.cc.

References impala::name.

Referenced by impala::SetMetric< std::string >::ToJson(), impala::StatsMetric< double >::ToJson(), and impala::SimpleMetric< T, metric_kind >::ToJson().

const std::string& impala::Metric::description ( ) const
inlineinherited

Definition at line 72 of file metrics.h.

References impala::Metric::description_.

const std::string& impala::Metric::key ( ) const
inlineinherited

Definition at line 71 of file metrics.h.

References impala::Metric::key_.

Referenced by impala::SimpleMetric< T, metric_kind >::Increment().

virtual std::string impala::TimerMetric::ToHumanReadable ( )
inlinevirtual

Writes a human-readable representation of this metric to 'out'. This is the representation that is often displayed in webpages etc.

Implements impala::Metric.

Definition at line 13 of file timer-metric.h.

virtual void impala::TimerMetric::ToJson ( rapidjson::Document *  document,
rapidjson::Value *  val 
)
inlinevirtual

name, value, human_readable, description

Builds a new Value into 'val', using (if required) the allocator from 'document'. Should set the following fields where appropriate:

Implements impala::Metric.

Definition at line 10 of file timer-metric.h.

virtual void impala::TimerMetric::ToLegacyJson ( rapidjson::Document *  document)
inlinevirtual

This method is kept for backwards-compatibility with CM5.0.

Adds a new json value directly to 'document' of the form: "name" : "human-readable-string"

Implements impala::Metric.

Definition at line 11 of file timer-metric.h.

Member Data Documentation

const std::string impala::Metric::description_
protectedinherited

Description of this metric. TODO: share one copy amongst metrics with the same description.

Definition at line 80 of file metrics.h.

Referenced by impala::Metric::description().

const std::string impala::Metric::key_
protectedinherited

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