Conversation
Signed-off-by: dzdidi <dzdidi@protonmail.com>
There was a problem hiding this comment.
Pull request overview
This PR adds configurable pacing to the periodic probing routine by introducing delays between probes (per amount) and between peers, and wiring these new settings through config parsing and example configs.
Changes:
- Add
probe_delay_secandpeer_delay_secto probing configuration (with defaults) and propagate into runtime probing loop. - Insert
tokio::time::sleepdelays after probe attempts and between peers during a probing cycle. - Update example configuration templates/help output to include the new delay fields.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Applies new per-probe and per-peer delays during the probing loop and extends startup logging. |
| src/config.rs | Extends deserialized probing config with new delay fields + defaults; updates config help text. |
| src/cli.rs | Extends the in-memory probing config passed into runtime with delay fields. |
| prober_config.json.example | Adds delay keys to the prober config example (but key naming may not match code). |
| config.example.json | Adds delay fields to the primary config example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #[serde(default = "default_probe_timeout")] | ||
| pub timeout_sec: u64, | ||
| #[serde(default = "default_probe_delay")] | ||
| pub probe_delay_sec: u64, | ||
| #[serde(default = "default_peer_delay")] | ||
| pub peer_delay_sec: u64, |
There was a problem hiding this comment.
New config fields with serde defaults (probe_delay_sec, peer_delay_sec) change deserialization behavior. There are no tests around config parsing in this module; adding a small unit test to assert defaults are applied when these fields are omitted would help prevent accidental breaking changes to the config format.
Pull request overview
This PR adds configurable pacing to the periodic probing routine by introducing delays between probes (per amount) and between peers, and wiring these new settings through config parsing and example configs.
Changes:
probe_delay_secandpeer_delay_secto probing configuration (with defaults) and propagate into runtime probing loop.tokio::time::sleepdelays after probe attempts and between peers during a probing cycle.