Classes
Methods
# assignUniqueContextId(context) → {IMetricContext}
Assigns a unique ID to the context object, returning it back.
Parameters:
Name | Type | Description |
---|---|---|
context |
IMetricContext
|
The context to modify. |
The provided context.
IMetricContext
# decrement(metricName, context, amount)
Decrements a metric.
Parameters:
Name | Type | Description |
---|---|---|
metricName |
string
|
The metric name. |
context |
IMetricContext
|
The metric context. Expected to have a unique ID. |
amount |
number
|
The amount. |
# end(metricName, context)
Ends a timer on a metric.
Parameters:
Name | Type | Description |
---|---|---|
metricName |
string
|
The metric name. |
context |
IMetricContext
|
The metric context. Expected to have a unique ID. |
# increment(metricName, context, amount)
Increments a metric.
Parameters:
Name | Type | Description |
---|---|---|
metricName |
string
|
The metric name. |
context |
IMetricContext
|
The metric context. Expected to have a unique ID. |
amount |
number
|
The amount. |
# registerListener(listener)
Registers a metric listener.
Parameters:
Name | Type | Description |
---|---|---|
listener |
IMetricListener
|
The listener. |
# reset(metricName, context)
Resets a metric.
Parameters:
Name | Type | Description |
---|---|---|
metricName |
string
|
The metric name. |
context |
IMetricContext
|
The metric context. Expected to have a unique ID. |
# start(metricName, context)
Starts a timer on a metric.
Parameters:
Name | Type | Description |
---|---|---|
metricName |
string
|
The metric name. |
context |
IMetricContext
|
The metric context. Expected to have a unique ID. |
# unregisterListener(listener)
De-registers a metric listener.
Parameters:
Name | Type | Description |
---|---|---|
listener |
IMetricListener
|
The listener. |