aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/stats.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-05 16:11:56 +0100
committertv <tv@krebsco.de>2026-11-05 16:11:56 +0100
commitbe0d9b01b500645fd5b8578409e88271a8090d60 (patch)
treed3af77f42ab34bf0d4251a5671bb83cc0c47df5c /src/swarm/stats.rs
parent1a20d28c7131a1b768079018f03dfb7bd1ffbc6e (diff)
no bloom bytes
Diffstat (limited to 'src/swarm/stats.rs')
-rw-r--r--src/swarm/stats.rs20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/swarm/stats.rs b/src/swarm/stats.rs
index 8ab27e8..02ccad5 100644
--- a/src/swarm/stats.rs
+++ b/src/swarm/stats.rs
@@ -149,13 +149,11 @@ pub(crate) struct Relay {
pub(crate) nothing_new_bytes: u64,
pub(crate) nothing_new_along_trees: u64,
pub(crate) nothing_new_delivered: u64,
- /// Sync messages received that carried changes, the bytes of those changes, and of
- /// their bloom filters; and the same of those with nothing new.
+ /// Sync messages received that carried changes, and the bytes of those changes; and
+ /// the same of those with nothing new.
pub(crate) carrying: u64,
pub(crate) carrying_change_bytes: u64,
- pub(crate) carrying_bloom_bytes: u64,
pub(crate) nothing_new_change_bytes: u64,
- pub(crate) nothing_new_bloom_bytes: u64,
/// Sync messages received that carried changes, none of them applied yet: they wait
/// for predecessors that didn't come (Automerge holds them back). Not counted with
/// `nothing_new`, which they aren't.
@@ -298,21 +296,20 @@ impl NodeStats {
}
/// A sync message of `bytes` payload carried changes, all of which we had already;
- /// it came `along_tree`, or was `delivered`; `sizes`: of its changes and blooms.
+ /// it came `along_tree`, or was `delivered`; `change_bytes`: of its changes.
pub(crate) fn nothing_new(
&self,
bytes: usize,
along_tree: bool,
delivered: bool,
- sizes: (usize, usize),
+ change_bytes: usize,
) {
let mut inner = self.lock();
inner.relay.nothing_new += 1;
inner.relay.nothing_new_bytes += bytes as u64;
inner.relay.nothing_new_along_trees += u64::from(along_tree);
inner.relay.nothing_new_delivered += u64::from(delivered);
- inner.relay.nothing_new_change_bytes += sizes.0 as u64;
- inner.relay.nothing_new_bloom_bytes += sizes.1 as u64;
+ inner.relay.nothing_new_change_bytes += change_bytes as u64;
}
/// A sync message carried changes that wait for predecessors (`Relay::waiting`).
@@ -328,12 +325,11 @@ impl NodeStats {
inner.relay.off_tree_ms += delays_ms.iter().map(|ms| ms.max(&0)).sum::<i64>() as u64;
}
- /// A sync message carrying changes arrived; `sizes`: of its changes and blooms.
- pub(crate) fn carrying(&self, sizes: (usize, usize)) {
+ /// A sync message carrying `change_bytes` of changes arrived.
+ pub(crate) fn carrying(&self, change_bytes: usize) {
let mut inner = self.lock();
inner.relay.carrying += 1;
- inner.relay.carrying_change_bytes += sizes.0 as u64;
- inner.relay.carrying_bloom_bytes += sizes.1 as u64;
+ inner.relay.carrying_change_bytes += change_bytes as u64;
}
/// A peer asked for changes we had counted as its (`SyncSession::resend_if_needed`).