Interface MarshallerMetricsCollector
public interface MarshallerMetricsCollector
A interface against which execution metrics can be recorded. Allows recording of execution and streaming as seperate
phases.
See
MetricsCollectingMarshaller
for example usage- Since:
- 5.8
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
An interface to allow clients to stop the timing -
Method Summary
Modifier and TypeMethodDescription@NonNull MarshallerMetricsCollector
addCustomMetric
(String name, long value) Records a custom metric, as required by the client code.@NonNull MarshallerMetricsCollector.Timer
Start timing the execution phase.void
publish()
Publishes the metrics collected so far by this collector@NonNull MarshallerMetricsCollector.Timer
Start timing the streaming phase.
-
Method Details
-
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
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
-