#include <Controller.h>
|
void | updateSources () noexcept |
| Updates sources (fetches file contents and executes commands) More...
|
|
void | computeMatches () noexcept |
| For each line of each source, executes the source's expressions to find matches. More...
|
|
void | parseData (const Source &source, const std::cmatch &match, const Matcher &matcher) noexcept |
| Updates metrics from a match. More...
|
|
Definition at line 43 of file Controller.h.
◆ Controller()
◆ availableMetrics()
std::vector< const Metric * > AnyCollect::Controller::availableMetrics |
( |
| ) |
|
|
noexcept |
Returns the array of all currently matching metrics on the system, without their values.
- Returns
- metrics currently available on the system
Definition at line 108 of file Controller.cc.
◆ collectMetrics()
void AnyCollect::Controller::collectMetrics |
( |
| ) |
|
|
noexcept |
◆ computeMatches()
void AnyCollect::Controller::computeMatches |
( |
| ) |
|
|
protectednoexcept |
For each line of each source, executes the source's expressions to find matches.
Definition at line 170 of file Controller.cc.
◆ delegate()
Returns the controller's delegate.
Definition at line 40 of file Controller.cc.
◆ isCollecting()
bool AnyCollect::Controller::isCollecting |
( |
| ) |
const |
|
noexcept |
Returns whether the controller is collecting metrics.
Definition at line 45 of file Controller.cc.
◆ loadConfigFromFile()
void AnyCollect::Controller::loadConfigFromFile |
( |
const std::string & |
configPath | ) |
|
Configures sources, expressions and matchers according to config file.
- Parameters
-
configPath | the config file path |
Definition at line 54 of file Controller.cc.
◆ parseData()
void AnyCollect::Controller::parseData |
( |
const Source & |
source, |
|
|
const std::cmatch & |
match, |
|
|
const Matcher & |
matcher |
|
) |
| |
|
protectednoexcept |
Updates metrics from a match.
- Parameters
-
source | the Matcher's source |
match | the results of the expression's matching |
matcher | the Matcher object to create a metric from |
Definition at line 193 of file Controller.cc.
◆ samplingInterval()
std::chrono::seconds AnyCollect::Controller::samplingInterval |
( |
| ) |
const |
|
noexcept |
Returns the metrics sampling interval.
Definition at line 49 of file Controller.cc.
◆ setSamplingInterval()
void AnyCollect::Controller::setSamplingInterval |
( |
std::chrono::seconds |
interval | ) |
|
|
noexcept |
Sets the metrics sampling interval.
Definition at line 96 of file Controller.cc.
◆ updateSources()
void AnyCollect::Controller::updateSources |
( |
| ) |
|
|
protectednoexcept |
Updates sources (fetches file contents and executes commands)
Definition at line 165 of file Controller.cc.
◆ defaultSamplingInterval
constexpr std::chrono::seconds AnyCollect::Controller::defaultSamplingInterval = 10s |
|
static |
◆ delegate_
Delegate to alert when something happens.
Definition at line 52 of file Controller.h.
◆ expressions_
std::vector<std::shared_ptr<Expression> > AnyCollect::Controller::expressions_ |
|
protected |
◆ isCollecting_
bool AnyCollect::Controller::isCollecting_ |
|
protected |
Whether the receiver is collecting metrics.
Definition at line 54 of file Controller.h.
◆ matchers_
std::vector<std::shared_ptr<Matcher> > AnyCollect::Controller::matchers_ |
|
protected |
◆ metrics_
std::map<size_t, Metric> AnyCollect::Controller::metrics_ |
|
protected |
Map associating keys to their metric.
Definition at line 62 of file Controller.h.
◆ roundKey_
size_t AnyCollect::Controller::roundKey_ |
|
protected |
◆ samplingInterval_
std::chrono::seconds AnyCollect::Controller::samplingInterval_ |
|
protected |
Metrics sampling interval.
Definition at line 55 of file Controller.h.
◆ sources_
std::vector<std::shared_ptr<Source> > AnyCollect::Controller::sources_ |
|
protected |
◆ unitsPerSecondFactor_
double AnyCollect::Controller::unitsPerSecondFactor_ |
|
protected |
Factor to convert metric differences to units per second.
Definition at line 56 of file Controller.h.
◆ updatedMetrics_
std::vector<const Metric*> AnyCollect::Controller::updatedMetrics_ |
|
protected |
Array of pointers to the iteration's metrics.
Definition at line 63 of file Controller.h.
The documentation for this class was generated from the following files: