Public Member Functions | Private Member Functions | Private Attributes | List of all members
CPUMetricCollector Class Reference

#include <cpu_metric_collector.h>

Inheritance diagram for CPUMetricCollector:
Inheritance graph
[legend]

Public Member Functions

void Collect () overridefinal
 activates metrics collection. More...
 
 CPUMetricCollector (ros_monitoring_msgs::MetricManagerInterface &m)
 Constructor. More...
 
- Public Member Functions inherited from MetricCollectorInterface
 MetricCollectorInterface (ros_monitoring_msgs::MetricManagerInterface &m)
 Constructor. More...
 

Private Member Functions

void CollectCpuUsage (const std::vector< CPUData > &entries1, const std::vector< CPUData > &entries2)
 

Private Attributes

std::shared_ptr< CPUStatsnew_
 
std::shared_ptr< CPUStatsold_
 

Additional Inherited Members

- Protected Attributes inherited from MetricCollectorInterface
ros_monitoring_msgs::MetricManagerInterfacemgr_
 creates metric entries and publishes them. More...
 

Detailed Description

collects cpu usage metric.

Definition at line 27 of file cpu_metric_collector.h.

Constructor & Destructor Documentation

CPUMetricCollector::CPUMetricCollector ( ros_monitoring_msgs::MetricManagerInterface m)
inline

Constructor.

Parameters
mmetric manager which creates and aggregates metrics.

Definition at line 35 of file cpu_metric_collector.h.

Member Function Documentation

void CPUMetricCollector::Collect ( )
finaloverridevirtual

activates metrics collection.

Implements MetricCollectorInterface.

Definition at line 29 of file cpu_metric_collector.cpp.

void CPUMetricCollector::CollectCpuUsage ( const std::vector< CPUData > &  entries1,
const std::vector< CPUData > &  entries2 
)
private

Definition at line 43 of file cpu_metric_collector.cpp.

Member Data Documentation

std::shared_ptr<CPUStats> CPUMetricCollector::new_
private

Definition at line 48 of file cpu_metric_collector.h.

std::shared_ptr<CPUStats> CPUMetricCollector::old_
private

Definition at line 47 of file cpu_metric_collector.h.


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


health_metric_collector
Author(s): AWS RoboMaker
autogenerated on Fri Mar 5 2021 03:32:42