Grappa  r3821, hash 22cd626d567a91ead5b23302066d1e9469f45c66
Grappa::MaxMetric< T > Class Template Reference

Metric that simply keeps track of a single value over time. More...

#include <MaxMetric.hpp>

Inheritance diagram for Grappa::MaxMetric< T >:

Public Member Functions

 MaxMetric (const char *name, T initial_value, bool reg_new=true)
 
virtual std::ostream & json (std::ostream &o) const
 
virtual void reset ()
 
virtual void sample ()
 
virtual MaxMetric< T > * clone () const
 
virtual void merge_all (impl::MetricBase *static_stat_ptr)
 
const MaxMetric< T > & count ()
 
value () const
 Get the current value. More...
 
 operator T () const
 
void add (T value)
 

Protected Attributes

initial_value
 
value_
 

Detailed Description

template<typename T>
class Grappa::MaxMetric< T >

Metric that simply keeps track of a single value over time.

Typically used as a counter, but can also be used for sampling an instantaneous value.

Definition at line 58 of file MaxMetric.hpp.

Constructor & Destructor Documentation

template<typename T>
Grappa::MaxMetric< T >::MaxMetric ( const char *  name,
initial_value,
bool  reg_new = true 
)
inline

Definition at line 72 of file MaxMetric.hpp.

Member Function Documentation

template<typename T>
void Grappa::MaxMetric< T >::add ( value)
inline

Definition at line 114 of file MaxMetric.hpp.

template<typename T>
virtual MaxMetric<T>* Grappa::MaxMetric< T >::clone ( ) const
inlinevirtual

Definition at line 99 of file MaxMetric.hpp.

template<typename T>
const MaxMetric<T>& Grappa::MaxMetric< T >::count ( )
inline

Definition at line 106 of file MaxMetric.hpp.

template<typename T>
virtual std::ostream& Grappa::MaxMetric< T >::json ( std::ostream &  o) const
inlinevirtual

Definition at line 83 of file MaxMetric.hpp.

template<typename T >
void Grappa::MaxMetric< T >::merge_all ( impl::MetricBase *  static_stat_ptr)
virtual

Definition at line 45 of file MaxMetricImpl.hpp.

template<typename T>
Grappa::MaxMetric< T >::operator T ( ) const
inline

Definition at line 112 of file MaxMetric.hpp.

template<typename T>
virtual void Grappa::MaxMetric< T >::reset ( )
inlinevirtual

Definition at line 88 of file MaxMetric.hpp.

template<typename T>
virtual void Grappa::MaxMetric< T >::sample ( )
inlinevirtual

Definition at line 92 of file MaxMetric.hpp.

template<typename T>
T Grappa::MaxMetric< T >::value ( ) const
inline

Get the current value.

Definition at line 109 of file MaxMetric.hpp.

Member Data Documentation

template<typename T>
T Grappa::MaxMetric< T >::initial_value
protected

Definition at line 60 of file MaxMetric.hpp.

template<typename T>
T Grappa::MaxMetric< T >::value_
protected

Definition at line 61 of file MaxMetric.hpp.


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