Interface IMeter
A meter measures the rate at which a set of events occur, in a few different ways. The mean rate is the average rate of events. It’s generally useful for trivia, but as it represents the total rate for your application’s entire lifetime (e.g., the total number of requests handled, divided by the number of seconds the process has been running), it doesn’t offer a sense of recency. Luckily, meters also record three different exponentially-weighted moving average rates: the 1-, 5-, and 15-minute moving averages.
Namespace:App.Metrics.Meter.Abstractions
Assembly:cs.temp.dll.dll
Syntax
public interface IMeter : IResetableMetric
Methods
Mark()
Mark the occurrence of an event.
Declaration
void Mark()
Mark(MetricSetItem)
Mark the occurrence of an event for an item in a set. The total rate of the event is updated, but the meter will also keep track and update a specific rate for each setItem registered. The meter value will contain the total rate and for each registered item the specific rate and percentage of total count.
Declaration
void Mark(MetricSetItem setItem)
Parameters
Type | Name | Description |
---|---|---|
MetricSetItem | setItem | Item from the set for which to record the event. |
Mark(MetricSetItem, Int64)
Mark the occurrence of an event for an item in a set. The total rate of the event is updated, but the meter will also keep track and update a specific rate for each setItem registered. The meter value will contain the total rate and for each registered item the specific rate and percentage of total count.
Declaration
void Mark(MetricSetItem setItem, long amount)
Parameters
Type | Name | Description |
---|---|---|
MetricSetItem | setItem | Item from the set for which to record the event. |
System.Int64 | amount | The amount to mark the meter. |
Mark(Int64)
Mark the occurrence of amount events.
Declaration
void Mark(long amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | amount | The amount. |
Mark(String)
Mark the occurrence of an event for an item in a set. The total rate of the event is updated, but the meter will also keep track and update a specific rate for each item registered. The meter value will contain the total rate and for each registered item the specific rate and percentage of total count.
Declaration
void Mark(string item)
Parameters
Type | Name | Description |
---|---|---|
System.String | item | Item from the set for which to record the event. |
Mark(String, Int64)
Mark the occurrence of amount events for an item in a set. The total rate of the event is updated, but the meter will also keep track and update a specific rate for each item registered. The meter value will contain the total rate and for each registered item the specific rate and percentage of total count.
Declaration
void Mark(string item, long amount)
Parameters
Type | Name | Description |
---|---|---|
System.String | item | Item from the set for which to record the events. |
System.Int64 | amount | The amount. |