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
  • Method Details

    • executionStart

      @NonNull MarshallerMetricsCollector.Timer executionStart()
      Start timing the execution phase. When the execution completes, the client should call MarshallerMetricsCollector.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 call MarshallerMetricsCollector.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 metric
      value - 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