Class AggregatedMetric
Defined in File AggregatedMetric.hpp
Class Documentation
-
class Microsoft::Applications::Events::Models::AggregatedMetric
The AggregatedMetric class represents an aggregated metric event.
Public Functions
-
AggregatedMetric(std::string const &name, std::string const &units, unsigned const intervalInSec, EventProperties const &eventProperties, ILogger *pLogger = NULL)
An AggregatedMetric constructor.
Creates an aggregated metric instance for logging auto-aggregated metrics.
- Parameters
name – A string that contains the name of the auto-aggregated metric.
units – A string that contains the units of the auto-aggregated metric.
intervalInSec – The polling cadence (in seconds) used to aggregate the metric.
eventProperties – The properties of the auto-aggregated metric event, as an EventProperties object.
pLogger – An ILogger interface pointer used to log this aggregated metric.
-
AggregatedMetric(std::string const &name, std::string const &units, unsigned const intervalInSec, std::string const &instanceName, std::string const &objectClass, std::string const &objectId, EventProperties const &eventProperties, ILogger *pLogger = NULL)
AggregatedMetric AggregatedMetric constructor that also takes an instance name, an object class, and an object ID.
Creates an aggregated metric instance for logging auto-aggregated metrics.
- Parameters
name – A string that contains the name of the auto-aggregated metric.
units – A string that contains the units of the auto-aggregated metric.
intervalInSec – The polling cadence (in seconds) used to aggregate the metric.
instanceName – A string that contains the name of this metric instance - like for performance counter.
objectClass – A string that contains the object class for which this metric is trackings.
objectId – A string that contains the object ID for which this metric is trackings.
eventProperties – The properties of the auto-aggregated metric event, as an EventProperties object.
pLogger – An ILogger interface pointer used to log this aggregated metric.
-
~AggregatedMetric()
The AggregatedMetric destructor.
-
void PushMetric(double value)
Pushes a single metric value for auto-aggregation.
- Parameters
value – The metric value to push.
-
AggregatedMetric(std::string const &name, std::string const &units, unsigned const intervalInSec, EventProperties const &eventProperties, ILogger *pLogger = NULL)