Class OperationStats


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

      • OperationStats

        public OperationStats​(long requests,
                              Map<Integer,​Long> responsesByCode,
                              long exceptions,
                              long inflight,
                              long averageLatencyMillis,
                              long minLatencyMillis,
                              long maxLatencyMillis,
                              long bytesSent,
                              long bytesReceived)
    • Method Detail

      • since

        public OperationStats since​(OperationStats initial)
        Returns the difference between this and the initial. Min and max latency are not modified.
      • 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.
      • responsesByCode

        public Map<Integer,​Long> responsesByCode()
        Number of HTTP responses by status 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object