Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 47 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 61 of file MaxMetric.hpp.

Member Function Documentation

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

Definition at line 103 of file MaxMetric.hpp.

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

Definition at line 88 of file MaxMetric.hpp.

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

Definition at line 95 of file MaxMetric.hpp.

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

Definition at line 72 of file MaxMetric.hpp.

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

Definition at line 34 of file MaxMetricImpl.hpp.

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

Definition at line 101 of file MaxMetric.hpp.

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

Definition at line 77 of file MaxMetric.hpp.

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

Definition at line 81 of file MaxMetric.hpp.

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

Get the current value.

Definition at line 98 of file MaxMetric.hpp.

Member Data Documentation

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

Definition at line 49 of file MaxMetric.hpp.

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

Definition at line 50 of file MaxMetric.hpp.


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