Record Class QuicConnection.Stats

java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.QuicConnection.Stats
Record Components:
rtt - the smoothed round-trip time (the initial estimate before a sample)
minRtt - the smallest round-trip time sampled, or zero before a sample
rttVariance - the round-trip time's variation, or zero before a sample
congestionWindow - the congestion window, in bytes
bytesInFlight - bytes sent and neither acknowledged nor deemed lost
mtu - the current path MTU
sentPackets - packets sent
sentBytes - bytes of datagrams sent (UDP payloads)
receivedPackets - packets received and authenticated
receivedBytes - bytes of datagrams received from the peer (UDP payloads)
lostPackets - packets deemed lost
lostBytes - bytes of packets deemed lost
probeTimeouts - probe timeouts (PTO) that fired
congestionEvents - congestion events, from loss or ECN
keyUpdates - key updates, by either side
migrations - moves to a new path: a server's that followed its client to a new address, a client's switches to a path it probed or rebound to
natRebindings - of the migrations, a server's to a new port of the client's address
strayDatagrams - datagrams from an address the connection takes no packets from (a server's before its handshake ends or with migration disabled, a client's from anywhere but its server and the path it probes), which were dropped
pathValidations - PATH_CHALLENGE frames from the peer, each answered
pathValidationFailures - validations of a new path that got no PATH_RESPONSE in time: a server's of its client's new address (it went back to the previous path), a client's probes
zeroRttAccepted - whether the server accepted 0-RTT data
zeroRttRejected - whether 0-RTT was attempted and not accepted
congestionController - the congestion controller: cubic, new_reno, bbr, or other for one of the application's
droppedDatagrams - datagrams dropped because the connection fell behind
Enclosing class:
QuicConnection

public static record QuicConnection.Stats(Duration rtt, Duration minRtt, Duration rttVariance, long congestionWindow, long bytesInFlight, int mtu, long sentPackets, long sentBytes, long receivedPackets, long receivedBytes, long lostPackets, long lostBytes, long probeTimeouts, long congestionEvents, long keyUpdates, long migrations, long natRebindings, long strayDatagrams, long pathValidations, long pathValidationFailures, boolean zeroRttAccepted, boolean zeroRttRejected, String congestionController, long droppedDatagrams) extends Record
Connection statistics.
  • Constructor Details

    • Stats

      public Stats(Duration rtt, Duration minRtt, Duration rttVariance, long congestionWindow, long bytesInFlight, int mtu, long sentPackets, long sentBytes, long receivedPackets, long receivedBytes, long lostPackets, long lostBytes, long probeTimeouts, long congestionEvents, long keyUpdates, long migrations, long natRebindings, long strayDatagrams, long pathValidations, long pathValidationFailures, boolean zeroRttAccepted, boolean zeroRttRejected, String congestionController, long droppedDatagrams)
      Creates an instance of a Stats record class.
      Parameters:
      rtt - the value for the rtt record component
      minRtt - the value for the minRtt record component
      rttVariance - the value for the rttVariance record component
      congestionWindow - the value for the congestionWindow record component
      bytesInFlight - the value for the bytesInFlight record component
      mtu - the value for the mtu record component
      sentPackets - the value for the sentPackets record component
      sentBytes - the value for the sentBytes record component
      receivedPackets - the value for the receivedPackets record component
      receivedBytes - the value for the receivedBytes record component
      lostPackets - the value for the lostPackets record component
      lostBytes - the value for the lostBytes record component
      probeTimeouts - the value for the probeTimeouts record component
      congestionEvents - the value for the congestionEvents record component
      keyUpdates - the value for the keyUpdates record component
      migrations - the value for the migrations record component
      natRebindings - the value for the natRebindings record component
      strayDatagrams - the value for the strayDatagrams record component
      pathValidations - the value for the pathValidations record component
      pathValidationFailures - the value for the pathValidationFailures record component
      zeroRttAccepted - the value for the zeroRttAccepted record component
      zeroRttRejected - the value for the zeroRttRejected record component
      congestionController - the value for the congestionController record component
      droppedDatagrams - the value for the droppedDatagrams record component
  • Method Details

    • of

      public static QuicConnection.Stats of(Connection connection)
      The statistics of a sans-I/O connection that the caller drives itself, and which no other thread uses meanwhile; droppedDatagrams() is 0.
      Parameters:
      connection - the connection
      Returns:
      its statistics
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rtt

      public Duration rtt()
      Returns the value of the rtt record component.
      Returns:
      the value of the rtt record component
    • minRtt

      public Duration minRtt()
      Returns the value of the minRtt record component.
      Returns:
      the value of the minRtt record component
    • rttVariance

      public Duration rttVariance()
      Returns the value of the rttVariance record component.
      Returns:
      the value of the rttVariance record component
    • congestionWindow

      public long congestionWindow()
      Returns the value of the congestionWindow record component.
      Returns:
      the value of the congestionWindow record component
    • bytesInFlight

      public long bytesInFlight()
      Returns the value of the bytesInFlight record component.
      Returns:
      the value of the bytesInFlight record component
    • mtu

      public int mtu()
      Returns the value of the mtu record component.
      Returns:
      the value of the mtu record component
    • sentPackets

      public long sentPackets()
      Returns the value of the sentPackets record component.
      Returns:
      the value of the sentPackets record component
    • sentBytes

      public long sentBytes()
      Returns the value of the sentBytes record component.
      Returns:
      the value of the sentBytes record component
    • receivedPackets

      public long receivedPackets()
      Returns the value of the receivedPackets record component.
      Returns:
      the value of the receivedPackets record component
    • receivedBytes

      public long receivedBytes()
      Returns the value of the receivedBytes record component.
      Returns:
      the value of the receivedBytes record component
    • lostPackets

      public long lostPackets()
      Returns the value of the lostPackets record component.
      Returns:
      the value of the lostPackets record component
    • lostBytes

      public long lostBytes()
      Returns the value of the lostBytes record component.
      Returns:
      the value of the lostBytes record component
    • probeTimeouts

      public long probeTimeouts()
      Returns the value of the probeTimeouts record component.
      Returns:
      the value of the probeTimeouts record component
    • congestionEvents

      public long congestionEvents()
      Returns the value of the congestionEvents record component.
      Returns:
      the value of the congestionEvents record component
    • keyUpdates

      public long keyUpdates()
      Returns the value of the keyUpdates record component.
      Returns:
      the value of the keyUpdates record component
    • migrations

      public long migrations()
      Returns the value of the migrations record component.
      Returns:
      the value of the migrations record component
    • natRebindings

      public long natRebindings()
      Returns the value of the natRebindings record component.
      Returns:
      the value of the natRebindings record component
    • strayDatagrams

      public long strayDatagrams()
      Returns the value of the strayDatagrams record component.
      Returns:
      the value of the strayDatagrams record component
    • pathValidations

      public long pathValidations()
      Returns the value of the pathValidations record component.
      Returns:
      the value of the pathValidations record component
    • pathValidationFailures

      public long pathValidationFailures()
      Returns the value of the pathValidationFailures record component.
      Returns:
      the value of the pathValidationFailures record component
    • zeroRttAccepted

      public boolean zeroRttAccepted()
      Returns the value of the zeroRttAccepted record component.
      Returns:
      the value of the zeroRttAccepted record component
    • zeroRttRejected

      public boolean zeroRttRejected()
      Returns the value of the zeroRttRejected record component.
      Returns:
      the value of the zeroRttRejected record component
    • congestionController

      public String congestionController()
      Returns the value of the congestionController record component.
      Returns:
      the value of the congestionController record component
    • droppedDatagrams

      public long droppedDatagrams()
      Returns the value of the droppedDatagrams record component.
      Returns:
      the value of the droppedDatagrams record component