Skip to content

Conversation

@wyfo
Copy link
Contributor

@wyfo wyfo commented Aug 22, 2025

No description provided.

@wyfo wyfo requested a review from OlivierHecart August 22, 2025 13:53
@wyfo wyfo added the enhancement Existing things could work better label Aug 22, 2025
@wyfo wyfo requested review from fuzzypixelz and oteffahi August 29, 2025 15:59
@wyfo wyfo force-pushed the downsampling-refactor branch from 3429670 to 0efb3f3 Compare September 5, 2025 09:01
@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 87.65432% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.93%. Comparing base (d2ebdcd) to head (18b9a4f).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
zenoh/src/net/routing/interceptor/downsampling.rs 87.65% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2097      +/-   ##
==========================================
+ Coverage   70.89%   70.93%   +0.04%     
==========================================
  Files         373      375       +2     
  Lines       63127    63243     +116     
==========================================
+ Hits        44751    44861     +110     
- Misses      18376    18382       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@oteffahi oteffahi left a comment

Choose a reason for hiding this comment

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

LGTM.
Left a few nitpick comments.

flow: InterceptorFlow,
#[cfg(feature = "stats")] stats: Arc<TransportStats>,
) -> Self {
let mut ke_id = KeBoxTree::default();
Copy link
Contributor

Choose a reason for hiding this comment

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

For future reference: we should move the computation of the key-expr tree outside of the interceptor, and wrap it in an Arc in order to reuse the same tree for both Ingree/Egress interceptors constructed from the same Interceptor Factory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For future reference

Yes, because I don't want to do it now

Comment on lines 187 to 195
match msg.body {
NetworkBodyMut::Push(Push { payload, .. }) => match payload {
PushBody::Put(_) => self.put,
PushBody::Del(_) => self.delete,
},
NetworkBodyMut::Request(_) => self.query,
NetworkBodyMut::Response(_) => self.reply,
_ => false,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The match with all enum variants was intentional to cause a compile-time error if the enum is ever changed. IMO we should keep that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@wyfo wyfo requested a review from oteffahi September 9, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Existing things could work better

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants