public interface Metrics
Modifier and Type | Method and Description |
---|---|
void |
addGauge(String name,
MetricsVariable variable)
Adds a metrics-gauge to track variable.
|
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 |
startStoredScope(String name) |
void startStoredScope(String name) throws IOException
name
- starts a scope of a given name. Scopes is stored as thread-local variable.IOException
void endStoredScope(String name) throws IOException
name
- IOException
MetricsScope createScope(String name) throws IOException
name
- IOException
void endScope(MetricsScope scope) throws IOException
scope
- IOException
Long incrementCounter(String name) throws IOException
name
- IOException
Long incrementCounter(String name, long increment) throws IOException
name
- increment
- IOException
Long decrementCounter(String name) throws IOException
name
- IOException
Long decrementCounter(String name, long decrement) throws IOException
name
- decrement
- IOException
void addGauge(String name, MetricsVariable variable)
name
- name of gaugevariable
- variable to track.IOException
Copyright © 2016 The Apache Software Foundation. All rights reserved.