Skip to content

Comments

delayed probes#5

Open
dzdidi wants to merge 1 commit intomainfrom
feat/delayed-probes
Open

delayed probes#5
dzdidi wants to merge 1 commit intomainfrom
feat/delayed-probes

Conversation

@dzdidi
Copy link
Collaborator

@dzdidi dzdidi commented Feb 20, 2026

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_sec and peer_delay_sec to probing configuration (with defaults) and propagate into runtime probing loop.
  • Insert tokio::time::sleep delays after probe attempts and between peers during a probing cycle.
  • Update example configuration templates/help output to include the new delay fields.

Signed-off-by: dzdidi <dzdidi@protonmail.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_sec and peer_delay_sec to probing configuration (with defaults) and propagate into runtime probing loop.
  • Insert tokio::time::sleep delays 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.

Comment on lines 64 to +69
#[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,
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@dzdidi dzdidi requested a review from ovitrif February 20, 2026 08:20
@dzdidi dzdidi mentioned this pull request Feb 20, 2026
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.

1 participant