prometheus-community / pro-bing

A library for creating continuous probers
MIT License
309 stars 52 forks source link

Per Probe/Packet Timeout Option #19

Open s00500 opened 1 year ago

s00500 commented 1 year ago

On go-ping this PR existed:

https://github.com/go-ping/ping/pull/202

It would be very usefull to have a packet timeout option on the Pinger in this package

SuperQ commented 1 year ago

Yup! Absolutely something we want to implement.

TheRushingWookie commented 1 year ago

Hi! I'm interesting in either implementing this or rebasing https://github.com/go-ping/ping/pull/202/files into pro-bing.

Which way would you guys prefer?

SuperQ commented 1 year ago

It would need to fix the implementation issues of the original PR. As pointed out in several PRs to do per-packet timeouts, it needs to use a Go timer callback to accurately handle the timeouts, as well as not constantly sweep the packet tracking data.

I started working on refactoring the packet tracking in https://github.com/prometheus-community/pro-bing/pull/9. The intention was to make it easier to implement the per-packet timeouts.

TheRushingWookie commented 1 year ago

I'll take a look at #9 and https://github.com/go-ping/ping/pull/202

I think using a Go timer makes sense, though I'm not sure how expensive it is. I'll take a look at the implementation to make sure its cheap.

eysa12123 commented 1 year ago

Yup! Absolutely something we want to implement.