Package io.prometheus.client
Class Counter.Child
- java.lang.Object
-
- io.prometheus.client.Counter.Child
-
- Enclosing class:
- Counter
public static class Counter.Child extends Object
The value of a single Counter.Warning: References to a Child become invalid after using
SimpleCollector.remove(java.lang.String...)orSimpleCollector.clear(),
-
-
Constructor Summary
Constructors Constructor Description Child()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleget()Get the value of the counter.voidinc()Increment the counter by 1.voidinc(double amt)Increment the counter by the given amount.
-
-
-
Constructor Detail
-
Child
public Child()
-
-
Method Detail
-
inc
public void inc()
Increment the counter by 1.
-
inc
public void inc(double amt)
Increment the counter by the given amount.- Throws:
IllegalArgumentException- If amt is negative.
-
get
public double get()
Get the value of the counter.
-
-