Interface MarshallerMetricsCollector
-
public interface MarshallerMetricsCollectorA interface against which execution metrics can be recorded. Allows recording of execution and streaming as seperate phases. SeeMetricsCollectingMarshallerfor example usage- Since:
- 5.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMarshallerMetricsCollector.TimerAn interface to allow clients to stop the timing
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull MarshallerMetricsCollectoraddCustomMetric(String name, long value)Records a custom metric, as required by the client code.@NonNull MarshallerMetricsCollector.TimerexecutionStart()Start timing the execution phase.voidpublish()Publishes the metrics collected so far by this collector@NonNull MarshallerMetricsCollector.TimerstreamingStart()Start timing the streaming phase.
-
-
-
Method Detail
-
executionStart
@NonNull MarshallerMetricsCollector.Timer executionStart()
Start timing the execution phase. When the execution completes, the client should callMarshallerMetricsCollector.Timer.stop()- Returns:
- A timer for use by the client
-
streamingStart
@NonNull MarshallerMetricsCollector.Timer streamingStart()
Start timing the streaming phase. When the execution completes, the client should callMarshallerMetricsCollector.Timer.stop()- Returns:
- A timer for use by the client
-
addCustomMetric
@NonNull MarshallerMetricsCollector addCustomMetric(String name, long value)
Records a custom metric, as required by the client code. This allows the client to record arbitrary numeric metrics.- Parameters:
name- The name of the custom metricvalue- The numeric value of the custom metric- Returns:
- the current collector object
- Throws:
IllegalStateException- if a metric by that name has already been recorded by this collector
-
publish
void publish()
Publishes the metrics collected so far by this collector
-
-