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

Move to 1us resolution for latency measurements #136

Merged
merged 4 commits into from
Jul 11, 2020

Conversation

tycho
Copy link
Contributor

@tycho tycho commented Sep 30, 2018

A few fixes:

  • The -z debug flag was implemented but not accepted by getopt_long. I added it.
  • The -z debug flag only accepted a decimal argument, and since the argument is a bitfield, I made it possible to take a hex argument, i.e. 0xffff enables all debug bits.

And the most important part:

@tycho
Copy link
Contributor Author

tycho commented Sep 30, 2018

Hm. Hold up on this for a bit. My SO_TIMESTAMPNS thing doesn't seem to work correctly yet.

@tycho
Copy link
Contributor Author

tycho commented Sep 30, 2018

Looks like SO_TIMESTAMPNS always uses CLOCK_REALTIME instead of CLOCK_MONOTONIC, so the numbers don't line up:

timestampns: 1538342854 527430214
clock_gettime: 5419 195062250
timestampns: 1538342855 528457016
clock_gettime: 5420 196056278

Bummer. CLOCK_MONOTONIC tends to have better quality. I'll make it use CLOCK_MONOTONIC only if the builder has opted out of using the SO_TIMESTAMPNS feature.

@luckman212
Copy link

@tycho Any time to check into the build errors so your PR can be merged?

@tycho tycho force-pushed the high-resolution-clock-sources branch from 9add781 to ec43d24 Compare February 27, 2020 16:04
@tycho
Copy link
Contributor Author

tycho commented Feb 27, 2020

Well, I assume you're referring to the Travis CI errors.

I've fixed those now:

  • I was enqueuing the targets incorrectly. I used > instead of >= in ev_enqueue, which caused targets to be pushed to the front instead of back.
  • The netdata test was broken because it used a regular expression for the result expecting a specific set of digits, but we're printing a higher resolution result now. I need to verify that it renders correctly in netdata now.

@coveralls
Copy link

coveralls commented Feb 27, 2020

Coverage Status

Coverage decreased (-0.06%) to 79.337% when pulling ee76e49 on tycho:high-resolution-clock-sources into bc5017b on schweikert:develop.

@tycho tycho force-pushed the high-resolution-clock-sources branch from ec43d24 to 2abe691 Compare February 27, 2020 16:13
@tycho
Copy link
Contributor Author

tycho commented Feb 27, 2020

The netdata output mode now appears to work properly. Helps if I tell it to use the right divisor.

@tycho tycho force-pushed the high-resolution-clock-sources branch from 2abe691 to def4635 Compare February 27, 2020 21:07
tycho added 2 commits June 9, 2020 17:46
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
@tycho tycho force-pushed the high-resolution-clock-sources branch from ee76e49 to 635a440 Compare June 10, 2020 00:50
tycho added 2 commits June 9, 2020 17:52
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
If CLOCKID != CLOCK_REALTIME, it probably will not have anything to do
with the UNIX epoch, so it could be smaller than 10 digits.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
@tycho tycho force-pushed the high-resolution-clock-sources branch from 635a440 to ad451e7 Compare June 10, 2020 00:52
@schweikert
Copy link
Owner

Hi Steven,

If you agree, I think we could move ahead with merging the code and target a fping 5.0 some times in the future. I will also create a branch for further 4.x releases. What do you think? Is the patch ready for merging?

@tycho
Copy link
Contributor Author

tycho commented Jun 21, 2020

Hi Steven,

If you agree, I think we could move ahead with merging the code and target a fping 5.0 some times in the future. I will also create a branch for further 4.x releases. What do you think? Is the patch ready for merging?

Yeah, I think it's ready to go.

@schweikert schweikert merged commit 721af13 into schweikert:develop Jul 11, 2020
@tycho tycho deleted the high-resolution-clock-sources branch November 8, 2020 22:18
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.

Change resolution to 1us rather than 10us
4 participants