# MetricsChecker.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/network/monitor/MetricsChecker.hpp"

# MetricsChecker

MetricsChecker checks oatpp::network::monitor::ConnectionStats if those are satisfy the rule.

namespace oatpp { namespace network { namespace monitor { 
  class MetricsChecker : public oatpp::base::Countable {}
}}}

# Methods

Return Type Name Summary
[none] ~MetricsChecker Default virtual destructor.
std::vector<oatpp::String> getMetricsList Get list of metrics names that are checked by this MetricsChecker.
std::shared_ptr<StatCollector> createStatCollector Create oatpp::network::monitor::StatCollector for given metricName.
bool check Called by oatpp::network::monitor::ConnectionMonitor on each

# MetricsChecker::~MetricsChecker

Default virtual destructor.

virtual ~MetricsChecker() = default

# MetricsChecker::getMetricsList

Get list of metrics names that are checked by this MetricsChecker.

  • @return

virtual std::vector<oatpp::String> getMetricsList() = 0

# MetricsChecker::createStatCollector

Create oatpp::network::monitor::StatCollector for given metricName. This method will be called by oatpp::network::monitor::ConnectionMonitor only if there is no such StatCollector registered in the ConnectionMonitor yet.

virtual std::shared_ptr<StatCollector> createStatCollector(const oatpp::String& metricName) = 0

# MetricsChecker::check

Called by oatpp::network::monitor::ConnectionMonitor on each time interval to check if connection satisfies the rule.

virtual bool check(const ConnectionStats& stats, v_int64 currMicroTime) = 0