From 7e0cdfc68311aecff2177bc0f8de07136c2da9bc Mon Sep 17 00:00:00 2001 From: fanyang Date: Sun, 28 Jun 2026 19:15:23 +0800 Subject: [PATCH] hotpath: add measure_all to RingSink Sink impl Reveals RingSink operation costs: poll_ready: 13ns/call (0.57% total) start_send: <26ns/call (below top-15 threshold) poll_flush: below top-15 threshold Confirms ring tunnel sink operations are ~33ns/pkt total, vs 2.04us for MpscTunnelSender::send (which routes through tokio mpsc channel). The channel intermediary adds ~2us/pkt of pure overhead. --- easytier/src/tunnel/ring.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/easytier/src/tunnel/ring.rs b/easytier/src/tunnel/ring.rs index 43f8a783..f2a3f0fd 100644 --- a/easytier/src/tunnel/ring.rs +++ b/easytier/src/tunnel/ring.rs @@ -130,6 +130,7 @@ impl RingSink { } } +#[cfg_attr(feature = "hotpath", hotpath::measure_all)] impl Sink for RingSink { type Error = SinkError;