Class OperationStats

java.lang.Object
ai.vespa.feed.client.OperationStats

public class OperationStats extends Object
Statistics for feed operations over HTTP against a Vespa cluster.
Author:
jonmv, bjorncs
  • Constructor Details

    • OperationStats

      public OperationStats(double duration, long requests, long exceptions, long inflight, long targetInFlight, long bytesSent, long averageLatencyMillis, long minLatencyMillis, long maxLatencyMillis, Map<Integer,OperationStats.Response> statsByCode)
  • Method Details

    • requests

      public long requests()
      Number of HTTP requests attempted.
    • responses

      public long responses()
      Number of HTTP responses received.
    • successes

      public long successes()
      Number of 200 OK HTTP responses received.
    • statsByCode

      public Map<Integer,OperationStats.Response> statsByCode()
      Statistics per response code.
    • duration

      public Duration duration()
    • response

      public Optional<OperationStats.Response> response(int code)
      Statistics for the given code.
    • exceptions

      public long exceptions()
      Number of exceptions (instead of responses).
    • inflight

      public long inflight()
      Number of attempted requests which haven't yielded a response or exception yet.
    • averageLatencyMillis

      public long averageLatencyMillis()
      Average request-response latency, or -1.
    • minLatencyMillis

      public long minLatencyMillis()
      Minimum request-response latency, or -1.
    • maxLatencyMillis

      public long maxLatencyMillis()
      Maximum request-response latency, or -1.
    • bytesSent

      public long bytesSent()
      Number of bytes sent, for HTTP requests with a response.
    • bytesReceived

      public long bytesReceived()
      Number of bytes received in HTTP responses.
    • operationAverageLatencyMillis

      public long operationAverageLatencyMillis()
      Operation latency is the time from the initial HTTP request is sent until the operation was successfully completed as observed by the client. Time spent on retrying the request will be included. Operations that eventually failed are not included.
      Returns:
      average latency in milliseconds
    • operationMinLatencyMillis

      public long operationMinLatencyMillis()
      Returns:
      minimum latency as milliseconds
      See Also:
    • operationMaxLatencyMillis

      public long operationMaxLatencyMillis()
      Returns:
      max latency as milliseconds
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object