diff --git a/dc/s2n-quic-dc/events/connection.rs b/dc/s2n-quic-dc/events/connection.rs index f075dd88a..12345fc1b 100644 --- a/dc/s2n-quic-dc/events/connection.rs +++ b/dc/s2n-quic-dc/events/connection.rs @@ -85,6 +85,11 @@ pub struct StreamWriteErrored { errno: Option, } +#[event("stream:write_key_updated")] +pub struct StreamWriteKeyUpdated { + key_phase: u8, +} + #[event("stream:write_shutdown")] #[checkpoint("latency")] pub struct StreamWriteShutdown { @@ -200,6 +205,11 @@ pub struct StreamReadErrored { errno: Option, } +#[event("stream:read_key_updated")] +pub struct StreamReadKeyUpdated { + key_phase: u8, +} + #[event("stream:read_shutdown")] #[checkpoint("latency")] pub struct StreamReadShutdown { diff --git a/dc/s2n-quic-dc/src/event/generated.rs b/dc/s2n-quic-dc/src/event/generated.rs index e158291f1..01d8d35ea 100644 --- a/dc/s2n-quic-dc/src/event/generated.rs +++ b/dc/s2n-quic-dc/src/event/generated.rs @@ -719,6 +719,22 @@ pub mod api { } #[derive(Clone, Debug)] #[non_exhaustive] + pub struct StreamWriteKeyUpdated { + pub key_phase: u8, + } + #[cfg(any(test, feature = "testing"))] + impl crate::event::snapshot::Fmt for StreamWriteKeyUpdated { + fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result { + let mut fmt = fmt.debug_struct("StreamWriteKeyUpdated"); + fmt.field("key_phase", &self.key_phase); + fmt.finish() + } + } + impl Event for StreamWriteKeyUpdated { + const NAME: &'static str = "stream:write_key_updated"; + } + #[derive(Clone, Debug)] + #[non_exhaustive] pub struct StreamWriteShutdown { #[doc = " The number of bytes in the send buffer at the time of shutdown"] pub buffer_len: usize, @@ -890,6 +906,22 @@ pub mod api { } #[derive(Clone, Debug)] #[non_exhaustive] + pub struct StreamReadKeyUpdated { + pub key_phase: u8, + } + #[cfg(any(test, feature = "testing"))] + impl crate::event::snapshot::Fmt for StreamReadKeyUpdated { + fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result { + let mut fmt = fmt.debug_struct("StreamReadKeyUpdated"); + fmt.field("key_phase", &self.key_phase); + fmt.finish() + } + } + impl Event for StreamReadKeyUpdated { + const NAME: &'static str = "stream:read_key_updated"; + } + #[derive(Clone, Debug)] + #[non_exhaustive] pub struct StreamReadShutdown { #[doc = " If the stream required a background task to drive the stream shutdown"] pub background: bool, @@ -2028,6 +2060,17 @@ pub mod tracing { tracing :: event ! (target : "stream_write_errored" , parent : id , tracing :: Level :: DEBUG , { provided_len = tracing :: field :: debug (provided_len) , is_fin = tracing :: field :: debug (is_fin) , processing_duration = tracing :: field :: debug (processing_duration) , errno = tracing :: field :: debug (errno) }); } #[inline] + fn on_stream_write_key_updated( + &self, + context: &Self::ConnectionContext, + _meta: &api::ConnectionMeta, + event: &api::StreamWriteKeyUpdated, + ) { + let id = context.id(); + let api::StreamWriteKeyUpdated { key_phase } = event; + tracing :: event ! (target : "stream_write_key_updated" , parent : id , tracing :: Level :: DEBUG , { key_phase = tracing :: field :: debug (key_phase) }); + } + #[inline] fn on_stream_write_shutdown( &self, context: &Self::ConnectionContext, @@ -2139,6 +2182,17 @@ pub mod tracing { tracing :: event ! (target : "stream_read_errored" , parent : id , tracing :: Level :: DEBUG , { capacity = tracing :: field :: debug (capacity) , processing_duration = tracing :: field :: debug (processing_duration) , errno = tracing :: field :: debug (errno) }); } #[inline] + fn on_stream_read_key_updated( + &self, + context: &Self::ConnectionContext, + _meta: &api::ConnectionMeta, + event: &api::StreamReadKeyUpdated, + ) { + let id = context.id(); + let api::StreamReadKeyUpdated { key_phase } = event; + tracing :: event ! (target : "stream_read_key_updated" , parent : id , tracing :: Level :: DEBUG , { key_phase = tracing :: field :: debug (key_phase) }); + } + #[inline] fn on_stream_read_shutdown( &self, context: &Self::ConnectionContext, @@ -3287,6 +3341,19 @@ pub mod builder { } } #[derive(Clone, Debug)] + pub struct StreamWriteKeyUpdated { + pub key_phase: u8, + } + impl IntoEvent for StreamWriteKeyUpdated { + #[inline] + fn into_event(self) -> api::StreamWriteKeyUpdated { + let StreamWriteKeyUpdated { key_phase } = self; + api::StreamWriteKeyUpdated { + key_phase: key_phase.into_event(), + } + } + } + #[derive(Clone, Debug)] pub struct StreamWriteShutdown { #[doc = " The number of bytes in the send buffer at the time of shutdown"] pub buffer_len: usize, @@ -3457,6 +3524,19 @@ pub mod builder { } } #[derive(Clone, Debug)] + pub struct StreamReadKeyUpdated { + pub key_phase: u8, + } + impl IntoEvent for StreamReadKeyUpdated { + #[inline] + fn into_event(self) -> api::StreamReadKeyUpdated { + let StreamReadKeyUpdated { key_phase } = self; + api::StreamReadKeyUpdated { + key_phase: key_phase.into_event(), + } + } + } + #[derive(Clone, Debug)] pub struct StreamReadShutdown { #[doc = " If the stream required a background task to drive the stream shutdown"] pub background: bool, @@ -4519,6 +4599,18 @@ mod traits { let _ = meta; let _ = event; } + #[doc = "Called when the `StreamWriteKeyUpdated` event is triggered"] + #[inline] + fn on_stream_write_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamWriteKeyUpdated, + ) { + let _ = context; + let _ = meta; + let _ = event; + } #[doc = "Called when the `StreamWriteShutdown` event is triggered"] #[inline] fn on_stream_write_shutdown( @@ -4615,6 +4707,18 @@ mod traits { let _ = meta; let _ = event; } + #[doc = "Called when the `StreamReadKeyUpdated` event is triggered"] + #[inline] + fn on_stream_read_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamReadKeyUpdated, + ) { + let _ = context; + let _ = meta; + let _ = event; + } #[doc = "Called when the `StreamReadShutdown` event is triggered"] #[inline] fn on_stream_read_shutdown( @@ -5212,6 +5316,16 @@ mod traits { self.as_ref().on_stream_write_errored(context, meta, event); } #[inline] + fn on_stream_write_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamWriteKeyUpdated, + ) { + self.as_ref() + .on_stream_write_key_updated(context, meta, event); + } + #[inline] fn on_stream_write_shutdown( &self, context: &Self::ConnectionContext, @@ -5288,6 +5402,16 @@ mod traits { self.as_ref().on_stream_read_errored(context, meta, event); } #[inline] + fn on_stream_read_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamReadKeyUpdated, + ) { + self.as_ref() + .on_stream_read_key_updated(context, meta, event); + } + #[inline] fn on_stream_read_shutdown( &self, context: &Self::ConnectionContext, @@ -5838,6 +5962,16 @@ mod traits { (self.1).on_stream_write_errored(&context.1, meta, event); } #[inline] + fn on_stream_write_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamWriteKeyUpdated, + ) { + (self.0).on_stream_write_key_updated(&context.0, meta, event); + (self.1).on_stream_write_key_updated(&context.1, meta, event); + } + #[inline] fn on_stream_write_shutdown( &self, context: &Self::ConnectionContext, @@ -5918,6 +6052,16 @@ mod traits { (self.1).on_stream_read_errored(&context.1, meta, event); } #[inline] + fn on_stream_read_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamReadKeyUpdated, + ) { + (self.0).on_stream_read_key_updated(&context.0, meta, event); + (self.1).on_stream_read_key_updated(&context.1, meta, event); + } + #[inline] fn on_stream_read_shutdown( &self, context: &Self::ConnectionContext, @@ -6838,6 +6982,8 @@ mod traits { fn on_stream_write_blocked(&self, event: builder::StreamWriteBlocked); #[doc = "Publishes a `StreamWriteErrored` event to the publisher's subscriber"] fn on_stream_write_errored(&self, event: builder::StreamWriteErrored); + #[doc = "Publishes a `StreamWriteKeyUpdated` event to the publisher's subscriber"] + fn on_stream_write_key_updated(&self, event: builder::StreamWriteKeyUpdated); #[doc = "Publishes a `StreamWriteShutdown` event to the publisher's subscriber"] fn on_stream_write_shutdown(&self, event: builder::StreamWriteShutdown); #[doc = "Publishes a `StreamWriteSocketFlushed` event to the publisher's subscriber"] @@ -6854,6 +7000,8 @@ mod traits { fn on_stream_read_blocked(&self, event: builder::StreamReadBlocked); #[doc = "Publishes a `StreamReadErrored` event to the publisher's subscriber"] fn on_stream_read_errored(&self, event: builder::StreamReadErrored); + #[doc = "Publishes a `StreamReadKeyUpdated` event to the publisher's subscriber"] + fn on_stream_read_key_updated(&self, event: builder::StreamReadKeyUpdated); #[doc = "Publishes a `StreamReadShutdown` event to the publisher's subscriber"] fn on_stream_read_shutdown(&self, event: builder::StreamReadShutdown); #[doc = "Publishes a `StreamReadSocketFlushed` event to the publisher's subscriber"] @@ -6937,6 +7085,15 @@ mod traits { self.subscriber.on_event(&self.meta, &event); } #[inline] + fn on_stream_write_key_updated(&self, event: builder::StreamWriteKeyUpdated) { + let event = event.into_event(); + self.subscriber + .on_stream_write_key_updated(self.context, &self.meta, &event); + self.subscriber + .on_connection_event(self.context, &self.meta, &event); + self.subscriber.on_event(&self.meta, &event); + } + #[inline] fn on_stream_write_shutdown(&self, event: builder::StreamWriteShutdown) { let event = event.into_event(); self.subscriber @@ -7009,6 +7166,15 @@ mod traits { self.subscriber.on_event(&self.meta, &event); } #[inline] + fn on_stream_read_key_updated(&self, event: builder::StreamReadKeyUpdated) { + let event = event.into_event(); + self.subscriber + .on_stream_read_key_updated(self.context, &self.meta, &event); + self.subscriber + .on_connection_event(self.context, &self.meta, &event); + self.subscriber.on_event(&self.meta, &event); + } + #[inline] fn on_stream_read_shutdown(&self, event: builder::StreamReadShutdown) { let event = event.into_event(); self.subscriber @@ -7832,6 +7998,7 @@ pub mod testing { pub stream_write_fin_flushed: AtomicU64, pub stream_write_blocked: AtomicU64, pub stream_write_errored: AtomicU64, + pub stream_write_key_updated: AtomicU64, pub stream_write_shutdown: AtomicU64, pub stream_write_socket_flushed: AtomicU64, pub stream_write_socket_blocked: AtomicU64, @@ -7840,6 +8007,7 @@ pub mod testing { pub stream_read_fin_flushed: AtomicU64, pub stream_read_blocked: AtomicU64, pub stream_read_errored: AtomicU64, + pub stream_read_key_updated: AtomicU64, pub stream_read_shutdown: AtomicU64, pub stream_read_socket_flushed: AtomicU64, pub stream_read_socket_blocked: AtomicU64, @@ -7930,6 +8098,7 @@ pub mod testing { stream_write_fin_flushed: AtomicU64::new(0), stream_write_blocked: AtomicU64::new(0), stream_write_errored: AtomicU64::new(0), + stream_write_key_updated: AtomicU64::new(0), stream_write_shutdown: AtomicU64::new(0), stream_write_socket_flushed: AtomicU64::new(0), stream_write_socket_blocked: AtomicU64::new(0), @@ -7938,6 +8107,7 @@ pub mod testing { stream_read_fin_flushed: AtomicU64::new(0), stream_read_blocked: AtomicU64::new(0), stream_read_errored: AtomicU64::new(0), + stream_read_key_updated: AtomicU64::new(0), stream_read_shutdown: AtomicU64::new(0), stream_read_socket_flushed: AtomicU64::new(0), stream_read_socket_blocked: AtomicU64::new(0), @@ -8254,6 +8424,21 @@ pub mod testing { self.output.lock().unwrap().push(out); } } + fn on_stream_write_key_updated( + &self, + _context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamWriteKeyUpdated, + ) { + self.stream_write_key_updated + .fetch_add(1, Ordering::Relaxed); + if self.location.is_some() { + let meta = crate::event::snapshot::Fmt::to_snapshot(meta); + let event = crate::event::snapshot::Fmt::to_snapshot(event); + let out = format!("{meta:?} {event:?}"); + self.output.lock().unwrap().push(out); + } + } fn on_stream_write_shutdown( &self, _context: &Self::ConnectionContext, @@ -8369,6 +8554,20 @@ pub mod testing { self.output.lock().unwrap().push(out); } } + fn on_stream_read_key_updated( + &self, + _context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamReadKeyUpdated, + ) { + self.stream_read_key_updated.fetch_add(1, Ordering::Relaxed); + if self.location.is_some() { + let meta = crate::event::snapshot::Fmt::to_snapshot(meta); + let event = crate::event::snapshot::Fmt::to_snapshot(event); + let out = format!("{meta:?} {event:?}"); + self.output.lock().unwrap().push(out); + } + } fn on_stream_read_shutdown( &self, _context: &Self::ConnectionContext, @@ -8846,6 +9045,7 @@ pub mod testing { pub stream_write_fin_flushed: AtomicU64, pub stream_write_blocked: AtomicU64, pub stream_write_errored: AtomicU64, + pub stream_write_key_updated: AtomicU64, pub stream_write_shutdown: AtomicU64, pub stream_write_socket_flushed: AtomicU64, pub stream_write_socket_blocked: AtomicU64, @@ -8854,6 +9054,7 @@ pub mod testing { pub stream_read_fin_flushed: AtomicU64, pub stream_read_blocked: AtomicU64, pub stream_read_errored: AtomicU64, + pub stream_read_key_updated: AtomicU64, pub stream_read_shutdown: AtomicU64, pub stream_read_socket_flushed: AtomicU64, pub stream_read_socket_blocked: AtomicU64, @@ -8934,6 +9135,7 @@ pub mod testing { stream_write_fin_flushed: AtomicU64::new(0), stream_write_blocked: AtomicU64::new(0), stream_write_errored: AtomicU64::new(0), + stream_write_key_updated: AtomicU64::new(0), stream_write_shutdown: AtomicU64::new(0), stream_write_socket_flushed: AtomicU64::new(0), stream_write_socket_blocked: AtomicU64::new(0), @@ -8942,6 +9144,7 @@ pub mod testing { stream_read_fin_flushed: AtomicU64::new(0), stream_read_blocked: AtomicU64::new(0), stream_read_errored: AtomicU64::new(0), + stream_read_key_updated: AtomicU64::new(0), stream_read_shutdown: AtomicU64::new(0), stream_read_socket_flushed: AtomicU64::new(0), stream_read_socket_blocked: AtomicU64::new(0), @@ -9453,6 +9656,16 @@ pub mod testing { self.output.lock().unwrap().push(out); } } + fn on_stream_write_key_updated(&self, event: builder::StreamWriteKeyUpdated) { + self.stream_write_key_updated + .fetch_add(1, Ordering::Relaxed); + let event = event.into_event(); + if self.location.is_some() { + let event = crate::event::snapshot::Fmt::to_snapshot(&event); + let out = format!("{event:?}"); + self.output.lock().unwrap().push(out); + } + } fn on_stream_write_shutdown(&self, event: builder::StreamWriteShutdown) { self.stream_write_shutdown.fetch_add(1, Ordering::Relaxed); let event = event.into_event(); @@ -9528,6 +9741,15 @@ pub mod testing { self.output.lock().unwrap().push(out); } } + fn on_stream_read_key_updated(&self, event: builder::StreamReadKeyUpdated) { + self.stream_read_key_updated.fetch_add(1, Ordering::Relaxed); + let event = event.into_event(); + if self.location.is_some() { + let event = crate::event::snapshot::Fmt::to_snapshot(&event); + let out = format!("{event:?}"); + self.output.lock().unwrap().push(out); + } + } fn on_stream_read_shutdown(&self, event: builder::StreamReadShutdown) { self.stream_read_shutdown.fetch_add(1, Ordering::Relaxed); let event = event.into_event(); diff --git a/dc/s2n-quic-dc/src/event/generated/metrics.rs b/dc/s2n-quic-dc/src/event/generated/metrics.rs index 54cfb7365..63f7df119 100644 --- a/dc/s2n-quic-dc/src/event/generated/metrics.rs +++ b/dc/s2n-quic-dc/src/event/generated/metrics.rs @@ -30,6 +30,7 @@ pub struct Context { stream_write_fin_flushed: AtomicU64, stream_write_blocked: AtomicU64, stream_write_errored: AtomicU64, + stream_write_key_updated: AtomicU64, stream_write_shutdown: AtomicU64, stream_write_socket_flushed: AtomicU64, stream_write_socket_blocked: AtomicU64, @@ -38,6 +39,7 @@ pub struct Context { stream_read_fin_flushed: AtomicU64, stream_read_blocked: AtomicU64, stream_read_errored: AtomicU64, + stream_read_key_updated: AtomicU64, stream_read_shutdown: AtomicU64, stream_read_socket_flushed: AtomicU64, stream_read_socket_blocked: AtomicU64, @@ -60,6 +62,7 @@ where stream_write_fin_flushed: AtomicU64::new(0), stream_write_blocked: AtomicU64::new(0), stream_write_errored: AtomicU64::new(0), + stream_write_key_updated: AtomicU64::new(0), stream_write_shutdown: AtomicU64::new(0), stream_write_socket_flushed: AtomicU64::new(0), stream_write_socket_blocked: AtomicU64::new(0), @@ -68,6 +71,7 @@ where stream_read_fin_flushed: AtomicU64::new(0), stream_read_blocked: AtomicU64::new(0), stream_read_errored: AtomicU64::new(0), + stream_read_key_updated: AtomicU64::new(0), stream_read_shutdown: AtomicU64::new(0), stream_read_socket_flushed: AtomicU64::new(0), stream_read_socket_blocked: AtomicU64::new(0), @@ -122,6 +126,19 @@ where .on_stream_write_errored(&context.recorder, meta, event); } #[inline] + fn on_stream_write_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamWriteKeyUpdated, + ) { + context + .stream_write_key_updated + .fetch_add(1, Ordering::Relaxed); + self.subscriber + .on_stream_write_key_updated(&context.recorder, meta, event); + } + #[inline] fn on_stream_write_shutdown( &self, context: &Self::ConnectionContext, @@ -220,6 +237,19 @@ where .on_stream_read_errored(&context.recorder, meta, event); } #[inline] + fn on_stream_read_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamReadKeyUpdated, + ) { + context + .stream_read_key_updated + .fetch_add(1, Ordering::Relaxed); + self.subscriber + .on_stream_read_key_updated(&context.recorder, meta, event); + } + #[inline] fn on_stream_read_shutdown( &self, context: &Self::ConnectionContext, @@ -299,6 +329,10 @@ impl Drop for Context { "stream_write_errored", self.stream_write_errored.load(Ordering::Relaxed) as _, ); + self.recorder.increment_counter( + "stream_write_key_updated", + self.stream_write_key_updated.load(Ordering::Relaxed) as _, + ); self.recorder.increment_counter( "stream_write_shutdown", self.stream_write_shutdown.load(Ordering::Relaxed) as _, @@ -331,6 +365,10 @@ impl Drop for Context { "stream_read_errored", self.stream_read_errored.load(Ordering::Relaxed) as _, ); + self.recorder.increment_counter( + "stream_read_key_updated", + self.stream_read_key_updated.load(Ordering::Relaxed) as _, + ); self.recorder.increment_counter( "stream_read_shutdown", self.stream_read_shutdown.load(Ordering::Relaxed) as _, diff --git a/dc/s2n-quic-dc/src/event/generated/metrics/aggregate.rs b/dc/s2n-quic-dc/src/event/generated/metrics/aggregate.rs index a0580e51d..9b70dfcd2 100644 --- a/dc/s2n-quic-dc/src/event/generated/metrics/aggregate.rs +++ b/dc/s2n-quic-dc/src/event/generated/metrics/aggregate.rs @@ -13,7 +13,7 @@ use crate::event::{ }, }; use core::sync::atomic::{AtomicU64, Ordering}; -static INFO: &[Info; 217usize] = &[ +static INFO: &[Info; 219usize] = &[ info::Builder { id: 0usize, name: Str::new("acceptor_tcp_started\0"), @@ -472,846 +472,858 @@ static INFO: &[Info; 217usize] = &[ .build(), info::Builder { id: 76usize, - name: Str::new("stream_write_shutdown\0"), + name: Str::new("stream_write_key_updated\0"), units: Units::None, } .build(), info::Builder { id: 77usize, + name: Str::new("stream_write_shutdown\0"), + units: Units::None, + } + .build(), + info::Builder { + id: 78usize, name: Str::new("stream_write_shutdown.latency\0"), units: Units::Duration, } .build(), info::Builder { - id: 78usize, + id: 79usize, name: Str::new("stream_write_shutdown.buffer_len\0"), units: Units::Bytes, } .build(), info::Builder { - id: 79usize, + id: 80usize, name: Str::new("stream_write_shutdown.background\0"), units: Units::None, } .build(), info::Builder { - id: 80usize, + id: 81usize, name: Str::new("stream_write_socket_flushed\0"), units: Units::None, } .build(), info::Builder { - id: 81usize, + id: 82usize, name: Str::new("stream_write_socket_flushed.conn\0"), units: Units::None, } .build(), info::Builder { - id: 82usize, + id: 83usize, name: Str::new("stream_write_socket_flushed.provided\0"), units: Units::Bytes, } .build(), info::Builder { - id: 83usize, + id: 84usize, name: Str::new("stream_write_socket_flushed.committed.total\0"), units: Units::Bytes, } .build(), info::Builder { - id: 84usize, + id: 85usize, name: Str::new("stream_write_socket_flushed.committed\0"), units: Units::Bytes, } .build(), info::Builder { - id: 85usize, + id: 86usize, name: Str::new("stream_write_socket_flushed.committed.conn\0"), units: Units::Bytes, } .build(), info::Builder { - id: 86usize, + id: 87usize, name: Str::new("stream_write_socket_blocked\0"), units: Units::None, } .build(), info::Builder { - id: 87usize, + id: 88usize, name: Str::new("stream_write_socket_blocked.conn\0"), units: Units::None, } .build(), info::Builder { - id: 88usize, + id: 89usize, name: Str::new("stream_write_socket_blocked.provided\0"), units: Units::Bytes, } .build(), info::Builder { - id: 89usize, + id: 90usize, name: Str::new("stream_write_socket_errored\0"), units: Units::None, } .build(), info::Builder { - id: 90usize, + id: 91usize, name: Str::new("stream_write_socket_errored.provided\0"), units: Units::Bytes, } .build(), info::Builder { - id: 91usize, + id: 92usize, name: Str::new("stream_read_flushed\0"), units: Units::None, } .build(), info::Builder { - id: 92usize, + id: 93usize, name: Str::new("stream_read_flushed.latency\0"), units: Units::Duration, } .build(), info::Builder { - id: 93usize, + id: 94usize, name: Str::new("stream_read_flushed.conn\0"), units: Units::None, } .build(), info::Builder { - id: 94usize, + id: 95usize, name: Str::new("stream_read_flushed.capacity\0"), units: Units::Bytes, } .build(), info::Builder { - id: 95usize, + id: 96usize, name: Str::new("stream_read_flushed.committed.total\0"), units: Units::Bytes, } .build(), info::Builder { - id: 96usize, + id: 97usize, name: Str::new("stream_read_flushed.committed\0"), units: Units::Bytes, } .build(), info::Builder { - id: 97usize, + id: 98usize, name: Str::new("stream_read_flushed.committed.conn\0"), units: Units::Bytes, } .build(), info::Builder { - id: 98usize, + id: 99usize, name: Str::new("stream_read_flushed.processing_duration\0"), units: Units::Duration, } .build(), info::Builder { - id: 99usize, + id: 100usize, name: Str::new("stream_read_flushed.processing_duration.conn\0"), units: Units::Duration, } .build(), info::Builder { - id: 100usize, + id: 101usize, name: Str::new("stream_read_fin_flushed\0"), units: Units::None, } .build(), info::Builder { - id: 101usize, + id: 102usize, name: Str::new("stream_read_fin_flushed.latency\0"), units: Units::Duration, } .build(), info::Builder { - id: 102usize, + id: 103usize, name: Str::new("stream_read_fin_flushed.conn\0"), units: Units::None, } .build(), info::Builder { - id: 103usize, + id: 104usize, name: Str::new("stream_read_fin_flushed.capacity\0"), units: Units::Bytes, } .build(), info::Builder { - id: 104usize, + id: 105usize, name: Str::new("stream_read_fin_flushed.processing_duration\0"), units: Units::Duration, } .build(), info::Builder { - id: 105usize, + id: 106usize, name: Str::new("stream_read_fin_flushed.processing_duration.conn\0"), units: Units::Duration, } .build(), info::Builder { - id: 106usize, + id: 107usize, name: Str::new("stream_read_blocked\0"), units: Units::None, } .build(), info::Builder { - id: 107usize, + id: 108usize, name: Str::new("stream_read_blocked.latency\0"), units: Units::Duration, } .build(), info::Builder { - id: 108usize, + id: 109usize, name: Str::new("stream_read_blocked.capacity\0"), units: Units::Bytes, } .build(), info::Builder { - id: 109usize, + id: 110usize, name: Str::new("stream_read_blocked.processing_duration\0"), units: Units::Duration, } .build(), info::Builder { - id: 110usize, + id: 111usize, name: Str::new("stream_read_blocked.processing_duration.conn\0"), units: Units::Duration, } .build(), info::Builder { - id: 111usize, + id: 112usize, name: Str::new("stream_read_errored\0"), units: Units::None, } .build(), info::Builder { - id: 112usize, + id: 113usize, name: Str::new("stream_read_errored.latency\0"), units: Units::Duration, } .build(), info::Builder { - id: 113usize, + id: 114usize, name: Str::new("stream_read_errored.capacity\0"), units: Units::Bytes, } .build(), info::Builder { - id: 114usize, + id: 115usize, name: Str::new("stream_read_errored.processing_duration\0"), units: Units::Duration, } .build(), info::Builder { - id: 115usize, + id: 116usize, name: Str::new("stream_read_errored.processing_duration.conn\0"), units: Units::Duration, } .build(), info::Builder { - id: 116usize, + id: 117usize, + name: Str::new("stream_read_key_updated\0"), + units: Units::None, + } + .build(), + info::Builder { + id: 118usize, name: Str::new("stream_read_shutdown\0"), units: Units::None, } .build(), info::Builder { - id: 117usize, + id: 119usize, name: Str::new("stream_read_shutdown.latency\0"), units: Units::Duration, } .build(), info::Builder { - id: 118usize, + id: 120usize, name: Str::new("stream_read_shutdown.background\0"), units: Units::None, } .build(), info::Builder { - id: 119usize, + id: 121usize, name: Str::new("stream_read_socket_flushed\0"), units: Units::None, } .build(), info::Builder { - id: 120usize, + id: 122usize, name: Str::new("stream_read_socket_flushed.conn\0"), units: Units::None, } .build(), info::Builder { - id: 121usize, + id: 123usize, name: Str::new("stream_read_socket_flushed.capacity\0"), units: Units::Bytes, } .build(), info::Builder { - id: 122usize, + id: 124usize, name: Str::new("stream_read_socket_flushed.committed.total\0"), units: Units::Bytes, } .build(), info::Builder { - id: 123usize, + id: 125usize, name: Str::new("stream_read_socket_flushed.committed\0"), units: Units::Bytes, } .build(), info::Builder { - id: 124usize, + id: 126usize, name: Str::new("stream_read_socket_flushed.committed.conn\0"), units: Units::Bytes, } .build(), info::Builder { - id: 125usize, + id: 127usize, name: Str::new("stream_read_socket_blocked\0"), units: Units::None, } .build(), info::Builder { - id: 126usize, + id: 128usize, name: Str::new("stream_read_socket_blocked.conn\0"), units: Units::None, } .build(), info::Builder { - id: 127usize, + id: 129usize, name: Str::new("stream_read_socket_blocked.capacity\0"), units: Units::Bytes, } .build(), info::Builder { - id: 128usize, + id: 130usize, name: Str::new("stream_read_socket_errored\0"), units: Units::None, } .build(), info::Builder { - id: 129usize, + id: 131usize, name: Str::new("stream_read_socket_errored.capacity\0"), units: Units::Bytes, } .build(), info::Builder { - id: 130usize, + id: 132usize, name: Str::new("connection_closed\0"), units: Units::None, } .build(), info::Builder { - id: 131usize, + id: 133usize, name: Str::new("endpoint_initialized\0"), units: Units::None, } .build(), info::Builder { - id: 132usize, + id: 134usize, name: Str::new("endpoint_initialized.acceptor.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 133usize, + id: 135usize, name: Str::new("endpoint_initialized.handshake.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 134usize, + id: 136usize, name: Str::new("endpoint_initialized.tcp\0"), units: Units::None, } .build(), info::Builder { - id: 135usize, + id: 137usize, name: Str::new("endpoint_initialized.udp\0"), units: Units::None, } .build(), info::Builder { - id: 136usize, + id: 138usize, name: Str::new("path_secret_map_initialized\0"), units: Units::None, } .build(), info::Builder { - id: 137usize, + id: 139usize, name: Str::new("path_secret_map_initialized.capacity\0"), units: Units::None, } .build(), info::Builder { - id: 138usize, + id: 140usize, name: Str::new("path_secret_map_uninitialized\0"), units: Units::None, } .build(), info::Builder { - id: 139usize, + id: 141usize, name: Str::new("path_secret_map_uninitialized.capacity\0"), units: Units::None, } .build(), info::Builder { - id: 140usize, + id: 142usize, name: Str::new("path_secret_map_uninitialized.entries\0"), units: Units::None, } .build(), info::Builder { - id: 141usize, + id: 143usize, name: Str::new("path_secret_map_uninitialized.lifetime\0"), units: Units::Duration, } .build(), info::Builder { - id: 142usize, + id: 144usize, name: Str::new("path_secret_map_background_handshake_requested\0"), units: Units::None, } .build(), info::Builder { - id: 143usize, + id: 145usize, name: Str::new("path_secret_map_background_handshake_requested.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 144usize, + id: 146usize, name: Str::new("path_secret_map_entry_inserted\0"), units: Units::None, } .build(), info::Builder { - id: 145usize, + id: 147usize, name: Str::new("path_secret_map_entry_inserted.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 146usize, + id: 148usize, name: Str::new("path_secret_map_entry_ready\0"), units: Units::None, } .build(), info::Builder { - id: 147usize, + id: 149usize, name: Str::new("path_secret_map_entry_ready.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 148usize, + id: 150usize, name: Str::new("path_secret_map_entry_replaced\0"), units: Units::None, } .build(), info::Builder { - id: 149usize, + id: 151usize, name: Str::new("path_secret_map_entry_replaced.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 150usize, + id: 152usize, name: Str::new("path_secret_map_id_entry_evicted\0"), units: Units::None, } .build(), info::Builder { - id: 151usize, + id: 153usize, name: Str::new("path_secret_map_id_entry_evicted.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 152usize, + id: 154usize, name: Str::new("path_secret_map_id_entry_evicted.age\0"), units: Units::Duration, } .build(), info::Builder { - id: 153usize, + id: 155usize, name: Str::new("path_secret_map_address_entry_evicted\0"), units: Units::None, } .build(), info::Builder { - id: 154usize, + id: 156usize, name: Str::new("path_secret_map_address_entry_evicted.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 155usize, + id: 157usize, name: Str::new("path_secret_map_address_entry_evicted.age\0"), units: Units::Duration, } .build(), info::Builder { - id: 156usize, + id: 158usize, name: Str::new("unknown_path_secret_packet_sent\0"), units: Units::None, } .build(), info::Builder { - id: 157usize, + id: 159usize, name: Str::new("unknown_path_secret_packet_sent.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 158usize, + id: 160usize, name: Str::new("unknown_path_secret_packet_received\0"), units: Units::None, } .build(), info::Builder { - id: 159usize, + id: 161usize, name: Str::new("unknown_path_secret_packet_received.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 160usize, + id: 162usize, name: Str::new("unknown_path_secret_packet_accepted\0"), units: Units::None, } .build(), info::Builder { - id: 161usize, + id: 163usize, name: Str::new("unknown_path_secret_packet_accepted.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 162usize, + id: 164usize, name: Str::new("unknown_path_secret_packet_rejected\0"), units: Units::None, } .build(), info::Builder { - id: 163usize, + id: 165usize, name: Str::new("unknown_path_secret_packet_rejected.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 164usize, + id: 166usize, name: Str::new("unknown_path_secret_packet_dropped\0"), units: Units::None, } .build(), info::Builder { - id: 165usize, + id: 167usize, name: Str::new("unknown_path_secret_packet_dropped.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 166usize, + id: 168usize, name: Str::new("key_accepted\0"), units: Units::None, } .build(), info::Builder { - id: 167usize, + id: 169usize, name: Str::new("key_accepted.gap\0"), units: Units::None, } .build(), info::Builder { - id: 168usize, + id: 170usize, name: Str::new("key_accepted.forward_shift\0"), units: Units::None, } .build(), info::Builder { - id: 169usize, + id: 171usize, name: Str::new("replay_definitely_detected\0"), units: Units::None, } .build(), info::Builder { - id: 170usize, + id: 172usize, name: Str::new("replay_potentially_detected\0"), units: Units::None, } .build(), info::Builder { - id: 171usize, + id: 173usize, name: Str::new("replay_potentially_detected.gap\0"), units: Units::None, } .build(), info::Builder { - id: 172usize, + id: 174usize, name: Str::new("replay_detected_packet_sent\0"), units: Units::None, } .build(), info::Builder { - id: 173usize, + id: 175usize, name: Str::new("replay_detected_packet_sent.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 174usize, + id: 176usize, name: Str::new("replay_detected_packet_received\0"), units: Units::None, } .build(), info::Builder { - id: 175usize, + id: 177usize, name: Str::new("replay_detected_packet_received.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 176usize, + id: 178usize, name: Str::new("replay_detected_packet_accepted\0"), units: Units::None, } .build(), info::Builder { - id: 177usize, + id: 179usize, name: Str::new("replay_detected_packet_accepted.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 178usize, + id: 180usize, name: Str::new("replay_detected_packet_rejected\0"), units: Units::None, } .build(), info::Builder { - id: 179usize, + id: 181usize, name: Str::new("replay_detected_packet_rejected.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 180usize, + id: 182usize, name: Str::new("replay_detected_packet_dropped\0"), units: Units::None, } .build(), info::Builder { - id: 181usize, + id: 183usize, name: Str::new("replay_detected_packet_dropped.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 182usize, + id: 184usize, name: Str::new("stale_key_packet_sent\0"), units: Units::None, } .build(), info::Builder { - id: 183usize, + id: 185usize, name: Str::new("stale_key_packet_sent.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 184usize, + id: 186usize, name: Str::new("stale_key_packet_received\0"), units: Units::None, } .build(), info::Builder { - id: 185usize, + id: 187usize, name: Str::new("stale_key_packet_received.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 186usize, + id: 188usize, name: Str::new("stale_key_packet_accepted\0"), units: Units::None, } .build(), info::Builder { - id: 187usize, + id: 189usize, name: Str::new("stale_key_packet_accepted.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 188usize, + id: 190usize, name: Str::new("stale_key_packet_rejected\0"), units: Units::None, } .build(), info::Builder { - id: 189usize, + id: 191usize, name: Str::new("stale_key_packet_rejected.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 190usize, + id: 192usize, name: Str::new("stale_key_packet_dropped\0"), units: Units::None, } .build(), info::Builder { - id: 191usize, + id: 193usize, name: Str::new("stale_key_packet_dropped.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 192usize, + id: 194usize, name: Str::new("path_secret_map_address_cache_accessed\0"), units: Units::None, } .build(), info::Builder { - id: 193usize, + id: 195usize, name: Str::new("path_secret_map_address_cache_accessed.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 194usize, + id: 196usize, name: Str::new("path_secret_map_address_cache_accessed.hit\0"), units: Units::None, } .build(), info::Builder { - id: 195usize, + id: 197usize, name: Str::new("path_secret_map_address_cache_accessed_hit\0"), units: Units::None, } .build(), info::Builder { - id: 196usize, + id: 198usize, name: Str::new("path_secret_map_address_cache_accessed_hit.peer_address.protocol\0"), units: Units::None, } .build(), info::Builder { - id: 197usize, + id: 199usize, name: Str::new("path_secret_map_address_cache_accessed_hit.age\0"), units: Units::Duration, } .build(), info::Builder { - id: 198usize, + id: 200usize, name: Str::new("path_secret_map_id_cache_accessed\0"), units: Units::None, } .build(), info::Builder { - id: 199usize, + id: 201usize, name: Str::new("path_secret_map_id_cache_accessed.hit\0"), units: Units::None, } .build(), info::Builder { - id: 200usize, + id: 202usize, name: Str::new("path_secret_map_id_cache_accessed_hit\0"), units: Units::None, } .build(), info::Builder { - id: 201usize, + id: 203usize, name: Str::new("path_secret_map_id_cache_accessed_hit.age\0"), units: Units::Duration, } .build(), info::Builder { - id: 202usize, + id: 204usize, name: Str::new("path_secret_map_cleaner_cycled\0"), units: Units::None, } .build(), info::Builder { - id: 203usize, + id: 205usize, name: Str::new("path_secret_map_cleaner_cycled.entries.id\0"), units: Units::None, } .build(), info::Builder { - id: 204usize, + id: 206usize, name: Str::new("path_secret_map_cleaner_cycled.entries.id.retired\0"), units: Units::None, } .build(), info::Builder { - id: 205usize, + id: 207usize, name: Str::new("path_secret_map_cleaner_cycled.entries.id.active\0"), units: Units::None, } .build(), info::Builder { - id: 206usize, + id: 208usize, name: Str::new("path_secret_map_cleaner_cycled.entries.id.active.utilization\0"), units: Units::Percent, } .build(), info::Builder { - id: 207usize, + id: 209usize, name: Str::new("path_secret_map_cleaner_cycled.entries.id.utilization\0"), units: Units::Percent, } .build(), info::Builder { - id: 208usize, + id: 210usize, name: Str::new("path_secret_map_cleaner_cycled.entries.id.utilization.initial\0"), units: Units::Percent, } .build(), info::Builder { - id: 209usize, + id: 211usize, name: Str::new("path_secret_map_cleaner_cycled.entries.address\0"), units: Units::None, } .build(), info::Builder { - id: 210usize, + id: 212usize, name: Str::new("path_secret_map_cleaner_cycled.entries.address.active\0"), units: Units::None, } .build(), info::Builder { - id: 211usize, + id: 213usize, name: Str::new("path_secret_map_cleaner_cycled.entries.address.active.utilization\0"), units: Units::Percent, } .build(), info::Builder { - id: 212usize, + id: 214usize, name: Str::new("path_secret_map_cleaner_cycled.entries.address.retired\0"), units: Units::None, } .build(), info::Builder { - id: 213usize, + id: 215usize, name: Str::new("path_secret_map_cleaner_cycled.entries.address.utilization\0"), units: Units::Percent, } .build(), info::Builder { - id: 214usize, + id: 216usize, name: Str::new("path_secret_map_cleaner_cycled.entries.address.utilization.initial\0"), units: Units::Percent, } .build(), info::Builder { - id: 215usize, + id: 217usize, name: Str::new("path_secret_map_cleaner_cycled.handshake_requests\0"), units: Units::None, } .build(), info::Builder { - id: 216usize, + id: 218usize, name: Str::new("path_secret_map_cleaner_cycled.handshake_requests.retired\0"), units: Units::None, } @@ -1346,7 +1358,7 @@ pub struct ConnectionContext { } pub struct Subscriber { #[allow(dead_code)] - counters: Box<[R::Counter; 72usize]>, + counters: Box<[R::Counter; 74usize]>, #[allow(dead_code)] bool_counters: Box<[R::BoolCounter; 12usize]>, #[allow(dead_code)] @@ -1381,7 +1393,7 @@ impl Subscriber { #[allow(unused_mut)] #[inline] pub fn new(registry: R) -> Self { - let mut counters = Vec::with_capacity(72usize); + let mut counters = Vec::with_capacity(74usize); let mut bool_counters = Vec::with_capacity(12usize); let mut nominal_counters = Vec::with_capacity(29usize); let mut nominal_counter_offsets = Vec::with_capacity(29usize); @@ -1415,38 +1427,39 @@ impl Subscriber { counters.push(registry.register_counter(&INFO[65usize])); counters.push(registry.register_counter(&INFO[71usize])); counters.push(registry.register_counter(&INFO[76usize])); - counters.push(registry.register_counter(&INFO[80usize])); - counters.push(registry.register_counter(&INFO[83usize])); - counters.push(registry.register_counter(&INFO[86usize])); - counters.push(registry.register_counter(&INFO[89usize])); - counters.push(registry.register_counter(&INFO[91usize])); - counters.push(registry.register_counter(&INFO[95usize])); - counters.push(registry.register_counter(&INFO[100usize])); - counters.push(registry.register_counter(&INFO[106usize])); - counters.push(registry.register_counter(&INFO[111usize])); - counters.push(registry.register_counter(&INFO[116usize])); - counters.push(registry.register_counter(&INFO[119usize])); - counters.push(registry.register_counter(&INFO[122usize])); - counters.push(registry.register_counter(&INFO[125usize])); - counters.push(registry.register_counter(&INFO[128usize])); + counters.push(registry.register_counter(&INFO[77usize])); + counters.push(registry.register_counter(&INFO[81usize])); + counters.push(registry.register_counter(&INFO[84usize])); + counters.push(registry.register_counter(&INFO[87usize])); + counters.push(registry.register_counter(&INFO[90usize])); + counters.push(registry.register_counter(&INFO[92usize])); + counters.push(registry.register_counter(&INFO[96usize])); + counters.push(registry.register_counter(&INFO[101usize])); + counters.push(registry.register_counter(&INFO[107usize])); + counters.push(registry.register_counter(&INFO[112usize])); + counters.push(registry.register_counter(&INFO[117usize])); + counters.push(registry.register_counter(&INFO[118usize])); + counters.push(registry.register_counter(&INFO[121usize])); + counters.push(registry.register_counter(&INFO[124usize])); + counters.push(registry.register_counter(&INFO[127usize])); counters.push(registry.register_counter(&INFO[130usize])); - counters.push(registry.register_counter(&INFO[131usize])); - counters.push(registry.register_counter(&INFO[136usize])); + counters.push(registry.register_counter(&INFO[132usize])); + counters.push(registry.register_counter(&INFO[133usize])); counters.push(registry.register_counter(&INFO[138usize])); - counters.push(registry.register_counter(&INFO[142usize])); + counters.push(registry.register_counter(&INFO[140usize])); counters.push(registry.register_counter(&INFO[144usize])); counters.push(registry.register_counter(&INFO[146usize])); counters.push(registry.register_counter(&INFO[148usize])); counters.push(registry.register_counter(&INFO[150usize])); - counters.push(registry.register_counter(&INFO[153usize])); - counters.push(registry.register_counter(&INFO[156usize])); + counters.push(registry.register_counter(&INFO[152usize])); + counters.push(registry.register_counter(&INFO[155usize])); counters.push(registry.register_counter(&INFO[158usize])); counters.push(registry.register_counter(&INFO[160usize])); counters.push(registry.register_counter(&INFO[162usize])); counters.push(registry.register_counter(&INFO[164usize])); counters.push(registry.register_counter(&INFO[166usize])); - counters.push(registry.register_counter(&INFO[169usize])); - counters.push(registry.register_counter(&INFO[170usize])); + counters.push(registry.register_counter(&INFO[168usize])); + counters.push(registry.register_counter(&INFO[171usize])); counters.push(registry.register_counter(&INFO[172usize])); counters.push(registry.register_counter(&INFO[174usize])); counters.push(registry.register_counter(&INFO[176usize])); @@ -1458,22 +1471,23 @@ impl Subscriber { counters.push(registry.register_counter(&INFO[188usize])); counters.push(registry.register_counter(&INFO[190usize])); counters.push(registry.register_counter(&INFO[192usize])); - counters.push(registry.register_counter(&INFO[195usize])); - counters.push(registry.register_counter(&INFO[198usize])); + counters.push(registry.register_counter(&INFO[194usize])); + counters.push(registry.register_counter(&INFO[197usize])); counters.push(registry.register_counter(&INFO[200usize])); counters.push(registry.register_counter(&INFO[202usize])); + counters.push(registry.register_counter(&INFO[204usize])); bool_counters.push(registry.register_bool_counter(&INFO[19usize])); bool_counters.push(registry.register_bool_counter(&INFO[20usize])); bool_counters.push(registry.register_bool_counter(&INFO[34usize])); bool_counters.push(registry.register_bool_counter(&INFO[35usize])); bool_counters.push(registry.register_bool_counter(&INFO[36usize])); bool_counters.push(registry.register_bool_counter(&INFO[37usize])); - bool_counters.push(registry.register_bool_counter(&INFO[79usize])); - bool_counters.push(registry.register_bool_counter(&INFO[118usize])); - bool_counters.push(registry.register_bool_counter(&INFO[134usize])); - bool_counters.push(registry.register_bool_counter(&INFO[135usize])); - bool_counters.push(registry.register_bool_counter(&INFO[194usize])); - bool_counters.push(registry.register_bool_counter(&INFO[199usize])); + bool_counters.push(registry.register_bool_counter(&INFO[80usize])); + bool_counters.push(registry.register_bool_counter(&INFO[120usize])); + bool_counters.push(registry.register_bool_counter(&INFO[136usize])); + bool_counters.push(registry.register_bool_counter(&INFO[137usize])); + bool_counters.push(registry.register_bool_counter(&INFO[196usize])); + bool_counters.push(registry.register_bool_counter(&INFO[201usize])); { #[allow(unused_imports)] use api::*; @@ -1526,7 +1540,7 @@ impl Subscriber { let mut count = 0; for variant in ::VARIANTS.iter() { nominal_counters - .push(registry.register_nominal_counter(&INFO[132usize], variant)); + .push(registry.register_nominal_counter(&INFO[134usize], variant)); count += 1; } debug_assert_ne!(count, 0, "field type needs at least one variant"); @@ -1537,18 +1551,7 @@ impl Subscriber { let mut count = 0; for variant in ::VARIANTS.iter() { nominal_counters - .push(registry.register_nominal_counter(&INFO[133usize], variant)); - count += 1; - } - debug_assert_ne!(count, 0, "field type needs at least one variant"); - nominal_counter_offsets.push(offset); - } - { - let offset = nominal_counters.len(); - let mut count = 0; - for variant in ::VARIANTS.iter() { - nominal_counters - .push(registry.register_nominal_counter(&INFO[143usize], variant)); + .push(registry.register_nominal_counter(&INFO[135usize], variant)); count += 1; } debug_assert_ne!(count, 0, "field type needs at least one variant"); @@ -1603,7 +1606,7 @@ impl Subscriber { let mut count = 0; for variant in ::VARIANTS.iter() { nominal_counters - .push(registry.register_nominal_counter(&INFO[154usize], variant)); + .push(registry.register_nominal_counter(&INFO[153usize], variant)); count += 1; } debug_assert_ne!(count, 0, "field type needs at least one variant"); @@ -1614,7 +1617,7 @@ impl Subscriber { let mut count = 0; for variant in ::VARIANTS.iter() { nominal_counters - .push(registry.register_nominal_counter(&INFO[157usize], variant)); + .push(registry.register_nominal_counter(&INFO[156usize], variant)); count += 1; } debug_assert_ne!(count, 0, "field type needs at least one variant"); @@ -1669,7 +1672,7 @@ impl Subscriber { let mut count = 0; for variant in ::VARIANTS.iter() { nominal_counters - .push(registry.register_nominal_counter(&INFO[173usize], variant)); + .push(registry.register_nominal_counter(&INFO[167usize], variant)); count += 1; } debug_assert_ne!(count, 0, "field type needs at least one variant"); @@ -1790,7 +1793,18 @@ impl Subscriber { let mut count = 0; for variant in ::VARIANTS.iter() { nominal_counters - .push(registry.register_nominal_counter(&INFO[196usize], variant)); + .push(registry.register_nominal_counter(&INFO[195usize], variant)); + count += 1; + } + debug_assert_ne!(count, 0, "field type needs at least one variant"); + nominal_counter_offsets.push(offset); + } + { + let offset = nominal_counters.len(); + let mut count = 0; + for variant in ::VARIANTS.iter() { + nominal_counters + .push(registry.register_nominal_counter(&INFO[198usize], variant)); count += 1; } debug_assert_ne!(count, 0, "field type needs at least one variant"); @@ -1828,50 +1842,48 @@ impl Subscriber { measures.push(registry.register_measure(&INFO[73usize])); measures.push(registry.register_measure(&INFO[74usize])); measures.push(registry.register_measure(&INFO[75usize])); - measures.push(registry.register_measure(&INFO[78usize])); - measures.push(registry.register_measure(&INFO[81usize])); + measures.push(registry.register_measure(&INFO[79usize])); measures.push(registry.register_measure(&INFO[82usize])); - measures.push(registry.register_measure(&INFO[84usize])); + measures.push(registry.register_measure(&INFO[83usize])); measures.push(registry.register_measure(&INFO[85usize])); - measures.push(registry.register_measure(&INFO[87usize])); + measures.push(registry.register_measure(&INFO[86usize])); measures.push(registry.register_measure(&INFO[88usize])); - measures.push(registry.register_measure(&INFO[90usize])); - measures.push(registry.register_measure(&INFO[93usize])); + measures.push(registry.register_measure(&INFO[89usize])); + measures.push(registry.register_measure(&INFO[91usize])); measures.push(registry.register_measure(&INFO[94usize])); - measures.push(registry.register_measure(&INFO[96usize])); + measures.push(registry.register_measure(&INFO[95usize])); measures.push(registry.register_measure(&INFO[97usize])); measures.push(registry.register_measure(&INFO[98usize])); measures.push(registry.register_measure(&INFO[99usize])); - measures.push(registry.register_measure(&INFO[102usize])); + measures.push(registry.register_measure(&INFO[100usize])); measures.push(registry.register_measure(&INFO[103usize])); measures.push(registry.register_measure(&INFO[104usize])); measures.push(registry.register_measure(&INFO[105usize])); - measures.push(registry.register_measure(&INFO[108usize])); + measures.push(registry.register_measure(&INFO[106usize])); measures.push(registry.register_measure(&INFO[109usize])); measures.push(registry.register_measure(&INFO[110usize])); - measures.push(registry.register_measure(&INFO[113usize])); + measures.push(registry.register_measure(&INFO[111usize])); measures.push(registry.register_measure(&INFO[114usize])); measures.push(registry.register_measure(&INFO[115usize])); - measures.push(registry.register_measure(&INFO[120usize])); - measures.push(registry.register_measure(&INFO[121usize])); + measures.push(registry.register_measure(&INFO[116usize])); + measures.push(registry.register_measure(&INFO[122usize])); measures.push(registry.register_measure(&INFO[123usize])); - measures.push(registry.register_measure(&INFO[124usize])); + measures.push(registry.register_measure(&INFO[125usize])); measures.push(registry.register_measure(&INFO[126usize])); - measures.push(registry.register_measure(&INFO[127usize])); + measures.push(registry.register_measure(&INFO[128usize])); measures.push(registry.register_measure(&INFO[129usize])); - measures.push(registry.register_measure(&INFO[137usize])); + measures.push(registry.register_measure(&INFO[131usize])); measures.push(registry.register_measure(&INFO[139usize])); - measures.push(registry.register_measure(&INFO[140usize])); measures.push(registry.register_measure(&INFO[141usize])); - measures.push(registry.register_measure(&INFO[152usize])); - measures.push(registry.register_measure(&INFO[155usize])); - measures.push(registry.register_measure(&INFO[167usize])); - measures.push(registry.register_measure(&INFO[168usize])); - measures.push(registry.register_measure(&INFO[171usize])); - measures.push(registry.register_measure(&INFO[197usize])); - measures.push(registry.register_measure(&INFO[201usize])); + measures.push(registry.register_measure(&INFO[142usize])); + measures.push(registry.register_measure(&INFO[143usize])); + measures.push(registry.register_measure(&INFO[154usize])); + measures.push(registry.register_measure(&INFO[157usize])); + measures.push(registry.register_measure(&INFO[169usize])); + measures.push(registry.register_measure(&INFO[170usize])); + measures.push(registry.register_measure(&INFO[173usize])); + measures.push(registry.register_measure(&INFO[199usize])); measures.push(registry.register_measure(&INFO[203usize])); - measures.push(registry.register_measure(&INFO[204usize])); measures.push(registry.register_measure(&INFO[205usize])); measures.push(registry.register_measure(&INFO[206usize])); measures.push(registry.register_measure(&INFO[207usize])); @@ -1884,6 +1896,8 @@ impl Subscriber { measures.push(registry.register_measure(&INFO[214usize])); measures.push(registry.register_measure(&INFO[215usize])); measures.push(registry.register_measure(&INFO[216usize])); + measures.push(registry.register_measure(&INFO[217usize])); + measures.push(registry.register_measure(&INFO[218usize])); timers.push(registry.register_timer(&INFO[5usize])); timers.push(registry.register_timer(&INFO[15usize])); timers.push(registry.register_timer(&INFO[21usize])); @@ -1895,12 +1909,12 @@ impl Subscriber { timers.push(registry.register_timer(&INFO[57usize])); timers.push(registry.register_timer(&INFO[66usize])); timers.push(registry.register_timer(&INFO[72usize])); - timers.push(registry.register_timer(&INFO[77usize])); - timers.push(registry.register_timer(&INFO[92usize])); - timers.push(registry.register_timer(&INFO[101usize])); - timers.push(registry.register_timer(&INFO[107usize])); - timers.push(registry.register_timer(&INFO[112usize])); - timers.push(registry.register_timer(&INFO[117usize])); + timers.push(registry.register_timer(&INFO[78usize])); + timers.push(registry.register_timer(&INFO[93usize])); + timers.push(registry.register_timer(&INFO[102usize])); + timers.push(registry.register_timer(&INFO[108usize])); + timers.push(registry.register_timer(&INFO[113usize])); + timers.push(registry.register_timer(&INFO[119usize])); { #[allow(unused_imports)] use api::*; @@ -1960,53 +1974,55 @@ impl Subscriber { 22usize => (&INFO[65usize], entry), 23usize => (&INFO[71usize], entry), 24usize => (&INFO[76usize], entry), - 25usize => (&INFO[80usize], entry), - 26usize => (&INFO[83usize], entry), - 27usize => (&INFO[86usize], entry), - 28usize => (&INFO[89usize], entry), - 29usize => (&INFO[91usize], entry), - 30usize => (&INFO[95usize], entry), - 31usize => (&INFO[100usize], entry), - 32usize => (&INFO[106usize], entry), - 33usize => (&INFO[111usize], entry), - 34usize => (&INFO[116usize], entry), - 35usize => (&INFO[119usize], entry), - 36usize => (&INFO[122usize], entry), - 37usize => (&INFO[125usize], entry), - 38usize => (&INFO[128usize], entry), - 39usize => (&INFO[130usize], entry), - 40usize => (&INFO[131usize], entry), - 41usize => (&INFO[136usize], entry), - 42usize => (&INFO[138usize], entry), - 43usize => (&INFO[142usize], entry), - 44usize => (&INFO[144usize], entry), - 45usize => (&INFO[146usize], entry), - 46usize => (&INFO[148usize], entry), - 47usize => (&INFO[150usize], entry), - 48usize => (&INFO[153usize], entry), - 49usize => (&INFO[156usize], entry), - 50usize => (&INFO[158usize], entry), - 51usize => (&INFO[160usize], entry), - 52usize => (&INFO[162usize], entry), - 53usize => (&INFO[164usize], entry), - 54usize => (&INFO[166usize], entry), - 55usize => (&INFO[169usize], entry), - 56usize => (&INFO[170usize], entry), - 57usize => (&INFO[172usize], entry), - 58usize => (&INFO[174usize], entry), - 59usize => (&INFO[176usize], entry), - 60usize => (&INFO[178usize], entry), - 61usize => (&INFO[180usize], entry), - 62usize => (&INFO[182usize], entry), - 63usize => (&INFO[184usize], entry), - 64usize => (&INFO[186usize], entry), - 65usize => (&INFO[188usize], entry), - 66usize => (&INFO[190usize], entry), - 67usize => (&INFO[192usize], entry), - 68usize => (&INFO[195usize], entry), - 69usize => (&INFO[198usize], entry), - 70usize => (&INFO[200usize], entry), - 71usize => (&INFO[202usize], entry), + 25usize => (&INFO[77usize], entry), + 26usize => (&INFO[81usize], entry), + 27usize => (&INFO[84usize], entry), + 28usize => (&INFO[87usize], entry), + 29usize => (&INFO[90usize], entry), + 30usize => (&INFO[92usize], entry), + 31usize => (&INFO[96usize], entry), + 32usize => (&INFO[101usize], entry), + 33usize => (&INFO[107usize], entry), + 34usize => (&INFO[112usize], entry), + 35usize => (&INFO[117usize], entry), + 36usize => (&INFO[118usize], entry), + 37usize => (&INFO[121usize], entry), + 38usize => (&INFO[124usize], entry), + 39usize => (&INFO[127usize], entry), + 40usize => (&INFO[130usize], entry), + 41usize => (&INFO[132usize], entry), + 42usize => (&INFO[133usize], entry), + 43usize => (&INFO[138usize], entry), + 44usize => (&INFO[140usize], entry), + 45usize => (&INFO[144usize], entry), + 46usize => (&INFO[146usize], entry), + 47usize => (&INFO[148usize], entry), + 48usize => (&INFO[150usize], entry), + 49usize => (&INFO[152usize], entry), + 50usize => (&INFO[155usize], entry), + 51usize => (&INFO[158usize], entry), + 52usize => (&INFO[160usize], entry), + 53usize => (&INFO[162usize], entry), + 54usize => (&INFO[164usize], entry), + 55usize => (&INFO[166usize], entry), + 56usize => (&INFO[168usize], entry), + 57usize => (&INFO[171usize], entry), + 58usize => (&INFO[172usize], entry), + 59usize => (&INFO[174usize], entry), + 60usize => (&INFO[176usize], entry), + 61usize => (&INFO[178usize], entry), + 62usize => (&INFO[180usize], entry), + 63usize => (&INFO[182usize], entry), + 64usize => (&INFO[184usize], entry), + 65usize => (&INFO[186usize], entry), + 66usize => (&INFO[188usize], entry), + 67usize => (&INFO[190usize], entry), + 68usize => (&INFO[192usize], entry), + 69usize => (&INFO[194usize], entry), + 70usize => (&INFO[197usize], entry), + 71usize => (&INFO[200usize], entry), + 72usize => (&INFO[202usize], entry), + 73usize => (&INFO[204usize], entry), _ => unsafe { core::hint::unreachable_unchecked() }, }) } @@ -2030,12 +2046,12 @@ impl Subscriber { 3usize => (&INFO[35usize], entry), 4usize => (&INFO[36usize], entry), 5usize => (&INFO[37usize], entry), - 6usize => (&INFO[79usize], entry), - 7usize => (&INFO[118usize], entry), - 8usize => (&INFO[134usize], entry), - 9usize => (&INFO[135usize], entry), - 10usize => (&INFO[194usize], entry), - 11usize => (&INFO[199usize], entry), + 6usize => (&INFO[80usize], entry), + 7usize => (&INFO[120usize], entry), + 8usize => (&INFO[136usize], entry), + 9usize => (&INFO[137usize], entry), + 10usize => (&INFO[196usize], entry), + 11usize => (&INFO[201usize], entry), _ => unsafe { core::hint::unreachable_unchecked() }, }) } @@ -2084,151 +2100,151 @@ impl Subscriber { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[132usize], entries, variants) + (&INFO[134usize], entries, variants) } 5usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[133usize], entries, variants) + (&INFO[135usize], entries, variants) } 6usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[143usize], entries, variants) + (&INFO[145usize], entries, variants) } 7usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[145usize], entries, variants) + (&INFO[147usize], entries, variants) } 8usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[147usize], entries, variants) + (&INFO[149usize], entries, variants) } 9usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[149usize], entries, variants) + (&INFO[151usize], entries, variants) } 10usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[151usize], entries, variants) + (&INFO[153usize], entries, variants) } 11usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[154usize], entries, variants) + (&INFO[156usize], entries, variants) } 12usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[157usize], entries, variants) + (&INFO[159usize], entries, variants) } 13usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[159usize], entries, variants) + (&INFO[161usize], entries, variants) } 14usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[161usize], entries, variants) + (&INFO[163usize], entries, variants) } 15usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[163usize], entries, variants) + (&INFO[165usize], entries, variants) } 16usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[165usize], entries, variants) + (&INFO[167usize], entries, variants) } 17usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[173usize], entries, variants) + (&INFO[175usize], entries, variants) } 18usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[175usize], entries, variants) + (&INFO[177usize], entries, variants) } 19usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[177usize], entries, variants) + (&INFO[179usize], entries, variants) } 20usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[179usize], entries, variants) + (&INFO[181usize], entries, variants) } 21usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[181usize], entries, variants) + (&INFO[183usize], entries, variants) } 22usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[183usize], entries, variants) + (&INFO[185usize], entries, variants) } 23usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[185usize], entries, variants) + (&INFO[187usize], entries, variants) } 24usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[187usize], entries, variants) + (&INFO[189usize], entries, variants) } 25usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[189usize], entries, variants) + (&INFO[191usize], entries, variants) } 26usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[191usize], entries, variants) + (&INFO[193usize], entries, variants) } 27usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[193usize], entries, variants) + (&INFO[195usize], entries, variants) } 28usize => { let offset = *entry; let variants = ::VARIANTS; let entries = &self.nominal_counters[offset..offset + variants.len()]; - (&INFO[196usize], entries, variants) + (&INFO[198usize], entries, variants) } _ => unsafe { core::hint::unreachable_unchecked() }, }) @@ -2279,62 +2295,62 @@ impl Subscriber { 28usize => (&INFO[73usize], entry), 29usize => (&INFO[74usize], entry), 30usize => (&INFO[75usize], entry), - 31usize => (&INFO[78usize], entry), - 32usize => (&INFO[81usize], entry), - 33usize => (&INFO[82usize], entry), - 34usize => (&INFO[84usize], entry), - 35usize => (&INFO[85usize], entry), - 36usize => (&INFO[87usize], entry), - 37usize => (&INFO[88usize], entry), - 38usize => (&INFO[90usize], entry), - 39usize => (&INFO[93usize], entry), - 40usize => (&INFO[94usize], entry), - 41usize => (&INFO[96usize], entry), - 42usize => (&INFO[97usize], entry), - 43usize => (&INFO[98usize], entry), - 44usize => (&INFO[99usize], entry), - 45usize => (&INFO[102usize], entry), - 46usize => (&INFO[103usize], entry), - 47usize => (&INFO[104usize], entry), - 48usize => (&INFO[105usize], entry), - 49usize => (&INFO[108usize], entry), - 50usize => (&INFO[109usize], entry), - 51usize => (&INFO[110usize], entry), - 52usize => (&INFO[113usize], entry), - 53usize => (&INFO[114usize], entry), - 54usize => (&INFO[115usize], entry), - 55usize => (&INFO[120usize], entry), - 56usize => (&INFO[121usize], entry), - 57usize => (&INFO[123usize], entry), - 58usize => (&INFO[124usize], entry), - 59usize => (&INFO[126usize], entry), - 60usize => (&INFO[127usize], entry), - 61usize => (&INFO[129usize], entry), - 62usize => (&INFO[137usize], entry), - 63usize => (&INFO[139usize], entry), - 64usize => (&INFO[140usize], entry), - 65usize => (&INFO[141usize], entry), - 66usize => (&INFO[152usize], entry), - 67usize => (&INFO[155usize], entry), - 68usize => (&INFO[167usize], entry), - 69usize => (&INFO[168usize], entry), - 70usize => (&INFO[171usize], entry), - 71usize => (&INFO[197usize], entry), - 72usize => (&INFO[201usize], entry), - 73usize => (&INFO[203usize], entry), - 74usize => (&INFO[204usize], entry), - 75usize => (&INFO[205usize], entry), - 76usize => (&INFO[206usize], entry), - 77usize => (&INFO[207usize], entry), - 78usize => (&INFO[208usize], entry), - 79usize => (&INFO[209usize], entry), - 80usize => (&INFO[210usize], entry), - 81usize => (&INFO[211usize], entry), - 82usize => (&INFO[212usize], entry), - 83usize => (&INFO[213usize], entry), - 84usize => (&INFO[214usize], entry), - 85usize => (&INFO[215usize], entry), - 86usize => (&INFO[216usize], entry), + 31usize => (&INFO[79usize], entry), + 32usize => (&INFO[82usize], entry), + 33usize => (&INFO[83usize], entry), + 34usize => (&INFO[85usize], entry), + 35usize => (&INFO[86usize], entry), + 36usize => (&INFO[88usize], entry), + 37usize => (&INFO[89usize], entry), + 38usize => (&INFO[91usize], entry), + 39usize => (&INFO[94usize], entry), + 40usize => (&INFO[95usize], entry), + 41usize => (&INFO[97usize], entry), + 42usize => (&INFO[98usize], entry), + 43usize => (&INFO[99usize], entry), + 44usize => (&INFO[100usize], entry), + 45usize => (&INFO[103usize], entry), + 46usize => (&INFO[104usize], entry), + 47usize => (&INFO[105usize], entry), + 48usize => (&INFO[106usize], entry), + 49usize => (&INFO[109usize], entry), + 50usize => (&INFO[110usize], entry), + 51usize => (&INFO[111usize], entry), + 52usize => (&INFO[114usize], entry), + 53usize => (&INFO[115usize], entry), + 54usize => (&INFO[116usize], entry), + 55usize => (&INFO[122usize], entry), + 56usize => (&INFO[123usize], entry), + 57usize => (&INFO[125usize], entry), + 58usize => (&INFO[126usize], entry), + 59usize => (&INFO[128usize], entry), + 60usize => (&INFO[129usize], entry), + 61usize => (&INFO[131usize], entry), + 62usize => (&INFO[139usize], entry), + 63usize => (&INFO[141usize], entry), + 64usize => (&INFO[142usize], entry), + 65usize => (&INFO[143usize], entry), + 66usize => (&INFO[154usize], entry), + 67usize => (&INFO[157usize], entry), + 68usize => (&INFO[169usize], entry), + 69usize => (&INFO[170usize], entry), + 70usize => (&INFO[173usize], entry), + 71usize => (&INFO[199usize], entry), + 72usize => (&INFO[203usize], entry), + 73usize => (&INFO[205usize], entry), + 74usize => (&INFO[206usize], entry), + 75usize => (&INFO[207usize], entry), + 76usize => (&INFO[208usize], entry), + 77usize => (&INFO[209usize], entry), + 78usize => (&INFO[210usize], entry), + 79usize => (&INFO[211usize], entry), + 80usize => (&INFO[212usize], entry), + 81usize => (&INFO[213usize], entry), + 82usize => (&INFO[214usize], entry), + 83usize => (&INFO[215usize], entry), + 84usize => (&INFO[216usize], entry), + 85usize => (&INFO[217usize], entry), + 86usize => (&INFO[218usize], entry), _ => unsafe { core::hint::unreachable_unchecked() }, }) } @@ -2375,12 +2391,12 @@ impl Subscriber { 8usize => (&INFO[57usize], entry), 9usize => (&INFO[66usize], entry), 10usize => (&INFO[72usize], entry), - 11usize => (&INFO[77usize], entry), - 12usize => (&INFO[92usize], entry), - 13usize => (&INFO[101usize], entry), - 14usize => (&INFO[107usize], entry), - 15usize => (&INFO[112usize], entry), - 16usize => (&INFO[117usize], entry), + 11usize => (&INFO[78usize], entry), + 12usize => (&INFO[93usize], entry), + 13usize => (&INFO[102usize], entry), + 14usize => (&INFO[108usize], entry), + 15usize => (&INFO[113usize], entry), + 16usize => (&INFO[119usize], entry), _ => unsafe { core::hint::unreachable_unchecked() }, }) } @@ -2778,6 +2794,20 @@ impl event::Subscriber for Subscriber { let _ = event; } #[inline] + fn on_stream_write_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamWriteKeyUpdated, + ) { + #[allow(unused_imports)] + use api::*; + self.count(76usize, 24usize, 1usize); + let _ = context; + let _ = meta; + let _ = event; + } + #[inline] fn on_stream_write_shutdown( &self, context: &Self::ConnectionContext, @@ -2786,14 +2816,14 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(76usize, 24usize, 1usize); + self.count(77usize, 25usize, 1usize); self.time( - 77usize, + 78usize, 11usize, meta.timestamp.saturating_duration_since(context.start_time), ); - self.measure(78usize, 31usize, event.buffer_len); - self.count_bool(79usize, 6usize, event.background); + self.measure(79usize, 31usize, event.buffer_len); + self.count_bool(80usize, 6usize, event.background); let _ = context; let _ = meta; let _ = event; @@ -2807,11 +2837,11 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(80usize, 25usize, 1usize); + self.count(81usize, 26usize, 1usize); context.ctr_32.fetch_add(1, Ordering::Relaxed); - self.measure(82usize, 33usize, event.provided_len); - self.count(83usize, 26usize, event.committed_len); - self.measure(84usize, 34usize, event.committed_len); + self.measure(83usize, 33usize, event.provided_len); + self.count(84usize, 27usize, event.committed_len); + self.measure(85usize, 34usize, event.committed_len); context .ctr_35 .fetch_add(event.committed_len.as_u64(), Ordering::Relaxed); @@ -2828,9 +2858,9 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(86usize, 27usize, 1usize); + self.count(87usize, 28usize, 1usize); context.ctr_36.fetch_add(1, Ordering::Relaxed); - self.measure(88usize, 37usize, event.provided_len); + self.measure(89usize, 37usize, event.provided_len); let _ = context; let _ = meta; let _ = event; @@ -2844,8 +2874,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(89usize, 28usize, 1usize); - self.measure(90usize, 38usize, event.provided_len); + self.count(90usize, 29usize, 1usize); + self.measure(91usize, 38usize, event.provided_len); let _ = context; let _ = meta; let _ = event; @@ -2859,20 +2889,20 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(91usize, 29usize, 1usize); + self.count(92usize, 30usize, 1usize); self.time( - 92usize, + 93usize, 12usize, meta.timestamp.saturating_duration_since(context.start_time), ); context.ctr_39.fetch_add(1, Ordering::Relaxed); - self.measure(94usize, 40usize, event.capacity); - self.count(95usize, 30usize, event.committed_len); - self.measure(96usize, 41usize, event.committed_len); + self.measure(95usize, 40usize, event.capacity); + self.count(96usize, 31usize, event.committed_len); + self.measure(97usize, 41usize, event.committed_len); context .ctr_42 .fetch_add(event.committed_len.as_u64(), Ordering::Relaxed); - self.measure(98usize, 43usize, event.processing_duration); + self.measure(99usize, 43usize, event.processing_duration); context .ctr_44 .fetch_add(event.processing_duration.as_u64(), Ordering::Relaxed); @@ -2889,15 +2919,15 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(100usize, 31usize, 1usize); + self.count(101usize, 32usize, 1usize); self.time( - 101usize, + 102usize, 13usize, meta.timestamp.saturating_duration_since(context.start_time), ); context.ctr_45.fetch_add(1, Ordering::Relaxed); - self.measure(103usize, 46usize, event.capacity); - self.measure(104usize, 47usize, event.processing_duration); + self.measure(104usize, 46usize, event.capacity); + self.measure(105usize, 47usize, event.processing_duration); context .ctr_48 .fetch_add(event.processing_duration.as_u64(), Ordering::Relaxed); @@ -2914,14 +2944,14 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(106usize, 32usize, 1usize); + self.count(107usize, 33usize, 1usize); self.time( - 107usize, + 108usize, 14usize, meta.timestamp.saturating_duration_since(context.start_time), ); - self.measure(108usize, 49usize, event.capacity); - self.measure(109usize, 50usize, event.processing_duration); + self.measure(109usize, 49usize, event.capacity); + self.measure(110usize, 50usize, event.processing_duration); context .ctr_51 .fetch_add(event.processing_duration.as_u64(), Ordering::Relaxed); @@ -2938,14 +2968,14 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(111usize, 33usize, 1usize); + self.count(112usize, 34usize, 1usize); self.time( - 112usize, + 113usize, 15usize, meta.timestamp.saturating_duration_since(context.start_time), ); - self.measure(113usize, 52usize, event.capacity); - self.measure(114usize, 53usize, event.processing_duration); + self.measure(114usize, 52usize, event.capacity); + self.measure(115usize, 53usize, event.processing_duration); context .ctr_54 .fetch_add(event.processing_duration.as_u64(), Ordering::Relaxed); @@ -2954,6 +2984,20 @@ impl event::Subscriber for Subscriber { let _ = event; } #[inline] + fn on_stream_read_key_updated( + &self, + context: &Self::ConnectionContext, + meta: &api::ConnectionMeta, + event: &api::StreamReadKeyUpdated, + ) { + #[allow(unused_imports)] + use api::*; + self.count(117usize, 35usize, 1usize); + let _ = context; + let _ = meta; + let _ = event; + } + #[inline] fn on_stream_read_shutdown( &self, context: &Self::ConnectionContext, @@ -2962,13 +3006,13 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(116usize, 34usize, 1usize); + self.count(118usize, 36usize, 1usize); self.time( - 117usize, + 119usize, 16usize, meta.timestamp.saturating_duration_since(context.start_time), ); - self.count_bool(118usize, 7usize, event.background); + self.count_bool(120usize, 7usize, event.background); let _ = context; let _ = meta; let _ = event; @@ -2982,11 +3026,11 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(119usize, 35usize, 1usize); + self.count(121usize, 37usize, 1usize); context.ctr_55.fetch_add(1, Ordering::Relaxed); - self.measure(121usize, 56usize, event.capacity); - self.count(122usize, 36usize, event.committed_len); - self.measure(123usize, 57usize, event.committed_len); + self.measure(123usize, 56usize, event.capacity); + self.count(124usize, 38usize, event.committed_len); + self.measure(125usize, 57usize, event.committed_len); context .ctr_58 .fetch_add(event.committed_len.as_u64(), Ordering::Relaxed); @@ -3003,9 +3047,9 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(125usize, 37usize, 1usize); + self.count(127usize, 39usize, 1usize); context.ctr_59.fetch_add(1, Ordering::Relaxed); - self.measure(127usize, 60usize, event.capacity); + self.measure(129usize, 60usize, event.capacity); let _ = context; let _ = meta; let _ = event; @@ -3019,8 +3063,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(128usize, 38usize, 1usize); - self.measure(129usize, 61usize, event.capacity); + self.count(130usize, 40usize, 1usize); + self.measure(131usize, 61usize, event.capacity); let _ = context; let _ = meta; let _ = event; @@ -3034,7 +3078,7 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(130usize, 39usize, 1usize); + self.count(132usize, 41usize, 1usize); self.measure(49usize, 12usize, context.ctr_12.load(Ordering::Relaxed)); self.measure(53usize, 15usize, context.ctr_15.load(Ordering::Relaxed)); self.measure( @@ -3060,35 +3104,35 @@ impl event::Subscriber for Subscriber { 30usize, core::time::Duration::from_micros(context.ctr_30.load(Ordering::Relaxed)), ); - self.measure(81usize, 32usize, context.ctr_32.load(Ordering::Relaxed)); - self.measure(85usize, 35usize, context.ctr_35.load(Ordering::Relaxed)); - self.measure(87usize, 36usize, context.ctr_36.load(Ordering::Relaxed)); - self.measure(93usize, 39usize, context.ctr_39.load(Ordering::Relaxed)); - self.measure(97usize, 42usize, context.ctr_42.load(Ordering::Relaxed)); + self.measure(82usize, 32usize, context.ctr_32.load(Ordering::Relaxed)); + self.measure(86usize, 35usize, context.ctr_35.load(Ordering::Relaxed)); + self.measure(88usize, 36usize, context.ctr_36.load(Ordering::Relaxed)); + self.measure(94usize, 39usize, context.ctr_39.load(Ordering::Relaxed)); + self.measure(98usize, 42usize, context.ctr_42.load(Ordering::Relaxed)); self.measure( - 99usize, + 100usize, 44usize, core::time::Duration::from_micros(context.ctr_44.load(Ordering::Relaxed)), ); - self.measure(102usize, 45usize, context.ctr_45.load(Ordering::Relaxed)); + self.measure(103usize, 45usize, context.ctr_45.load(Ordering::Relaxed)); self.measure( - 105usize, + 106usize, 48usize, core::time::Duration::from_micros(context.ctr_48.load(Ordering::Relaxed)), ); self.measure( - 110usize, + 111usize, 51usize, core::time::Duration::from_micros(context.ctr_51.load(Ordering::Relaxed)), ); self.measure( - 115usize, + 116usize, 54usize, core::time::Duration::from_micros(context.ctr_54.load(Ordering::Relaxed)), ); - self.measure(120usize, 55usize, context.ctr_55.load(Ordering::Relaxed)); - self.measure(124usize, 58usize, context.ctr_58.load(Ordering::Relaxed)); - self.measure(126usize, 59usize, context.ctr_59.load(Ordering::Relaxed)); + self.measure(122usize, 55usize, context.ctr_55.load(Ordering::Relaxed)); + self.measure(126usize, 58usize, context.ctr_58.load(Ordering::Relaxed)); + self.measure(128usize, 59usize, context.ctr_59.load(Ordering::Relaxed)); let _ = context; let _ = meta; let _ = event; @@ -3097,11 +3141,11 @@ impl event::Subscriber for Subscriber { fn on_endpoint_initialized(&self, meta: &api::EndpointMeta, event: &api::EndpointInitialized) { #[allow(unused_imports)] use api::*; - self.count(131usize, 40usize, 1usize); - self.count_nominal(132usize, 4usize, &event.acceptor_addr); - self.count_nominal(133usize, 5usize, &event.handshake_addr); - self.count_bool(134usize, 8usize, event.tcp); - self.count_bool(135usize, 9usize, event.udp); + self.count(133usize, 42usize, 1usize); + self.count_nominal(134usize, 4usize, &event.acceptor_addr); + self.count_nominal(135usize, 5usize, &event.handshake_addr); + self.count_bool(136usize, 8usize, event.tcp); + self.count_bool(137usize, 9usize, event.udp); let _ = event; let _ = meta; } @@ -3113,8 +3157,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(136usize, 41usize, 1usize); - self.measure(137usize, 62usize, event.capacity); + self.count(138usize, 43usize, 1usize); + self.measure(139usize, 62usize, event.capacity); let _ = event; let _ = meta; } @@ -3126,10 +3170,10 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(138usize, 42usize, 1usize); - self.measure(139usize, 63usize, event.capacity); - self.measure(140usize, 64usize, event.entries); - self.measure(141usize, 65usize, event.lifetime); + self.count(140usize, 44usize, 1usize); + self.measure(141usize, 63usize, event.capacity); + self.measure(142usize, 64usize, event.entries); + self.measure(143usize, 65usize, event.lifetime); let _ = event; let _ = meta; } @@ -3141,8 +3185,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(142usize, 43usize, 1usize); - self.count_nominal(143usize, 6usize, &event.peer_address); + self.count(144usize, 45usize, 1usize); + self.count_nominal(145usize, 6usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3154,8 +3198,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(144usize, 44usize, 1usize); - self.count_nominal(145usize, 7usize, &event.peer_address); + self.count(146usize, 46usize, 1usize); + self.count_nominal(147usize, 7usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3167,8 +3211,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(146usize, 45usize, 1usize); - self.count_nominal(147usize, 8usize, &event.peer_address); + self.count(148usize, 47usize, 1usize); + self.count_nominal(149usize, 8usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3180,8 +3224,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(148usize, 46usize, 1usize); - self.count_nominal(149usize, 9usize, &event.peer_address); + self.count(150usize, 48usize, 1usize); + self.count_nominal(151usize, 9usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3193,9 +3237,9 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(150usize, 47usize, 1usize); - self.count_nominal(151usize, 10usize, &event.peer_address); - self.measure(152usize, 66usize, event.age); + self.count(152usize, 49usize, 1usize); + self.count_nominal(153usize, 10usize, &event.peer_address); + self.measure(154usize, 66usize, event.age); let _ = event; let _ = meta; } @@ -3207,9 +3251,9 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(153usize, 48usize, 1usize); - self.count_nominal(154usize, 11usize, &event.peer_address); - self.measure(155usize, 67usize, event.age); + self.count(155usize, 50usize, 1usize); + self.count_nominal(156usize, 11usize, &event.peer_address); + self.measure(157usize, 67usize, event.age); let _ = event; let _ = meta; } @@ -3221,8 +3265,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(156usize, 49usize, 1usize); - self.count_nominal(157usize, 12usize, &event.peer_address); + self.count(158usize, 51usize, 1usize); + self.count_nominal(159usize, 12usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3234,8 +3278,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(158usize, 50usize, 1usize); - self.count_nominal(159usize, 13usize, &event.peer_address); + self.count(160usize, 52usize, 1usize); + self.count_nominal(161usize, 13usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3247,8 +3291,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(160usize, 51usize, 1usize); - self.count_nominal(161usize, 14usize, &event.peer_address); + self.count(162usize, 53usize, 1usize); + self.count_nominal(163usize, 14usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3260,8 +3304,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(162usize, 52usize, 1usize); - self.count_nominal(163usize, 15usize, &event.peer_address); + self.count(164usize, 54usize, 1usize); + self.count_nominal(165usize, 15usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3273,8 +3317,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(164usize, 53usize, 1usize); - self.count_nominal(165usize, 16usize, &event.peer_address); + self.count(166usize, 55usize, 1usize); + self.count_nominal(167usize, 16usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3282,9 +3326,9 @@ impl event::Subscriber for Subscriber { fn on_key_accepted(&self, meta: &api::EndpointMeta, event: &api::KeyAccepted) { #[allow(unused_imports)] use api::*; - self.count(166usize, 54usize, 1usize); - self.measure(167usize, 68usize, event.gap); - self.measure(168usize, 69usize, event.forward_shift); + self.count(168usize, 56usize, 1usize); + self.measure(169usize, 68usize, event.gap); + self.measure(170usize, 69usize, event.forward_shift); let _ = event; let _ = meta; } @@ -3296,7 +3340,7 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(169usize, 55usize, 1usize); + self.count(171usize, 57usize, 1usize); let _ = event; let _ = meta; } @@ -3308,8 +3352,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(170usize, 56usize, 1usize); - self.measure(171usize, 70usize, event.gap); + self.count(172usize, 58usize, 1usize); + self.measure(173usize, 70usize, event.gap); let _ = event; let _ = meta; } @@ -3321,8 +3365,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(172usize, 57usize, 1usize); - self.count_nominal(173usize, 17usize, &event.peer_address); + self.count(174usize, 59usize, 1usize); + self.count_nominal(175usize, 17usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3334,8 +3378,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(174usize, 58usize, 1usize); - self.count_nominal(175usize, 18usize, &event.peer_address); + self.count(176usize, 60usize, 1usize); + self.count_nominal(177usize, 18usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3347,8 +3391,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(176usize, 59usize, 1usize); - self.count_nominal(177usize, 19usize, &event.peer_address); + self.count(178usize, 61usize, 1usize); + self.count_nominal(179usize, 19usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3360,8 +3404,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(178usize, 60usize, 1usize); - self.count_nominal(179usize, 20usize, &event.peer_address); + self.count(180usize, 62usize, 1usize); + self.count_nominal(181usize, 20usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3373,8 +3417,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(180usize, 61usize, 1usize); - self.count_nominal(181usize, 21usize, &event.peer_address); + self.count(182usize, 63usize, 1usize); + self.count_nominal(183usize, 21usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3382,8 +3426,8 @@ impl event::Subscriber for Subscriber { fn on_stale_key_packet_sent(&self, meta: &api::EndpointMeta, event: &api::StaleKeyPacketSent) { #[allow(unused_imports)] use api::*; - self.count(182usize, 62usize, 1usize); - self.count_nominal(183usize, 22usize, &event.peer_address); + self.count(184usize, 64usize, 1usize); + self.count_nominal(185usize, 22usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3395,8 +3439,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(184usize, 63usize, 1usize); - self.count_nominal(185usize, 23usize, &event.peer_address); + self.count(186usize, 65usize, 1usize); + self.count_nominal(187usize, 23usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3408,8 +3452,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(186usize, 64usize, 1usize); - self.count_nominal(187usize, 24usize, &event.peer_address); + self.count(188usize, 66usize, 1usize); + self.count_nominal(189usize, 24usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3421,8 +3465,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(188usize, 65usize, 1usize); - self.count_nominal(189usize, 25usize, &event.peer_address); + self.count(190usize, 67usize, 1usize); + self.count_nominal(191usize, 25usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3434,8 +3478,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(190usize, 66usize, 1usize); - self.count_nominal(191usize, 26usize, &event.peer_address); + self.count(192usize, 68usize, 1usize); + self.count_nominal(193usize, 26usize, &event.peer_address); let _ = event; let _ = meta; } @@ -3447,9 +3491,9 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(192usize, 67usize, 1usize); - self.count_nominal(193usize, 27usize, &event.peer_address); - self.count_bool(194usize, 10usize, event.hit); + self.count(194usize, 69usize, 1usize); + self.count_nominal(195usize, 27usize, &event.peer_address); + self.count_bool(196usize, 10usize, event.hit); let _ = event; let _ = meta; } @@ -3461,9 +3505,9 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(195usize, 68usize, 1usize); - self.count_nominal(196usize, 28usize, &event.peer_address); - self.measure(197usize, 71usize, event.age); + self.count(197usize, 70usize, 1usize); + self.count_nominal(198usize, 28usize, &event.peer_address); + self.measure(199usize, 71usize, event.age); let _ = event; let _ = meta; } @@ -3475,8 +3519,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(198usize, 69usize, 1usize); - self.count_bool(199usize, 11usize, event.hit); + self.count(200usize, 71usize, 1usize); + self.count_bool(201usize, 11usize, event.hit); let _ = event; let _ = meta; } @@ -3488,8 +3532,8 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(200usize, 70usize, 1usize); - self.measure(201usize, 72usize, event.age); + self.count(202usize, 72usize, 1usize); + self.measure(203usize, 72usize, event.age); let _ = event; let _ = meta; } @@ -3501,21 +3545,21 @@ impl event::Subscriber for Subscriber { ) { #[allow(unused_imports)] use api::*; - self.count(202usize, 71usize, 1usize); - self.measure(203usize, 73usize, event.id_entries); - self.measure(204usize, 74usize, event.id_entries_retired); - self.measure(205usize, 75usize, event.id_entries_active); - self.measure(206usize, 76usize, event.id_entries_active_utilization); - self.measure(207usize, 77usize, event.id_entries_utilization); - self.measure(208usize, 78usize, event.id_entries_initial_utilization); - self.measure(209usize, 79usize, event.address_entries); - self.measure(210usize, 80usize, event.address_entries_active); - self.measure(211usize, 81usize, event.address_entries_active_utilization); - self.measure(212usize, 82usize, event.address_entries_retired); - self.measure(213usize, 83usize, event.address_entries_utilization); - self.measure(214usize, 84usize, event.address_entries_initial_utilization); - self.measure(215usize, 85usize, event.handshake_requests); - self.measure(216usize, 86usize, event.handshake_requests_retired); + self.count(204usize, 73usize, 1usize); + self.measure(205usize, 73usize, event.id_entries); + self.measure(206usize, 74usize, event.id_entries_retired); + self.measure(207usize, 75usize, event.id_entries_active); + self.measure(208usize, 76usize, event.id_entries_active_utilization); + self.measure(209usize, 77usize, event.id_entries_utilization); + self.measure(210usize, 78usize, event.id_entries_initial_utilization); + self.measure(211usize, 79usize, event.address_entries); + self.measure(212usize, 80usize, event.address_entries_active); + self.measure(213usize, 81usize, event.address_entries_active_utilization); + self.measure(214usize, 82usize, event.address_entries_retired); + self.measure(215usize, 83usize, event.address_entries_utilization); + self.measure(216usize, 84usize, event.address_entries_initial_utilization); + self.measure(217usize, 85usize, event.handshake_requests); + self.measure(218usize, 86usize, event.handshake_requests_retired); let _ = event; let _ = meta; } diff --git a/dc/s2n-quic-dc/src/event/generated/metrics/probe.rs b/dc/s2n-quic-dc/src/event/generated/metrics/probe.rs index 0289a61ad..ad33ddd41 100644 --- a/dc/s2n-quic-dc/src/event/generated/metrics/probe.rs +++ b/dc/s2n-quic-dc/src/event/generated/metrics/probe.rs @@ -41,54 +41,56 @@ mod counter { 60usize => Self(stream_write_fin_flushed__committed__total), 65usize => Self(stream_write_blocked), 71usize => Self(stream_write_errored), - 76usize => Self(stream_write_shutdown), - 80usize => Self(stream_write_socket_flushed), - 83usize => Self(stream_write_socket_flushed__committed__total), - 86usize => Self(stream_write_socket_blocked), - 89usize => Self(stream_write_socket_errored), - 91usize => Self(stream_read_flushed), - 95usize => Self(stream_read_flushed__committed__total), - 100usize => Self(stream_read_fin_flushed), - 106usize => Self(stream_read_blocked), - 111usize => Self(stream_read_errored), - 116usize => Self(stream_read_shutdown), - 119usize => Self(stream_read_socket_flushed), - 122usize => Self(stream_read_socket_flushed__committed__total), - 125usize => Self(stream_read_socket_blocked), - 128usize => Self(stream_read_socket_errored), - 130usize => Self(connection_closed), - 131usize => Self(endpoint_initialized), - 136usize => Self(path_secret_map_initialized), - 138usize => Self(path_secret_map_uninitialized), - 142usize => Self(path_secret_map_background_handshake_requested), - 144usize => Self(path_secret_map_entry_inserted), - 146usize => Self(path_secret_map_entry_ready), - 148usize => Self(path_secret_map_entry_replaced), - 150usize => Self(path_secret_map_id_entry_evicted), - 153usize => Self(path_secret_map_address_entry_evicted), - 156usize => Self(unknown_path_secret_packet_sent), - 158usize => Self(unknown_path_secret_packet_received), - 160usize => Self(unknown_path_secret_packet_accepted), - 162usize => Self(unknown_path_secret_packet_rejected), - 164usize => Self(unknown_path_secret_packet_dropped), - 166usize => Self(key_accepted), - 169usize => Self(replay_definitely_detected), - 170usize => Self(replay_potentially_detected), - 172usize => Self(replay_detected_packet_sent), - 174usize => Self(replay_detected_packet_received), - 176usize => Self(replay_detected_packet_accepted), - 178usize => Self(replay_detected_packet_rejected), - 180usize => Self(replay_detected_packet_dropped), - 182usize => Self(stale_key_packet_sent), - 184usize => Self(stale_key_packet_received), - 186usize => Self(stale_key_packet_accepted), - 188usize => Self(stale_key_packet_rejected), - 190usize => Self(stale_key_packet_dropped), - 192usize => Self(path_secret_map_address_cache_accessed), - 195usize => Self(path_secret_map_address_cache_accessed_hit), - 198usize => Self(path_secret_map_id_cache_accessed), - 200usize => Self(path_secret_map_id_cache_accessed_hit), - 202usize => Self(path_secret_map_cleaner_cycled), + 76usize => Self(stream_write_key_updated), + 77usize => Self(stream_write_shutdown), + 81usize => Self(stream_write_socket_flushed), + 84usize => Self(stream_write_socket_flushed__committed__total), + 87usize => Self(stream_write_socket_blocked), + 90usize => Self(stream_write_socket_errored), + 92usize => Self(stream_read_flushed), + 96usize => Self(stream_read_flushed__committed__total), + 101usize => Self(stream_read_fin_flushed), + 107usize => Self(stream_read_blocked), + 112usize => Self(stream_read_errored), + 117usize => Self(stream_read_key_updated), + 118usize => Self(stream_read_shutdown), + 121usize => Self(stream_read_socket_flushed), + 124usize => Self(stream_read_socket_flushed__committed__total), + 127usize => Self(stream_read_socket_blocked), + 130usize => Self(stream_read_socket_errored), + 132usize => Self(connection_closed), + 133usize => Self(endpoint_initialized), + 138usize => Self(path_secret_map_initialized), + 140usize => Self(path_secret_map_uninitialized), + 144usize => Self(path_secret_map_background_handshake_requested), + 146usize => Self(path_secret_map_entry_inserted), + 148usize => Self(path_secret_map_entry_ready), + 150usize => Self(path_secret_map_entry_replaced), + 152usize => Self(path_secret_map_id_entry_evicted), + 155usize => Self(path_secret_map_address_entry_evicted), + 158usize => Self(unknown_path_secret_packet_sent), + 160usize => Self(unknown_path_secret_packet_received), + 162usize => Self(unknown_path_secret_packet_accepted), + 164usize => Self(unknown_path_secret_packet_rejected), + 166usize => Self(unknown_path_secret_packet_dropped), + 168usize => Self(key_accepted), + 171usize => Self(replay_definitely_detected), + 172usize => Self(replay_potentially_detected), + 174usize => Self(replay_detected_packet_sent), + 176usize => Self(replay_detected_packet_received), + 178usize => Self(replay_detected_packet_accepted), + 180usize => Self(replay_detected_packet_rejected), + 182usize => Self(replay_detected_packet_dropped), + 184usize => Self(stale_key_packet_sent), + 186usize => Self(stale_key_packet_received), + 188usize => Self(stale_key_packet_accepted), + 190usize => Self(stale_key_packet_rejected), + 192usize => Self(stale_key_packet_dropped), + 194usize => Self(path_secret_map_address_cache_accessed), + 197usize => Self(path_secret_map_address_cache_accessed_hit), + 200usize => Self(path_secret_map_id_cache_accessed), + 202usize => Self(path_secret_map_id_cache_accessed_hit), + 204usize => Self(path_secret_map_cleaner_cycled), _ => unreachable!("invalid info: {info:?}"), } } @@ -148,6 +150,8 @@ mod counter { fn stream_write_blocked(value: u64); # [link_name = s2n_quic_dc__event__counter__stream_write_errored] fn stream_write_errored(value: u64); + # [link_name = s2n_quic_dc__event__counter__stream_write_key_updated] + fn stream_write_key_updated(value: u64); # [link_name = s2n_quic_dc__event__counter__stream_write_shutdown] fn stream_write_shutdown(value: u64); # [link_name = s2n_quic_dc__event__counter__stream_write_socket_flushed] @@ -168,6 +172,8 @@ mod counter { fn stream_read_blocked(value: u64); # [link_name = s2n_quic_dc__event__counter__stream_read_errored] fn stream_read_errored(value: u64); + # [link_name = s2n_quic_dc__event__counter__stream_read_key_updated] + fn stream_read_key_updated(value: u64); # [link_name = s2n_quic_dc__event__counter__stream_read_shutdown] fn stream_read_shutdown(value: u64); # [link_name = s2n_quic_dc__event__counter__stream_read_socket_flushed] @@ -259,12 +265,12 @@ mod counter { 35usize => Self(acceptor_udp_packet_received__is_retransmisson), 36usize => Self(acceptor_udp_packet_received__is_fin), 37usize => Self(acceptor_udp_packet_received__is_fin_known), - 79usize => Self(stream_write_shutdown__background), - 118usize => Self(stream_read_shutdown__background), - 134usize => Self(endpoint_initialized__tcp), - 135usize => Self(endpoint_initialized__udp), - 194usize => Self(path_secret_map_address_cache_accessed__hit), - 199usize => Self(path_secret_map_id_cache_accessed__hit), + 80usize => Self(stream_write_shutdown__background), + 120usize => Self(stream_read_shutdown__background), + 136usize => Self(endpoint_initialized__tcp), + 137usize => Self(endpoint_initialized__udp), + 196usize => Self(path_secret_map_address_cache_accessed__hit), + 201usize => Self(path_secret_map_id_cache_accessed__hit), _ => unreachable!("invalid info: {info:?}"), } } @@ -315,35 +321,35 @@ mod counter { 23usize => Self(acceptor_tcp_packet_dropped__reason), 39usize => Self(acceptor_udp_packet_dropped__reason), 44usize => Self(acceptor_stream_pruned__reason), - 132usize => Self(endpoint_initialized__acceptor__protocol), - 133usize => Self(endpoint_initialized__handshake__protocol), - 143usize => { + 134usize => Self(endpoint_initialized__acceptor__protocol), + 135usize => Self(endpoint_initialized__handshake__protocol), + 145usize => { Self(path_secret_map_background_handshake_requested__peer_address__protocol) } - 145usize => Self(path_secret_map_entry_inserted__peer_address__protocol), - 147usize => Self(path_secret_map_entry_ready__peer_address__protocol), - 149usize => Self(path_secret_map_entry_replaced__peer_address__protocol), - 151usize => Self(path_secret_map_id_entry_evicted__peer_address__protocol), - 154usize => Self(path_secret_map_address_entry_evicted__peer_address__protocol), - 157usize => Self(unknown_path_secret_packet_sent__peer_address__protocol), - 159usize => Self(unknown_path_secret_packet_received__peer_address__protocol), - 161usize => Self(unknown_path_secret_packet_accepted__peer_address__protocol), - 163usize => Self(unknown_path_secret_packet_rejected__peer_address__protocol), - 165usize => Self(unknown_path_secret_packet_dropped__peer_address__protocol), - 173usize => Self(replay_detected_packet_sent__peer_address__protocol), - 175usize => Self(replay_detected_packet_received__peer_address__protocol), - 177usize => Self(replay_detected_packet_accepted__peer_address__protocol), - 179usize => Self(replay_detected_packet_rejected__peer_address__protocol), - 181usize => Self(replay_detected_packet_dropped__peer_address__protocol), - 183usize => Self(stale_key_packet_sent__peer_address__protocol), - 185usize => Self(stale_key_packet_received__peer_address__protocol), - 187usize => Self(stale_key_packet_accepted__peer_address__protocol), - 189usize => Self(stale_key_packet_rejected__peer_address__protocol), - 191usize => Self(stale_key_packet_dropped__peer_address__protocol), - 193usize => { + 147usize => Self(path_secret_map_entry_inserted__peer_address__protocol), + 149usize => Self(path_secret_map_entry_ready__peer_address__protocol), + 151usize => Self(path_secret_map_entry_replaced__peer_address__protocol), + 153usize => Self(path_secret_map_id_entry_evicted__peer_address__protocol), + 156usize => Self(path_secret_map_address_entry_evicted__peer_address__protocol), + 159usize => Self(unknown_path_secret_packet_sent__peer_address__protocol), + 161usize => Self(unknown_path_secret_packet_received__peer_address__protocol), + 163usize => Self(unknown_path_secret_packet_accepted__peer_address__protocol), + 165usize => Self(unknown_path_secret_packet_rejected__peer_address__protocol), + 167usize => Self(unknown_path_secret_packet_dropped__peer_address__protocol), + 175usize => Self(replay_detected_packet_sent__peer_address__protocol), + 177usize => Self(replay_detected_packet_received__peer_address__protocol), + 179usize => Self(replay_detected_packet_accepted__peer_address__protocol), + 181usize => Self(replay_detected_packet_rejected__peer_address__protocol), + 183usize => Self(replay_detected_packet_dropped__peer_address__protocol), + 185usize => Self(stale_key_packet_sent__peer_address__protocol), + 187usize => Self(stale_key_packet_received__peer_address__protocol), + 189usize => Self(stale_key_packet_accepted__peer_address__protocol), + 191usize => Self(stale_key_packet_rejected__peer_address__protocol), + 193usize => Self(stale_key_packet_dropped__peer_address__protocol), + 195usize => { Self(path_secret_map_address_cache_accessed__peer_address__protocol) } - 196usize => { + 198usize => { Self(path_secret_map_address_cache_accessed_hit__peer_address__protocol) } _ => unreachable!("invalid info: {info:?}"), @@ -579,66 +585,66 @@ mod measure { 73usize => Self(stream_write_errored__provided), 74usize => Self(stream_write_errored__processing_duration), 75usize => Self(stream_write_errored__processing_duration__conn), - 78usize => Self(stream_write_shutdown__buffer_len), - 81usize => Self(stream_write_socket_flushed__conn), - 82usize => Self(stream_write_socket_flushed__provided), - 84usize => Self(stream_write_socket_flushed__committed), - 85usize => Self(stream_write_socket_flushed__committed__conn), - 87usize => Self(stream_write_socket_blocked__conn), - 88usize => Self(stream_write_socket_blocked__provided), - 90usize => Self(stream_write_socket_errored__provided), - 93usize => Self(stream_read_flushed__conn), - 94usize => Self(stream_read_flushed__capacity), - 96usize => Self(stream_read_flushed__committed), - 97usize => Self(stream_read_flushed__committed__conn), - 98usize => Self(stream_read_flushed__processing_duration), - 99usize => Self(stream_read_flushed__processing_duration__conn), - 102usize => Self(stream_read_fin_flushed__conn), - 103usize => Self(stream_read_fin_flushed__capacity), - 104usize => Self(stream_read_fin_flushed__processing_duration), - 105usize => Self(stream_read_fin_flushed__processing_duration__conn), - 108usize => Self(stream_read_blocked__capacity), - 109usize => Self(stream_read_blocked__processing_duration), - 110usize => Self(stream_read_blocked__processing_duration__conn), - 113usize => Self(stream_read_errored__capacity), - 114usize => Self(stream_read_errored__processing_duration), - 115usize => Self(stream_read_errored__processing_duration__conn), - 120usize => Self(stream_read_socket_flushed__conn), - 121usize => Self(stream_read_socket_flushed__capacity), - 123usize => Self(stream_read_socket_flushed__committed), - 124usize => Self(stream_read_socket_flushed__committed__conn), - 126usize => Self(stream_read_socket_blocked__conn), - 127usize => Self(stream_read_socket_blocked__capacity), - 129usize => Self(stream_read_socket_errored__capacity), - 137usize => Self(path_secret_map_initialized__capacity), - 139usize => Self(path_secret_map_uninitialized__capacity), - 140usize => Self(path_secret_map_uninitialized__entries), - 141usize => Self(path_secret_map_uninitialized__lifetime), - 152usize => Self(path_secret_map_id_entry_evicted__age), - 155usize => Self(path_secret_map_address_entry_evicted__age), - 167usize => Self(key_accepted__gap), - 168usize => Self(key_accepted__forward_shift), - 171usize => Self(replay_potentially_detected__gap), - 197usize => Self(path_secret_map_address_cache_accessed_hit__age), - 201usize => Self(path_secret_map_id_cache_accessed_hit__age), - 203usize => Self(path_secret_map_cleaner_cycled__entries__id), - 204usize => Self(path_secret_map_cleaner_cycled__entries__id__retired), - 205usize => Self(path_secret_map_cleaner_cycled__entries__id__active), - 206usize => Self(path_secret_map_cleaner_cycled__entries__id__active__utilization), - 207usize => Self(path_secret_map_cleaner_cycled__entries__id__utilization), - 208usize => Self(path_secret_map_cleaner_cycled__entries__id__utilization__initial), - 209usize => Self(path_secret_map_cleaner_cycled__entries__address), - 210usize => Self(path_secret_map_cleaner_cycled__entries__address__active), - 211usize => { + 79usize => Self(stream_write_shutdown__buffer_len), + 82usize => Self(stream_write_socket_flushed__conn), + 83usize => Self(stream_write_socket_flushed__provided), + 85usize => Self(stream_write_socket_flushed__committed), + 86usize => Self(stream_write_socket_flushed__committed__conn), + 88usize => Self(stream_write_socket_blocked__conn), + 89usize => Self(stream_write_socket_blocked__provided), + 91usize => Self(stream_write_socket_errored__provided), + 94usize => Self(stream_read_flushed__conn), + 95usize => Self(stream_read_flushed__capacity), + 97usize => Self(stream_read_flushed__committed), + 98usize => Self(stream_read_flushed__committed__conn), + 99usize => Self(stream_read_flushed__processing_duration), + 100usize => Self(stream_read_flushed__processing_duration__conn), + 103usize => Self(stream_read_fin_flushed__conn), + 104usize => Self(stream_read_fin_flushed__capacity), + 105usize => Self(stream_read_fin_flushed__processing_duration), + 106usize => Self(stream_read_fin_flushed__processing_duration__conn), + 109usize => Self(stream_read_blocked__capacity), + 110usize => Self(stream_read_blocked__processing_duration), + 111usize => Self(stream_read_blocked__processing_duration__conn), + 114usize => Self(stream_read_errored__capacity), + 115usize => Self(stream_read_errored__processing_duration), + 116usize => Self(stream_read_errored__processing_duration__conn), + 122usize => Self(stream_read_socket_flushed__conn), + 123usize => Self(stream_read_socket_flushed__capacity), + 125usize => Self(stream_read_socket_flushed__committed), + 126usize => Self(stream_read_socket_flushed__committed__conn), + 128usize => Self(stream_read_socket_blocked__conn), + 129usize => Self(stream_read_socket_blocked__capacity), + 131usize => Self(stream_read_socket_errored__capacity), + 139usize => Self(path_secret_map_initialized__capacity), + 141usize => Self(path_secret_map_uninitialized__capacity), + 142usize => Self(path_secret_map_uninitialized__entries), + 143usize => Self(path_secret_map_uninitialized__lifetime), + 154usize => Self(path_secret_map_id_entry_evicted__age), + 157usize => Self(path_secret_map_address_entry_evicted__age), + 169usize => Self(key_accepted__gap), + 170usize => Self(key_accepted__forward_shift), + 173usize => Self(replay_potentially_detected__gap), + 199usize => Self(path_secret_map_address_cache_accessed_hit__age), + 203usize => Self(path_secret_map_id_cache_accessed_hit__age), + 205usize => Self(path_secret_map_cleaner_cycled__entries__id), + 206usize => Self(path_secret_map_cleaner_cycled__entries__id__retired), + 207usize => Self(path_secret_map_cleaner_cycled__entries__id__active), + 208usize => Self(path_secret_map_cleaner_cycled__entries__id__active__utilization), + 209usize => Self(path_secret_map_cleaner_cycled__entries__id__utilization), + 210usize => Self(path_secret_map_cleaner_cycled__entries__id__utilization__initial), + 211usize => Self(path_secret_map_cleaner_cycled__entries__address), + 212usize => Self(path_secret_map_cleaner_cycled__entries__address__active), + 213usize => { Self(path_secret_map_cleaner_cycled__entries__address__active__utilization) } - 212usize => Self(path_secret_map_cleaner_cycled__entries__address__retired), - 213usize => Self(path_secret_map_cleaner_cycled__entries__address__utilization), - 214usize => { + 214usize => Self(path_secret_map_cleaner_cycled__entries__address__retired), + 215usize => Self(path_secret_map_cleaner_cycled__entries__address__utilization), + 216usize => { Self(path_secret_map_cleaner_cycled__entries__address__utilization__initial) } - 215usize => Self(path_secret_map_cleaner_cycled__handshake_requests), - 216usize => Self(path_secret_map_cleaner_cycled__handshake_requests__retired), + 217usize => Self(path_secret_map_cleaner_cycled__handshake_requests), + 218usize => Self(path_secret_map_cleaner_cycled__handshake_requests__retired), _ => unreachable!("invalid info: {info:?}"), } } @@ -862,12 +868,12 @@ mod timer { 57usize => Self(stream_write_fin_flushed__latency), 66usize => Self(stream_write_blocked__latency), 72usize => Self(stream_write_errored__latency), - 77usize => Self(stream_write_shutdown__latency), - 92usize => Self(stream_read_flushed__latency), - 101usize => Self(stream_read_fin_flushed__latency), - 107usize => Self(stream_read_blocked__latency), - 112usize => Self(stream_read_errored__latency), - 117usize => Self(stream_read_shutdown__latency), + 78usize => Self(stream_write_shutdown__latency), + 93usize => Self(stream_read_flushed__latency), + 102usize => Self(stream_read_fin_flushed__latency), + 108usize => Self(stream_read_blocked__latency), + 113usize => Self(stream_read_errored__latency), + 119usize => Self(stream_read_shutdown__latency), _ => unreachable!("invalid info: {info:?}"), } } diff --git a/dc/s2n-quic-dc/src/path/secret/key.rs b/dc/s2n-quic-dc/src/path/secret/key.rs index 8f75c985d..253107fa4 100644 --- a/dc/s2n-quic-dc/src/path/secret/key.rs +++ b/dc/s2n-quic-dc/src/path/secret/key.rs @@ -3,13 +3,17 @@ use super::{map, schedule}; use core::sync::atomic::{AtomicBool, AtomicU64, Ordering}; -use s2n_quic_core::packet::KeyPhase; +use s2n_quic_core::{packet::KeyPhase, time::Clock}; pub mod seal { use super::*; use crate::crypto::{awslc, seal}; + use crate::{event, event::ConnectionPublisher, stream::shared}; pub use awslc::seal::control; + use s2n_quic_core::event::IntoEvent; + + pub const TEST_MAX_RECORDS: u64 = 4096; #[derive(Debug)] pub struct Application { @@ -42,7 +46,7 @@ pub mod seal { // in debug mode, rotate keys more often in order to surface any issues const MAX_RECORDS: u64 = if cfg!(debug_assertions) { - 4096 + TEST_MAX_RECORDS } else { LIMIT - THRESHOLD }; @@ -51,13 +55,23 @@ pub mod seal { } #[inline] - pub fn update(&mut self) { + pub fn update( + &mut self, + clock: &C, + subscriber: &shared::Subscriber, + ) { let (sealer, ku) = self.ku.next(); self.sealer = sealer; self.ku = ku; self.encrypted_records = AtomicU64::new(0); self.key_phase = self.key_phase.next_phase(); tracing::debug!(sealer_updated = ?self.key_phase); + + subscriber + .publisher(clock.get_time()) + .on_stream_write_key_updated(event::builder::StreamWriteKeyUpdated { + key_phase: self.key_phase.into_event(), + }) } } @@ -134,7 +148,9 @@ pub mod open { use s2n_quic_core::ensure; use zeroize::Zeroize; + use crate::{event, event::ConnectionPublisher, stream::shared}; pub use awslc::open::control; + use s2n_quic_core::event::IntoEvent; macro_rules! with_dedup { () => { @@ -210,7 +226,11 @@ pub mod open { } #[inline] - pub fn update(&mut self) { + pub fn update( + &mut self, + clock: &C, + subscriber: &shared::Subscriber, + ) { let idx = match self.key_phase { KeyPhase::Zero => 0, KeyPhase::One => 1, @@ -221,6 +241,12 @@ pub mod open { self.key_phase = self.key_phase.next_phase(); self.needs_update.store(false, Ordering::Relaxed); tracing::debug!(opener_updated = ?self.key_phase); + + subscriber + .publisher(clock.get_time()) + .on_stream_read_key_updated(event::builder::StreamReadKeyUpdated { + key_phase: self.key_phase.into_event(), + }) } } diff --git a/dc/s2n-quic-dc/src/path/secret/schedule.rs b/dc/s2n-quic-dc/src/path/secret/schedule.rs index 36ceed14f..5c2a068a9 100644 --- a/dc/s2n-quic-dc/src/path/secret/schedule.rs +++ b/dc/s2n-quic-dc/src/path/secret/schedule.rs @@ -463,10 +463,13 @@ impl Updater { #[cfg(test)] mod tests { use super::*; - use crate::path::secret::{ - map::Dedup, open::Application as Opener, seal::Application as Sealer, + use crate::{ + event, + path::secret::{map::Dedup, open::Application as Opener, seal::Application as Sealer}, + stream, }; use bolero::*; + use s2n_quic_core::time::testing; #[derive(Clone, Copy, Debug, TypeGenerator)] struct Pair { @@ -499,6 +502,11 @@ mod tests { }; let mut client_app = Application::new(client.application_pair(self.key_id, client_i)); let mut server_app = Application::new(server.application_pair(self.key_id, server_i)); + let subscriber = stream::shared::Subscriber { + subscriber: event::testing::Subscriber::no_snapshot(), + context: (), + }; + let clock = testing::Clock::default(); for i in 0..8 { client_app.send(&server_app).unwrap(); @@ -516,11 +524,11 @@ mod tests { (&mut server_app, &mut client_app) }; - sender.sealer.update(); + sender.sealer.update(&clock, &subscriber); sender.send(receiver).unwrap(); assert!(receiver.opener.needs_update()); - receiver.opener.update(); + receiver.opener.update(&clock, &subscriber); } } diff --git a/dc/s2n-quic-dc/src/stream/crypto.rs b/dc/s2n-quic-dc/src/stream/crypto.rs index a9693f476..e75720106 100644 --- a/dc/s2n-quic-dc/src/stream/crypto.rs +++ b/dc/s2n-quic-dc/src/stream/crypto.rs @@ -3,9 +3,12 @@ use crate::{ crypto::awslc::{open, seal}, + event, path::secret::{open::Application as Opener, seal::Application as Sealer, Map}, + stream::shared, }; use core::fmt; +use s2n_quic_core::time::Clock; use std::sync::Mutex; pub struct Crypto { @@ -78,14 +81,19 @@ impl Crypto { } #[inline] - pub fn open_with(&self, open: impl FnOnce(&Opener) -> R) -> R { + pub fn open_with( + &self, + open: impl FnOnce(&Opener) -> R, + clock: &C, + subscriber: &shared::Subscriber, + ) -> R { let lock = &self.app_opener; let mut guard = lock.lock().unwrap(); let result = open(&guard); // update the keys if needed if guard.needs_update() { - guard.update(); + guard.update(clock, subscriber); } result diff --git a/dc/s2n-quic-dc/src/stream/recv/shared.rs b/dc/s2n-quic-dc/src/stream/recv/shared.rs index 14f9d4420..93c93471b 100644 --- a/dc/s2n-quic-dc/src/stream/recv/shared.rs +++ b/dc/s2n-quic-dc/src/stream/recv/shared.rs @@ -550,23 +550,27 @@ impl Inner { } } - let _ = shared.crypto.open_with(|opener| { - self.receiver.on_stream_packet( - opener, - control_opener, - shared.credentials(), - packet, - ecn, - clock, - &mut out_buf, - )?; + let _ = shared.crypto.open_with( + |opener| { + self.receiver.on_stream_packet( + opener, + control_opener, + shared.credentials(), + packet, + ecn, + clock, + &mut out_buf, + )?; - any_valid_packets = true; - did_complete_handshake |= - packet.next_expected_control_packet().as_u64() > 0; + any_valid_packets = true; + did_complete_handshake |= + packet.next_expected_control_packet().as_u64() > 0; - >::Ok(()) - }); + >::Ok(()) + }, + clock, + &shared.subscriber, + ); if self.receiver.check_error().is_err() { msg.clear(); @@ -656,23 +660,27 @@ impl Inner { continue ); - let _ = shared.crypto.open_with(|opener| { - self.receiver.on_stream_packet( - opener, - control_opener, - shared.credentials(), - &mut packet, - ecn, - clock, - &mut out_buf, - )?; - - any_valid_packets = true; - did_complete_handshake |= - packet.next_expected_control_packet().as_u64() > 0; - - >::Ok(()) - }); + let _ = shared.crypto.open_with( + |opener| { + self.receiver.on_stream_packet( + opener, + control_opener, + shared.credentials(), + &mut packet, + ecn, + clock, + &mut out_buf, + )?; + + any_valid_packets = true; + did_complete_handshake |= + packet.next_expected_control_packet().as_u64() > 0; + + >::Ok(()) + }, + clock, + &shared.subscriber, + ); } other => { shared diff --git a/dc/s2n-quic-dc/src/stream/send/application.rs b/dc/s2n-quic-dc/src/stream/send/application.rs index 88d1d9e30..a255a8185 100644 --- a/dc/s2n-quic-dc/src/stream/send/application.rs +++ b/dc/s2n-quic-dc/src/stream/send/application.rs @@ -223,7 +223,7 @@ where }, |sealer| { if features.is_reliable() { - sealer.update(); + sealer.update(&self.shared.clock, &self.shared.subscriber); } else { // TODO enqueue a full flush of any pending transmissions before // updating the key. diff --git a/dc/s2n-quic-dc/src/stream/testing.rs b/dc/s2n-quic-dc/src/stream/testing.rs index d6d0a53d9..ddccccbb8 100644 --- a/dc/s2n-quic-dc/src/stream/testing.rs +++ b/dc/s2n-quic-dc/src/stream/testing.rs @@ -4,6 +4,7 @@ use super::{server::tokio::stats, socket::Protocol}; use crate::{ event, + event::testing, path::secret, stream::{ application::Stream, @@ -12,14 +13,15 @@ use crate::{ server::{tokio as stream_server, tokio::accept}, }, }; -use std::{io, net::SocketAddr}; +use std::{io, net::SocketAddr, sync::Arc}; use tracing::Instrument; -type Subscriber = event::tracing::Subscriber; +type Subscriber = (Arc, event::tracing::Subscriber); pub struct Client { map: secret::Map, env: env::Environment, + subscriber: Arc, } impl Default for Client { @@ -29,6 +31,7 @@ impl Default for Client { Self { map, env: Default::default(), + subscriber: Arc::new(event::testing::Subscriber::no_snapshot()), } } } @@ -61,7 +64,7 @@ impl Client { let server = server.as_ref(); let handshake = async { self.handshake_with(server) }; - let subscriber = Subscriber::default(); + let subscriber = (self.subscriber(), event::tracing::Subscriber::default()); match server.protocol { Protocol::Tcp => { @@ -86,10 +89,14 @@ impl Client { let server = server.as_ref(); let handshake = async { self.handshake_with(server) }.await?; - let subscriber = Subscriber::default(); + let subscriber = (self.subscriber(), event::tracing::Subscriber::default()); stream_client::connect_tcp_with(handshake, stream, &self.env, subscriber).await } + + pub fn subscriber(&self) -> Arc { + self.subscriber.clone() + } } pub struct Server { @@ -98,6 +105,7 @@ pub struct Server { stats: stats::Sender, #[allow(dead_code)] drop_handle: drop_handle::Sender, + subscriber: Arc, } impl Default for Server { @@ -136,6 +144,10 @@ impl Server { pub async fn accept(&self) -> io::Result<(Stream, SocketAddr)> { accept::accept(&self.receiver, &self.stats).await } + + pub fn subscriber(&self) -> Arc { + self.subscriber.clone() + } } mod drop_handle { @@ -189,6 +201,7 @@ pub mod server { flavor: accept::Flavor, protocol: Protocol, map_capacity: usize, + subscriber: event::testing::Subscriber, } impl Default for Builder { @@ -198,6 +211,7 @@ pub mod server { flavor: accept::Flavor::default(), protocol: Protocol::Tcp, map_capacity: 16, + subscriber: event::testing::Subscriber::no_snapshot(), } } } @@ -241,12 +255,18 @@ pub mod server { self } + pub fn subscriber(mut self, subscriber: event::testing::Subscriber) -> Self { + self.subscriber = subscriber; + self + } + fn build_tokio(self) -> super::Server { let Self { backlog, flavor, protocol, map_capacity, + subscriber, } = self; let _span = tracing::info_span!("server").entered(); @@ -257,7 +277,11 @@ pub mod server { let env = env::Builder::default().build().unwrap(); - let subscriber = event::tracing::Subscriber::default(); + let test_subscriber = Arc::new(subscriber); + let subscriber = ( + test_subscriber.clone(), + event::tracing::Subscriber::default(), + ); let (drop_handle_sender, drop_handle_receiver) = drop_handle::new(); let local_addr = match protocol { @@ -323,6 +347,7 @@ pub mod server { receiver, stats: stats_sender, drop_handle: drop_handle_sender, + subscriber: test_subscriber, } } } diff --git a/dc/s2n-quic-dc/src/stream/tests.rs b/dc/s2n-quic-dc/src/stream/tests.rs index 32239b805..52f53a0da 100644 --- a/dc/s2n-quic-dc/src/stream/tests.rs +++ b/dc/s2n-quic-dc/src/stream/tests.rs @@ -2,3 +2,4 @@ // SPDX-License-Identifier: Apache-2.0 mod accept_queue; +mod key_update; diff --git a/dc/s2n-quic-dc/src/stream/tests/key_update.rs b/dc/s2n-quic-dc/src/stream/tests/key_update.rs new file mode 100644 index 000000000..dc13cb38d --- /dev/null +++ b/dc/s2n-quic-dc/src/stream/tests/key_update.rs @@ -0,0 +1,82 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use crate::{ + path::secret::seal::TEST_MAX_RECORDS, + stream::testing::{Client, Server}, + testing::init_tracing, +}; +use std::{io, sync::atomic::Ordering, time::Duration}; +use tokio::io::{AsyncReadExt, AsyncWriteExt}; +use tracing::{info_span, Instrument}; + +/// This test checks that the sealer stream key and opener stream key are updated when +/// more than the confidentiality limit of packets are transmitted. +#[tokio::test] +async fn key_update() { + test(TEST_MAX_RECORDS, 1).await; +} + +/// This test checks that the sealer stream key and opener stream key are not updated when +/// less than the confidentiality limit of packets are transmitted. +#[tokio::test] +async fn no_key_update() { + test(TEST_MAX_RECORDS - 10, 0).await; +} + +async fn test(num_packets: u64, expected_key_updates: u64) { + init_tracing(); + + let client = Client::default(); + let server = Server::tcp().build(); + let client_subscriber = client.subscriber(); + let server_subscriber = server.subscriber(); + + tokio::try_join!( + async { + let mut a = client.connect_to(&server).await?; + // send enough packets to trigger a key update. This value is lower + // when debug_assertions are enabled (see TEST_MAX_RECORDS in path/secret/key.rs) + for _ in 0..num_packets { + let _ = a.write_all(b"testing").await; + } + + // wait some time before calling shutdown in case the server reset the connection so we + // can observe it in `shutdown` + tokio::time::sleep(Duration::from_millis(10)).await; + + let _ = a.shutdown().await; + + let mut buffer = vec![]; + a.read_to_end(&mut buffer).await?; + assert_eq!(buffer, b"done"); + Ok::<(), io::Error>(()) + } + .instrument(info_span!("client")), + async { + let (mut b, _) = server.accept().await.expect("accept"); + let mut buffer = vec![]; + b.read_to_end(&mut buffer).await.unwrap(); + + b.write_all(b"done").await.unwrap(); + b.shutdown().await.unwrap(); + + Ok(()) + } + .instrument(info_span!("server")) + ) + .unwrap(); + + assert_eq!( + expected_key_updates, + client_subscriber + .stream_write_key_updated + .load(Ordering::Relaxed) + ); + assert_eq!( + expected_key_updates, + server_subscriber + .stream_read_key_updated + .load(Ordering::Relaxed) + ); +} diff --git a/quic/s2n-quic-core/src/packet/key_phase.rs b/quic/s2n-quic-core/src/packet/key_phase.rs index 64dde34cf..56e73daa7 100644 --- a/quic/s2n-quic-core/src/packet/key_phase.rs +++ b/quic/s2n-quic-core/src/packet/key_phase.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use super::Tag; +use crate::event::IntoEvent; //= https://www.rfc-editor.org/rfc/rfc9000#section-17.3.1 //# Key Phase: The next bit (0x04) of byte 0 indicates the key phase, @@ -62,6 +63,15 @@ impl KeyPhase { } } +impl IntoEvent for KeyPhase { + fn into_event(self) -> u8 { + match self { + KeyPhase::Zero => 0, + KeyPhase::One => 1, + } + } +} + #[cfg(test)] mod tests { use super::*;