Apache REEF  0.16.0
Retainable Evaluator Execution Framework
Classes | Public Member Functions | Properties | List of all members
Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl Class Reference

Default implementation of IMetricsSource. More...

Inherits Org.Apache.REEF.Common.Metrics.Api.IMetricsSource, and IDisposable.

Public Member Functions

void AddTag (string name, string desc, string value)
 Adds a tag to the source. More...
 
MetricsTag GetTag (string name)
 Returns tag by name. More...
 
IDisposable Subscribe (IObserver< SnapshotRequest > observer)
 Subscribes the MutableMetricBase whose snapshot will be taken. More...
 
void GetMetrics (IMetricsCollector collector, bool all)
 Gets metrics from the source. More...
 
void Dispose ()
 Diposes the DefaultMetricsSourceImpl. More...
 

Properties

IMetricContainer< ICounterCounters [get]
 Returns indexable counters container. More...
 
IMetricContainer< ILongGaugeLongGauges [get]
 Returns indexable long guage container. More...
 
IMetricContainer< IDoubleGaugeDoubleGauges [get]
 Returns indexable double gauge container. More...
 
IMetricContainer< IRateRates [get]
 Returns indexable double gauge container. More...
 

Detailed Description

Default implementation of IMetricsSource.

Contains user friendly aceess to add and update metrics. Can be extended or totally ignored by the user.

Member Function Documentation

◆ AddTag()

void Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.AddTag ( string  name,
string  desc,
string  value 
)
inline

Adds a tag to the source.

Replaces old one if it exists.

Parameters
nameName of the tag.
descDescription of the tag.
valueValue of the tag.

◆ Dispose()

void Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.Dispose ( )
inline

Diposes the DefaultMetricsSourceImpl.

Removes all the observers.

◆ GetMetrics()

void Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.GetMetrics ( IMetricsCollector  collector,
bool  all 
)
inline

Gets metrics from the source.

Parameters
collectorCollector that stores the resulting metrics snapshot as records.
allIf true, gets metric values even if they are unchanged.

Implements Org.Apache.REEF.Common.Metrics.Api.IMetricsSource.

◆ GetTag()

MetricsTag Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.GetTag ( string  name)
inline

Returns tag by name.

Parameters
nameName of the tag.
Returns
Tag if it exists, null otherwise.

◆ Subscribe()

IDisposable Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.Subscribe ( IObserver< SnapshotRequest observer)
inline

Subscribes the MutableMetricBase whose snapshot will be taken.

This function will be used if user has its own metric types except from the ones used in this class. For example, a ML algorithm can subscribe itself as observer, and directly add metric vlaues like iterations, loss function etc. in the record.

Parameters
observerObserver that takes snapshot of the metric.
Returns
A disposable handler used to unsubscribe the observer.

Property Documentation

◆ Counters

IMetricContainer<ICounter> Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.Counters
get

Returns indexable counters container.

◆ DoubleGauges

IMetricContainer<IDoubleGauge> Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.DoubleGauges
get

Returns indexable double gauge container.

◆ LongGauges

IMetricContainer<ILongGauge> Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.LongGauges
get

Returns indexable long guage container.

◆ Rates

IMetricContainer<IRate> Org.Apache.REEF.Common.Metrics.MutableMetricsLayer.DefaultMetricsSourceImpl.Rates
get

Returns indexable double gauge container.


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