Package io.prometheus.client
Class Summary.Timer
- java.lang.Object
-
- io.prometheus.client.Summary.Timer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- Summary
public static class Summary.Timer extends Object implements Closeable
Represents an event being timed.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Equivalent to callingobserveDuration().doubleobserveDuration()Observe the amount of time in seconds sinceSummary.Child.startTimer()was called.
-
-
-
Method Detail
-
observeDuration
public double observeDuration()
Observe the amount of time in seconds sinceSummary.Child.startTimer()was called.- Returns:
- Measured duration in seconds since
Summary.Child.startTimer()was called.
-
close
public void close()
Equivalent to callingobserveDuration().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-