pub struct TelemetrySnapshot {Show 13 fields
pub segments_processed: u64,
pub frames_data: u64,
pub frames_terminator: u64,
pub frames_digest: u64,
pub bytes_plaintext: u64,
pub bytes_compressed: u64,
pub bytes_ciphertext: u64,
pub bytes_overhead: u64,
pub compression_ratio: f64,
pub throughput_plaintext_bytes_per_sec: f64,
pub elapsed: Duration,
pub stage_times: StageTimes,
pub output: Option<Vec<u8>>,
}Expand description
Core telemetry snapshot. Captures counters, ratios, throughput, stage timings, and elapsed duration.
Fields§
§segments_processed: u64§frames_data: u64§frames_terminator: u64§frames_digest: u64§bytes_plaintext: u64§bytes_compressed: u64§bytes_ciphertext: u64§bytes_overhead: u64§compression_ratio: f64§throughput_plaintext_bytes_per_sec: f64§elapsed: Duration§stage_times: StageTimes§output: Option<Vec<u8>>The final encrypted stream bytes, if the output sink was memory-backed.
Noneif the output was written directly to a file or external sink.Some(Vec<u8>)if the pipeline wrote into an in-memory buffer.
This field is primarily useful in tests, benchmarks, or integrations where we want to inspect the produced ciphertext alongside telemetry counters and stage timings.
Implementations§
Source§impl TelemetrySnapshot
impl TelemetrySnapshot
pub fn from( counters: &TelemetryCounters, timer: &TelemetryTimer, segments: Option<u32>, ) -> Self
pub fn total_stage_time(&self) -> Duration
pub fn has_all_stages(&self, expected: &[Stage]) -> bool
pub fn sanity_check(&self) -> bool
pub fn output_bytes(&self) -> u64
Sourcepub fn attach_output(&mut self, buf: Vec<u8>)
pub fn attach_output(&mut self, buf: Vec<u8>)
🔧 Attach output buffer to snapshot
Trait Implementations§
Source§impl Clone for TelemetrySnapshot
impl Clone for TelemetrySnapshot
Source§fn clone(&self) -> TelemetrySnapshot
fn clone(&self) -> TelemetrySnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TelemetrySnapshot
impl Debug for TelemetrySnapshot
Source§impl<'de> Deserialize<'de> for TelemetrySnapshot
impl<'de> Deserialize<'de> for TelemetrySnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TelemetrySnapshot
impl PartialEq for TelemetrySnapshot
Source§impl Serialize for TelemetrySnapshot
impl Serialize for TelemetrySnapshot
impl StructuralPartialEq for TelemetrySnapshot
Auto Trait Implementations§
impl Freeze for TelemetrySnapshot
impl RefUnwindSafe for TelemetrySnapshot
impl Send for TelemetrySnapshot
impl Sync for TelemetrySnapshot
impl Unpin for TelemetrySnapshot
impl UnsafeUnpin for TelemetrySnapshot
impl UnwindSafe for TelemetrySnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more