Package io.github.mahmoudimus.quic
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 samplerttVariance- the round-trip time's variation, or zero before a samplecongestionWindow- the congestion window, in bytesbytesInFlight- bytes sent and neither acknowledged nor deemed lostmtu- the current path MTUsentPackets- packets sentsentBytes- bytes of datagrams sent (UDP payloads)receivedPackets- packets received and authenticatedreceivedBytes- bytes of datagrams received from the peer (UDP payloads)lostPackets- packets deemed lostlostBytes- bytes of packets deemed lostprobeTimeouts- probe timeouts (PTO) that firedcongestionEvents- congestion events, from loss or ECNkeyUpdates- key updates, by either sidemigrations- 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 tonatRebindings- of the migrations, a server's to a new port of the client's addressstrayDatagrams- 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 droppedpathValidations- PATH_CHALLENGE frames from the peer, each answeredpathValidationFailures- 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 probeszeroRttAccepted- whether the server accepted 0-RTT datazeroRttRejected- whether 0-RTT was attempted and not acceptedcongestionController- the congestion controller:cubic,new_reno,bbr, orotherfor one of the application'sdroppedDatagrams- 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 Summary
ConstructorsConstructorDescriptionStats(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 aStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thebytesInFlightrecord component.Returns the value of thecongestionControllerrecord component.longReturns the value of thecongestionEventsrecord component.longReturns the value of thecongestionWindowrecord component.longReturns the value of thedroppedDatagramsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thekeyUpdatesrecord component.longReturns the value of thelostBytesrecord component.longReturns the value of thelostPacketsrecord component.longReturns the value of themigrationsrecord component.minRtt()Returns the value of theminRttrecord component.intmtu()Returns the value of themturecord component.longReturns the value of thenatRebindingsrecord component.static QuicConnection.Statsof(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.longReturns the value of thepathValidationFailuresrecord component.longReturns the value of thepathValidationsrecord component.longReturns the value of theprobeTimeoutsrecord component.longReturns the value of thereceivedBytesrecord component.longReturns the value of thereceivedPacketsrecord component.rtt()Returns the value of therttrecord component.Returns the value of therttVariancerecord component.longReturns the value of thesentBytesrecord component.longReturns the value of thesentPacketsrecord component.longReturns the value of thestrayDatagramsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thezeroRttAcceptedrecord component.booleanReturns the value of thezeroRttRejectedrecord component.
-
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 aStatsrecord class.- Parameters:
rtt- the value for therttrecord componentminRtt- the value for theminRttrecord componentrttVariance- the value for therttVariancerecord componentcongestionWindow- the value for thecongestionWindowrecord componentbytesInFlight- the value for thebytesInFlightrecord componentmtu- the value for themturecord componentsentPackets- the value for thesentPacketsrecord componentsentBytes- the value for thesentBytesrecord componentreceivedPackets- the value for thereceivedPacketsrecord componentreceivedBytes- the value for thereceivedBytesrecord componentlostPackets- the value for thelostPacketsrecord componentlostBytes- the value for thelostBytesrecord componentprobeTimeouts- the value for theprobeTimeoutsrecord componentcongestionEvents- the value for thecongestionEventsrecord componentkeyUpdates- the value for thekeyUpdatesrecord componentmigrations- the value for themigrationsrecord componentnatRebindings- the value for thenatRebindingsrecord componentstrayDatagrams- the value for thestrayDatagramsrecord componentpathValidations- the value for thepathValidationsrecord componentpathValidationFailures- the value for thepathValidationFailuresrecord componentzeroRttAccepted- the value for thezeroRttAcceptedrecord componentzeroRttRejected- the value for thezeroRttRejectedrecord componentcongestionController- the value for thecongestionControllerrecord componentdroppedDatagrams- the value for thedroppedDatagramsrecord component
-
-
Method Details
-
of
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
rtt
Returns the value of therttrecord component.- Returns:
- the value of the
rttrecord component
-
minRtt
Returns the value of theminRttrecord component.- Returns:
- the value of the
minRttrecord component
-
rttVariance
Returns the value of therttVariancerecord component.- Returns:
- the value of the
rttVariancerecord component
-
congestionWindow
public long congestionWindow()Returns the value of thecongestionWindowrecord component.- Returns:
- the value of the
congestionWindowrecord component
-
bytesInFlight
public long bytesInFlight()Returns the value of thebytesInFlightrecord component.- Returns:
- the value of the
bytesInFlightrecord component
-
mtu
public int mtu()Returns the value of themturecord component.- Returns:
- the value of the
mturecord component
-
sentPackets
public long sentPackets()Returns the value of thesentPacketsrecord component.- Returns:
- the value of the
sentPacketsrecord component
-
sentBytes
public long sentBytes()Returns the value of thesentBytesrecord component.- Returns:
- the value of the
sentBytesrecord component
-
receivedPackets
public long receivedPackets()Returns the value of thereceivedPacketsrecord component.- Returns:
- the value of the
receivedPacketsrecord component
-
receivedBytes
public long receivedBytes()Returns the value of thereceivedBytesrecord component.- Returns:
- the value of the
receivedBytesrecord component
-
lostPackets
public long lostPackets()Returns the value of thelostPacketsrecord component.- Returns:
- the value of the
lostPacketsrecord component
-
lostBytes
public long lostBytes()Returns the value of thelostBytesrecord component.- Returns:
- the value of the
lostBytesrecord component
-
probeTimeouts
public long probeTimeouts()Returns the value of theprobeTimeoutsrecord component.- Returns:
- the value of the
probeTimeoutsrecord component
-
congestionEvents
public long congestionEvents()Returns the value of thecongestionEventsrecord component.- Returns:
- the value of the
congestionEventsrecord component
-
keyUpdates
public long keyUpdates()Returns the value of thekeyUpdatesrecord component.- Returns:
- the value of the
keyUpdatesrecord component
-
migrations
public long migrations()Returns the value of themigrationsrecord component.- Returns:
- the value of the
migrationsrecord component
-
natRebindings
public long natRebindings()Returns the value of thenatRebindingsrecord component.- Returns:
- the value of the
natRebindingsrecord component
-
strayDatagrams
public long strayDatagrams()Returns the value of thestrayDatagramsrecord component.- Returns:
- the value of the
strayDatagramsrecord component
-
pathValidations
public long pathValidations()Returns the value of thepathValidationsrecord component.- Returns:
- the value of the
pathValidationsrecord component
-
pathValidationFailures
public long pathValidationFailures()Returns the value of thepathValidationFailuresrecord component.- Returns:
- the value of the
pathValidationFailuresrecord component
-
zeroRttAccepted
public boolean zeroRttAccepted()Returns the value of thezeroRttAcceptedrecord component.- Returns:
- the value of the
zeroRttAcceptedrecord component
-
zeroRttRejected
public boolean zeroRttRejected()Returns the value of thezeroRttRejectedrecord component.- Returns:
- the value of the
zeroRttRejectedrecord component
-
congestionController
Returns the value of thecongestionControllerrecord component.- Returns:
- the value of the
congestionControllerrecord component
-
droppedDatagrams
public long droppedDatagrams()Returns the value of thedroppedDatagramsrecord component.- Returns:
- the value of the
droppedDatagramsrecord component
-