Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: properly handle negative time counters #127

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

petrutlucian94
Copy link
Member

"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.

"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.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
@petrutlucian94 petrutlucian94 merged commit a3a9dd2 into cloudbase:main Jun 8, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant