public static class Gauge.Child extends Object
Warning: References to a Child become invalid after using
SimpleCollector.remove(java.lang.String...) or SimpleCollector.clear(),
| Constructor and Description |
|---|
Gauge.Child() |
| Modifier and Type | Method and Description |
|---|---|
void |
dec()
Decrement the gauge by 1.
|
void |
dec(double amt)
Decrement the gauge by the given amount.
|
double |
get()
Get the value of the gauge.
|
void |
inc()
Increment the gauge by 1.
|
void |
inc(double amt)
Increment the gauge by the given amount.
|
void |
set(double val)
Set the gauge to the given value.
|
void |
setToCurrentTime()
Set the gauge to the current unixtime.
|
Gauge.Timer |
startTimer()
Start a timer to track a duration.
|
public void inc()
public void inc(double amt)
public void dec()
public void dec(double amt)
public void set(double val)
public void setToCurrentTime()
public Gauge.Timer startTimer()
Call Gauge.Timer.setDuration() at the end of what you want to measure the duration of.
This is primarily useful for tracking the durations of major steps of batch jobs,
which are then pushed to a io.prometheus.client.exporter.PushGateway.
For tracking other durations/latencies you should usually use a Summary.
public double get()
Copyright © 2015. All rights reserved.