|
MetroCollect
2.3.4
|
Singleton abstract class, base class of all metric sources classes. More...
#include <Source.h>

Public Member Functions | |
| SourceBase (const SourceBase &)=delete | |
| Deleted copy constructor. More... | |
| void | operator= (const SourceBase &)=delete |
| Deleted copy operator. More... | |
| virtual size_t | fieldCount () const noexcept=0 |
| Get the number of field the source has. More... | |
| virtual const std::vector< size_t > | indexesOfFieldName (const FieldName &fieldName, Interests *interests=nullptr) const noexcept=0 |
| Search for fields associated to a specific name. More... | |
| virtual const std::string | fieldNameSourcePrefix () const noexcept=0 |
| Get the prefix by which all field names should begin with. More... | |
| virtual const FieldInfo | fieldInfoAtIndex (size_t index) const noexcept=0 |
| Get details about a specific field. More... | |
| virtual const std::vector< FieldInfo > | allFieldsInfo () const noexcept=0 |
| Get all fields details, field which share a common name should appear only once. More... | |
| virtual void | fetchData (const Interests &interests, DataArray::Iterator current)=0 |
| Fetch the latest metrics. More... | |
| virtual void | computeDiff (const Interests &interests, DiffArray::Iterator diff, DataArray::ConstIterator current, DataArray::ConstIterator previous, double factor=1) noexcept=0 |
| Compute the variation (in appropriate unit) of metrics. More... | |
Protected Member Functions | |
| SourceBase () | |
| Protected default constructor. More... | |
| ~SourceBase () | |
| Protected default destructor. More... | |
Singleton abstract class, base class of all metric sources classes.
A subclass should override all methods of this class.
|
inlineprotected |
|
inlineprotected |
|
delete |
Deleted copy constructor.
|
pure virtualnoexcept |
Get all fields details, field which share a common name should appear only once.
Implemented in MetroCollect::MetricsSource::SourceEthtool, MetroCollect::MetricsSource::SourceProcStat, MetroCollect::MetricsSource::SourceProcNetDev, and MetroCollect::MetricsSource::SourceProcMeminfo.
|
pure virtualnoexcept |
Compute the variation (in appropriate unit) of metrics.
| interests | interests boolean array to know for which fields metrics variation should be computed |
| diff | iterator to write metrics variation to |
| current | iterator to read latest metrics from |
| previous | iterator to read previous metrics from |
| factor | factor to convert to unit per second, if relevant |
Implemented in MetroCollect::MetricsSource::SourceEthtool, MetroCollect::MetricsSource::SourceProcStat, MetroCollect::MetricsSource::SourceProcNetDev, and MetroCollect::MetricsSource::SourceProcMeminfo.
|
pure virtual |
Fetch the latest metrics.
| interests | boolean array to know for which fields metrics should be fetched |
| current | iterator to write metrics to |
Implemented in MetroCollect::MetricsSource::SourceEthtool, MetroCollect::MetricsSource::SourceProcStat, MetroCollect::MetricsSource::SourceProcNetDev, and MetroCollect::MetricsSource::SourceProcMeminfo.
|
pure virtualnoexcept |
Get the number of field the source has.
Implemented in MetroCollect::MetricsSource::SourceEthtool, MetroCollect::MetricsSource::SourceProcStat, MetroCollect::MetricsSource::SourceProcNetDev, and MetroCollect::MetricsSource::SourceProcMeminfo.
|
pure virtualnoexcept |
Get details about a specific field.
| index | index of the field to get details of |
Implemented in MetroCollect::MetricsSource::SourceEthtool, MetroCollect::MetricsSource::SourceProcStat, MetroCollect::MetricsSource::SourceProcNetDev, and MetroCollect::MetricsSource::SourceProcMeminfo.
|
pure virtualnoexcept |
Get the prefix by which all field names should begin with.
Implemented in MetroCollect::MetricsSource::SourceEthtool, MetroCollect::MetricsSource::SourceProcStat, MetroCollect::MetricsSource::SourceProcNetDev, and MetroCollect::MetricsSource::SourceProcMeminfo.
|
pure virtualnoexcept |
Search for fields associated to a specific name.
| fieldName | the name of the fields to search |
| interests | if the pointer is not nullptr, the interest bit corresponding to the fields will be set |
Implemented in MetroCollect::MetricsSource::SourceEthtool, MetroCollect::MetricsSource::SourceProcStat, MetroCollect::MetricsSource::SourceProcNetDev, and MetroCollect::MetricsSource::SourceProcMeminfo.
|
delete |
Deleted copy operator.