NodeLatencyStats
API should use metav1.MicroTime
instead of metav1.Time
for send / receive timestamps
#6571
Labels
area/api
Issues or PRs related to an API.
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
The API currently uses
metav1.Time
to represent timestamps:antrea/pkg/apis/stats/v1alpha1/types.go
Lines 177 to 180 in 1907856
That means that when the timestamps are marshalled, "second-level" precision is used, which reduces the usefulness of the timestamps. In a cluster with low latency, we will typically end up with the same values for
LastSendTime
andLastRecvTime
. These timestamps are not very important in themselves, and the latency data is provided byLastMeasuredRTTNanoseconds
. The main reason to have these timestamps is to detect that a peer has stopped responding to probes.In a future version of the API, we should consider updating the type for these timestamps to
metav1.MicroTime
, in which case they would be marshalled with "microsecond-level" precision.The text was updated successfully, but these errors were encountered: