aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-05 16:11:43 +0100
committertv <tv@krebsco.de>2026-11-05 16:11:43 +0100
commit1a20d28c7131a1b768079018f03dfb7bd1ffbc6e (patch)
tree7ac5fdcdd7e6cf9908cd6bdac9377acac45c9a25 /src/swarm
parent4e31f6aefec4d792985fb79c0e369564ae87c531 (diff)
no epoch tag measure
Diffstat (limited to 'src/swarm')
-rw-r--r--src/swarm/stats.rs11
-rw-r--r--src/swarm/sync.rs4
2 files changed, 5 insertions, 10 deletions
diff --git a/src/swarm/stats.rs b/src/swarm/stats.rs
index ba75d68..8ab27e8 100644
--- a/src/swarm/stats.rs
+++ b/src/swarm/stats.rs
@@ -128,11 +128,10 @@ pub(crate) struct Relay {
/// payload's bytes.
pub(crate) delivered: u64,
pub(crate) delivered_bytes: u64,
- /// Sync messages sent (not offers), the bytes the envelope added to their
- /// Automerge messages, and of those the epoch's.
+ /// Sync messages sent (not offers), and the bytes the envelope added to their
+ /// Automerge messages.
pub(crate) framed: u64,
pub(crate) framing_bytes: u64,
- pub(crate) framing_id_bytes: u64,
/// Sync messages deflated (`compress`), their bytes before and after.
pub(crate) deflated: u64,
pub(crate) deflated_from: u64,
@@ -284,13 +283,11 @@ impl NodeStats {
inner.relay.deflated_to += to as u64;
}
- /// A sync message went out whose envelope added `bytes` to its Automerge message,
- /// `ids` of them the epoch.
- pub(crate) fn sync_framing(&self, bytes: usize, ids: usize) {
+ /// A sync message went out whose envelope added `bytes` to its Automerge message.
+ pub(crate) fn sync_framing(&self, bytes: usize) {
let mut inner = self.lock();
inner.relay.framed += 1;
inner.relay.framing_bytes += bytes as u64;
- inner.relay.framing_id_bytes += ids as u64;
}
/// A sync message taken as delivered went out, of `bytes` payload.
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs
index 5511ea2..5ee36a2 100644
--- a/src/swarm/sync.rs
+++ b/src/swarm/sync.rs
@@ -296,8 +296,6 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> {
}
transport::SyncBody::Delta(_) => None,
};
- let ids = rmp_serde::encode::to_vec(&transport::EpochTag::of(epoch))
- .map_or(0, |tag| tag.len());
let envelope = transport::SyncEnvelope {
epoch: transport::EpochTag::of(epoch),
epoch_seq,
@@ -311,7 +309,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> {
.encode(&peer_owned, &ParsedMessage::Sync(envelope))
.map(Some);
if let (Ok(Some(encoded)), Some(inner)) = (&encoded, inner) {
- stats.sync_framing(encoded.payload_len.saturating_sub(inner), ids);
+ stats.sync_framing(encoded.payload_len.saturating_sub(inner));
}
(session, encoded)
},