Open sandboxFocusImprove this doc
  • Article

Namespace Metalama.Framework.Metrics

This namespace enables you to consume and implement metrics.

To consume a metric, begin with a declaration, then call the extension method MetricsExtensions.Metric. Afterward, call Get.

Class Diagram

extension methods
exposes
exposes
implements
implements
implements
computes
computes
applies to
IMeasurable
IDeclaration
IMetric<TMeasurable>
YourCustomMetric
«sdk»
YourCustomMetricProvider
IMetricProvider<TMetric>
GetMetric(IMeasurable)
Metrics<TMeasurable>
Get()
«extension class»
MetricsExtensions
Metrics()

Namespace members

Classes

MetricsExtensions

Exposes metrics to eligible objects.

Structs

Metrics<TMeasurable>

Exposes a Get<TExtension>() method, which computes and returns a metric for an eligible object.

Interfaces

IMeasurable

Base interface for objects that can be extended with metrics.

IMetric

A weakly-typed base interface for IMetric<T>. Never implement directly. Always implement IMetric<T>.

IMetricProvider<T>

Implements the computation or reading of a metric.

IMetric<T>

Base interface for all metrics. This interface exists only for strong typing. It does not have any members.