MetroCollect  2.3.4
MetroCollectFile Struct Reference

Small struct to implement MetricsController delegate. More...

Inheritance diagram for MetroCollectFile:
Collaboration diagram for MetroCollectFile:

Public Member Functions

void set (size_t iterations, std::vector< std::pair< std::string, std::string >> metricsNames)
 Update members. More...
 
void metricsContollerCollectedMetricsValues (const MetroCollect::MetricsController &, const MetroCollect::MetricsDiffArray &diff, const MetroCollect::MetricsDataArray &, const MetroCollect::MetricsDataArray &) override
 Function called every time the MetricsController has collected new values. More...
 
void metricsContollerCollectedMetricsStats (const MetroCollect::MetricsController &, const MetroCollect::MetricsController::MetricsStats &) override
 Function called every time the MetricsController has computed statistics. More...
 
bool metricsContollerShouldStopCollectingMetrics (const MetroCollect::MetricsController &) override
 Function called after each iteration to ask the delegate whether the controller should stop collecting metrics. More...
 

Public Attributes

size_t i = 0
 Iteration index. More...
 
size_t iterationCount
 Number of iterations remaining to be done. More...
 
std::vector< std::pair< std::chrono::duration< double, std::milli >, std::vector< MetroCollect::DiffValueType > > > values
 Array of all collected metrics and their relative timestamps. More...
 
std::vector< std::pair< std::string, std::string > > names
 Name of collected metrics. More...
 
std::chrono::time_point< std::chrono::system_clock > start
 Start time of metric collection. More...
 

Detailed Description

Small struct to implement MetricsController delegate.

Definition at line 117 of file MetroCollectFile.cc.

Member Function Documentation

◆ metricsContollerCollectedMetricsStats()

void MetroCollectFile::metricsContollerCollectedMetricsStats ( const MetroCollect::MetricsController metricsController,
const MetroCollect::MetricsController::MetricsStats metricsStats 
)
inlineoverridevirtual

Function called every time the MetricsController has computed statistics.

Parameters
metricsControllerthe calling MetricsController
metricsStatscomputed statistics

Implements MetroCollect::MetricsControllerDelegate.

Definition at line 144 of file MetroCollectFile.cc.

◆ metricsContollerCollectedMetricsValues()

void MetroCollectFile::metricsContollerCollectedMetricsValues ( const MetroCollect::MetricsController metricsController,
const MetroCollect::MetricsDiffArray metricsDiff,
const MetroCollect::MetricsDataArray previousMetrics,
const MetroCollect::MetricsDataArray currentMetrics 
)
inlineoverridevirtual

Function called every time the MetricsController has collected new values.

Parameters
metricsControllerthe calling MetricsController
metricsDiffcomputed metrics differences
previousMetricsearlier collected metrics
currentMetricslatest collected metrics

Implements MetroCollect::MetricsControllerDelegate.

Definition at line 138 of file MetroCollectFile.cc.

Here is the call graph for this function:

◆ metricsContollerShouldStopCollectingMetrics()

bool MetroCollectFile::metricsContollerShouldStopCollectingMetrics ( const MetroCollect::MetricsController metricsController)
inlineoverridevirtual

Function called after each iteration to ask the delegate whether the controller should stop collecting metrics.

Parameters
metricsControllerthe calling MetricsController
Returns
true if the controller should stop
false otherwise

Implements MetroCollect::MetricsControllerDelegate.

Definition at line 147 of file MetroCollectFile.cc.

◆ set()

void MetroCollectFile::set ( size_t  iterations,
std::vector< std::pair< std::string, std::string >>  metricsNames 
)
inline

Update members.

Parameters
iterationssets the number of iterations
metricsNamessets the metric names

Definition at line 130 of file MetroCollectFile.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ i

size_t MetroCollectFile::i = 0

Iteration index.

Definition at line 118 of file MetroCollectFile.cc.

◆ iterationCount

size_t MetroCollectFile::iterationCount

Number of iterations remaining to be done.

Definition at line 119 of file MetroCollectFile.cc.

◆ names

std::vector<std::pair<std::string, std::string> > MetroCollectFile::names

Name of collected metrics.

Definition at line 121 of file MetroCollectFile.cc.

◆ start

std::chrono::time_point<std::chrono::system_clock> MetroCollectFile::start

Start time of metric collection.

Definition at line 122 of file MetroCollectFile.cc.

◆ values

std::vector<std::pair<std::chrono::duration<double, std::milli>, std::vector<MetroCollect::DiffValueType> > > MetroCollectFile::values

Array of all collected metrics and their relative timestamps.

Definition at line 120 of file MetroCollectFile.cc.


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