Class OperationStats


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

      Constructors 
      Constructor Description
      OperationStats​(long requests, java.util.Map<java.lang.Integer,​java.lang.Long> responsesByCode, long exceptions, long inflight, long averageLatencyMillis, long minLatencyMillis, long maxLatencyMillis, long bytesSent, long bytesReceived)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long averageLatencyMillis()
      Average request-response latency, or -1.
      long bytesReceived()
      Number of bytes received in HTTP responses.
      long bytesSent()
      Number of bytes sent, for HTTP requests with a response.
      boolean equals​(java.lang.Object o)  
      long exceptions()
      Number of exceptions (instead of responses).
      int hashCode()  
      long inflight()
      Number of attempted requests which haven't yielded a response or exception yet.
      long maxLatencyMillis()
      Maximum request-response latency, or -1.
      long minLatencyMillis()
      Minimum request-response latency, or -1.
      long requests()
      Number of HTTP requests attempted.
      long responses()
      Number of HTTP responses received.
      java.util.Map<java.lang.Integer,​java.lang.Long> responsesByCode()
      Number of HTTP responses by status code.
      OperationStats since​(OperationStats initial)
      Returns the difference between this and the initial.
      long successes()
      Number of 200 OK HTTP responses received.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OperationStats

        public OperationStats​(long requests,
                              java.util.Map<java.lang.Integer,​java.lang.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 java.util.Map<java.lang.Integer,​java.lang.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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object