Open liboz opened 2 years ago
Hmm, that could be. There's an open PR that may be related (https://github.com/go-ping/ping/pull/196).
Previously, the ping library didn't have an OnSend
callback. This might be a little more reliable from a jitter perspective.
Thanks for writing this project. It's pretty much exactly what I wanted. However, I noticed an odd issue while sanity checking the data. Sometimes, there are times when response_count > request_total. This seems intuitively incorrect.
I'm running with an interval of 250ms between pings and this is my prometheus query:
increase(smokeping_response_duration_seconds_count{}[10s]) / increase(smokeping_requests_total{}[10s])
Looking at the upstream library, I'd suspect that it's because increment to the
PacketsSent
value https://github.com/go-ping/ping/blob/779d1e9195345226ee7c43c82dd062fd0acdd419/ping.go#L758 happens after the connection is actually written to https://github.com/go-ping/ping/blob/779d1e9195345226ee7c43c82dd062fd0acdd419/ping.go#L737I'm not so familiar with the code there so I was wondering if I'm totally off base and there's something else at play here.