Class RestRequestMetricsTracker.ScalingMetricsTracker

  • Enclosing class:
    RestRequestMetricsTracker

    public static class RestRequestMetricsTracker.ScalingMetricsTracker
    extends java.lang.Object
    Helper for updating scaling related metrics. These metrics are updated in the classes that provide scaling capabilities when transferring control from NioServer to RestRequestService.
    • Constructor Detail

      • ScalingMetricsTracker

        public ScalingMetricsTracker()
    • Method Detail

      • addToRequestProcessingTime

        public long addToRequestProcessingTime​(long delta)
        Adds to the time taken to process a request at the scaling layer.
        Parameters:
        delta - the time taken in ms to do the current piece of processing at the scaling layer for the request.
        Returns:
        the total time taken in ms to process this request at the scaling layer, including the current piece, at this moment.
      • addToRequestProcessingWaitTime

        public long addToRequestProcessingWaitTime​(long delta)
        Adds to the scaling layer processing wait time for a request.
        Parameters:
        delta - the time in ms a request has spent waiting to be processed at the scaling layer.
        Returns:
        the total time in ms this request has spent waiting to be processed at the scaling layer at this moment.
      • addToResponseProcessingTime

        public long addToResponseProcessingTime​(long delta)
        Adds to the time taken to process a response at the scaling layer.
        Parameters:
        delta - the time taken in ms to do the current piece of processing at the scaling layer for the response.
        Returns:
        the total time taken in ms to process the response at the scaling layer, including the current piece, at this moment.
      • addToResponseProcessingWaitTime

        public long addToResponseProcessingWaitTime​(long delta)
        Adds to the scaling layer processing wait time of a response.
        Parameters:
        delta - the time in ms a response has spent waiting to be processed at the scaling layer.
        Returns:
        the total time in ms this response has spent waiting to be processed at the scaling layer at this moment.
      • markRequestReceived

        public void markRequestReceived()
        Marks the time at which the request was received.
      • markRequestCompleted

        public void markRequestCompleted()
        Marks the time at which request was completed so that request RTT can be calculated.