You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Small repeated-work items, collected so none is lost.
Health selectors compile a Regex per (label × contain) per series per scrape: labels_contain calls Regex::new inside its double loop, invoked per metric series by count_labels/sum_labels, and the selectors themselves are rebuilt per check in health/checks.rs. Precompile or cache.
CLI test commands build a fresh reqwest::Client per request — a new connection pool each time, so no keep-alive across RTT probes, which skews the very latency being measured: request_rtt (~20 call sites across beacon/mev/peers), relay_ping_test, and beacon.rs's http_client() per call site. request_rtt and relay_ping_test also carry no timeout (bounded only by cancellation) — one shared client with the 10s timeout the other paths already use fixes both. Improve alpha test peers: match Charon's probes; reduce timeouts #632 should adopt it for peers.
DutyType's Display round-trips through serde_json per call (types.rs#L55-L65) and feeds ~25 metric-label call sites (scheduler, tracker reporters, bcast/consensus metrics, dutydb). Give it an as_str() like ProposalType already has.
parsigex do_recv clones duty + par_sig per entry per inbound message (handler.rs#L264-L267) because the Verifier alias takes all three by value; narrowing to borrows ripples through every implementor and the boxed-future lifetime — decide once and do it.
conn_logger still tests connectivity via the allocating connections_to_peer(..).is_empty() (conn_logger.rs#L266) — cold path, but PeerStore::has_connection exists for exactly this.
Summary
Small repeated-work items, collected so none is lost.
Regexper (label × contain) per series per scrape:labels_containcallsRegex::newinside its double loop, invoked per metric series bycount_labels/sum_labels, and the selectors themselves are rebuilt per check inhealth/checks.rs. Precompile or cache.reqwest::Clientper request — a new connection pool each time, so no keep-alive across RTT probes, which skews the very latency being measured:request_rtt(~20 call sites across beacon/mev/peers),relay_ping_test, andbeacon.rs'shttp_client()per call site.request_rttandrelay_ping_testalso carry no timeout (bounded only by cancellation) — one shared client with the 10s timeout the other paths already use fixes both. Improvealpha test peers: match Charon's probes; reduce timeouts #632 should adopt it for peers.DutyType'sDisplayround-trips throughserde_jsonper call (types.rs#L55-L65) and feeds ~25 metric-label call sites (scheduler, tracker reporters, bcast/consensus metrics, dutydb). Give it anas_str()likeProposalTypealready has.do_recvclonesduty+par_sigper entry per inbound message (handler.rs#L264-L267) because theVerifieralias takes all three by value; narrowing to borrows ripples through every implementor and the boxed-future lifetime — decide once and do it.conn_loggerstill tests connectivity via the allocatingconnections_to_peer(..).is_empty()(conn_logger.rs#L266) — cold path, butPeerStore::has_connectionexists for exactly this.