geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
Classes | Public Member Functions | List of all members
geopm::RuntimeStats Class Reference

Class that aggregates statistics without buffered data. More...

#include <RuntimeStats.hpp>

Public Member Functions

 RuntimeStats ()=delete
 
 RuntimeStats (const std::vector< std::string > &metric_names)
 Constructor that records the names of all metrics. More...
 
virtual ~RuntimeStats ()=default
 Default virtual destructor. More...
 
int num_metric (void) const
 Number of metrics aggregated. More...
 
std::string metric_name (int metric_idx) const
 Name of one metrics. More...
 
uint64_t count (int metric_idx) const
 Number of non-null values sampled. More...
 
double first (int metric_idx) const
 First non-null value sampled. More...
 
double last (int metric_idx) const
 Last non-null value sampled. More...
 
double min (int metric_idx) const
 Minimum value sampled. More...
 
double max (int metric_idx) const
 Maximum value sampled. More...
 
double mean (int metric_idx) const
 Mean value sampled. More...
 
double std (int metric_idx) const
 Estimate of standard deviation. More...
 
void reset (void)
 Reset all aggregated statistics. More...
 
void update (const std::vector< double > &sample)
 Update statistics with new sample. More...
 

Detailed Description

Class that aggregates statistics without buffered data.

Constructor & Destructor Documentation

◆ RuntimeStats() [1/2]

geopm::RuntimeStats::RuntimeStats ( )
delete

◆ RuntimeStats() [2/2]

geopm::RuntimeStats::RuntimeStats ( const std::vector< std::string > &  metric_names)

Constructor that records the names of all metrics.

◆ ~RuntimeStats()

virtual geopm::RuntimeStats::~RuntimeStats ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ count()

uint64_t geopm::RuntimeStats::count ( int  metric_idx) const

Number of non-null values sampled.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
Number of non-null samples

◆ first()

double geopm::RuntimeStats::first ( int  metric_idx) const

First non-null value sampled.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
First value of metric

◆ last()

double geopm::RuntimeStats::last ( int  metric_idx) const

Last non-null value sampled.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
Last value of metric

◆ max()

double geopm::RuntimeStats::max ( int  metric_idx) const

Maximum value sampled.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
Maximum value of metric

◆ mean()

double geopm::RuntimeStats::mean ( int  metric_idx) const

Mean value sampled.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
Mean value of metric

◆ metric_name()

std::string geopm::RuntimeStats::metric_name ( int  metric_idx) const

Name of one metrics.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
Name of metric

◆ min()

double geopm::RuntimeStats::min ( int  metric_idx) const

Minimum value sampled.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
Minimum value of metric

◆ num_metric()

int geopm::RuntimeStats::num_metric ( void  ) const

Number of metrics aggregated.

Returns
The number of metrics specified at construction

◆ reset()

void geopm::RuntimeStats::reset ( void  )

Reset all aggregated statistics.

◆ std()

double geopm::RuntimeStats::std ( int  metric_idx) const

Estimate of standard deviation.

Parameters
[in]metric_idxIndex of the metric as specified at construction
Returns
Standard deviation estimate of metric

◆ update()

void geopm::RuntimeStats::update ( const std::vector< double > &  sample)

Update statistics with new sample.

Update all metrics being aggregated.

Parameters
[in]sampleVector of sample values: one for each metric name specified at construction

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