Package com.couchbase.client.dcp.metrics
Class ActionTimer
java.lang.Object
com.couchbase.client.dcp.metrics.ActionTimer
Tracks the results and of an action that can succeed or fail, along with elapsed time.
Instances are created via builder(io.micrometer.core.instrument.MeterRegistry, java.lang.String)
.
The tags match those used by CountedAspect
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ActionTimer.Builder
void
void
Increments the "failure" count.void
Increments the "success" count.void
track
(com.couchbase.client.core.deps.io.netty.util.concurrent.Future<?> f)
-
Method Details
-
builder
public static ActionTimer.Builder builder(io.micrometer.core.instrument.MeterRegistry registry, String name) -
track
public void track(com.couchbase.client.core.deps.io.netty.util.concurrent.Future<?> f) -
success
Increments the "success" count. -
failure
Increments the "failure" count.- Parameters:
reason
- (nullable) cause of the failure, or null if unknown
-
failure
-