aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/stats.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-03 05:21:25 +0100
committertv <tv@krebsco.de>2026-11-03 05:21:25 +0100
commit8366f7c5de474753dbfbf88431917e79c15e5389 (patch)
tree8c3ed8cca74760ff98b58264843765a3d8e65d3b /src/swarm/stats.rs
parent96d7744dd29a3c783b43a7a6697af7d5d5719a10 (diff)
replace eager links by trees
Diffstat (limited to 'src/swarm/stats.rs')
-rw-r--r--src/swarm/stats.rs21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/swarm/stats.rs b/src/swarm/stats.rs
index dd56bb0..8a00629 100644
--- a/src/swarm/stats.rs
+++ b/src/swarm/stats.rs
@@ -102,12 +102,9 @@ pub(crate) struct Relay {
pub(crate) pulls: u64,
/// Announcements of heads we lacked that had to wait for the pull in progress.
pub(crate) pulls_queued: u64,
- /// Links made eager (a pull brought changes over them) and lazy again (changes came
- /// over them that another path brought first).
- pub(crate) grafts: u64,
- pub(crate) prunes: u64,
- /// Changes forwarded over eager links: a sync message asked for per neighbour.
- pub(crate) eager_forwards: u64,
+ /// Changes passed on along writers' trees (`swarm::tree`): a sync message asked for
+ /// per child.
+ pub(crate) tree_forwards: u64,
}
/// When the initial sync finished, and what it took.
@@ -190,16 +187,8 @@ impl NodeStats {
self.lock().relay.pulls_queued += 1;
}
- pub(crate) fn link_grafted(&self) {
- self.lock().relay.grafts += 1;
- }
-
- pub(crate) fn link_pruned(&self) {
- self.lock().relay.prunes += 1;
- }
-
- pub(crate) fn eager_forward(&self) {
- self.lock().relay.eager_forwards += 1;
+ pub(crate) fn tree_forward(&self) {
+ self.lock().relay.tree_forwards += 1;
}
/// A sync message of `bytes` arrived.