cloudbase / wnbd

Windows Ceph RBD NBD driver
GNU Lesser General Public License v2.1
57 stars 26 forks source link

client: properly handle negative time counters #127

Closed petrutlucian94 closed 1 year ago

petrutlucian94 commented 1 year ago

"wnbd-client stats" now reports a few time counters, such as "TimeSinceLastReceivedReqMs". Those counters have a ~15ms accuracy, so for really short intervals we can end up with a negative value when comparing with the current timestamp:

  TimeSinceLastReceivedReqMs     : 18446744073709551604
  TimeSinceLastSubmittedReqMs    : 18446744073709551604
  TimeSinceLastReplyMs           : 18446744073709551604

This patch will translate such intervals to 0.