public interface Metrics
Modifier and Type | Method and Description |
---|---|
void |
addGauge(String name,
MetricsVariable variable)
Adds a metrics-gauge to track variable.
|
void |
addRatio(String name,
MetricsVariable<Integer> numerator,
MetricsVariable<Integer> denominator)
Add a ratio metric to track the correlation between two variables
|
void |
close()
Deinitializes the Metrics system.
|
MetricsScope |
createScope(String name)
Create scope with given name and returns it.
|
Long |
decrementCounter(String name)
Decrements a counter of the given name by 1.
|
Long |
decrementCounter(String name,
long decrement)
Decrements a counter of the given name by "decrement"
|
void |
endScope(MetricsScope scope)
Close the given scope.
|
void |
endStoredScope(String name)
Closes the stored scope of a given name.
|
Long |
incrementCounter(String name)
Increments a counter of the given name by 1.
|
Long |
incrementCounter(String name,
long increment)
Increments a counter of the given name by "increment"
|
void |
markMeter(String name)
Mark an event occurance for a meter.
|
void |
startStoredScope(String name) |
void startStoredScope(String name)
name
- starts a scope of a given name. Scopes is stored as thread-local variable.void endStoredScope(String name)
name
- MetricsScope createScope(String name)
name
- void endScope(MetricsScope scope)
scope
- Long incrementCounter(String name)
name
- Long incrementCounter(String name, long increment)
name
- increment
- Long decrementCounter(String name)
name
- Long decrementCounter(String name, long decrement)
name
- decrement
- void addGauge(String name, MetricsVariable variable)
name
- name of gaugevariable
- variable to track.void addRatio(String name, MetricsVariable<Integer> numerator, MetricsVariable<Integer> denominator)
name
- name of the ratio gaugenumerator
- numerator of the ratiodenominator
- denominator of the ratiovoid markMeter(String name)
name
- name of the meterCopyright © 2021 The Apache Software Foundation. All rights reserved.