streaming_crypto/core_api/telemetry/mod.rs
1// # Full Implementation: `src/telemetry/` Module
2
3// This module provides **immutable telemetry snapshots** for streaming pipelines. It centralizes counters, ratios, and stage timings, ensuring observability and reproducibility across sequential and parallel encrypt/decrypt flows.
4
5// ## 📂 File Layout
6
7// ```
8// src/telemetry/
9// ├── mod.rs
10// ├── counters.rs
11// ├── timers.rs
12// ├── snapshot.rs
13// └── tests.rs
14// ```
15
16// ## src/telemetry/mod.rs
17
18// ## ✅ Industry Notes
19
20// - **Compression ratio:** `bytes_compressed / bytes_plaintext` is a standard metric in storage and backup systems.
21// - **Throughput:** `bytes_plaintext / elapsed_time` mirrors performance reporting in TLS/QUIC and file systems.
22// - **Stage timers:** Provide granular visibility into bottlenecks (e.g., compression vs. crypto).
23// - **Immutable snapshot:** Ensures reproducibility and safe FFI exposure.
24
25//! telemetry/mod.rs
26//! Unified telemetry module: counters, timers, and immutable snapshots.
27//!
28//! Industry notes:
29//! - Telemetry is critical for benchmarking and observability in streaming systems.
30//! - Immutable snapshots prevent accidental mutation and ensure reproducibility.
31//! - Stage timers mirror practices in TLS/QUIC libraries where per-record timings are tracked.
32//! - #[repr(C)] mirror structs provide ABI stability for FFI consumers.
33
34pub mod counters;
35pub mod timers;
36pub mod snapshot;
37
38pub use counters::*;
39pub use timers::*;
40pub use snapshot::*;