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

Discrepancy with normal ping or gping command? #109

Open
Jieiku opened this issue Jul 14, 2023 · 1 comment
Open

Discrepancy with normal ping or gping command? #109

Jieiku opened this issue Jul 14, 2023 · 1 comment

Comments

@Jieiku
Copy link

Jieiku commented Jul 14, 2023

When I use regular ping or gping to ping my gateway I see ping times that are a fraction of a millisecond. ( 0.12 ms )

When I use pingnoo to do the same thing I see ping time of around 4ms (30+ times larger than what ping or gping report).

My OS is Arch, The title bar of pingnoo shows this:

2023-07-14_10-48-36

I installed using the AUR, this does appear to be the latest release: https://github.com/nedrysoft/pingnoo/releases

Does anyone have any Idea why I would see such a discrepancy?

gping:

gping

pingnoo:

pingnoo

@fizzyade
Copy link
Member

It depends on what the timing source is.

The ICMPPingEngine uses QElapsedTimer to measure the duration and the source for that is determined by Qt/the OS, my use case was never for seeing pings that low since I was interested in the ping times to an external host.

You'd need to look at QElapsedTImer and determine what timer it is actually using, assuming that it's purely the timer and not some other processing, Pingnoo is multithreaded because has to have pings running with different TTL concurrently and therefore each reply requires a map lookup to find the ping request that matches the response we just got.

If it's purely a timer issue then it would require per-os specific code to make use of whatever high performance counter the OS supplies, I use QElapsedTimer because it works everywhere, but it will give different results on different platforms because it's at the mercy of whatever timer Qt decided to bind it to.

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

No branches or pull requests

2 participants