mod buffer;
pub mod builder;
pub mod constants;
pub mod fsm;
pub mod handle;
pub mod inputs;
pub mod instrumentation;
pub mod observations;
pub mod supervisor;
pub mod tail_read;
mod throughput;
pub use builder::MetricsAggregatorBuilder;
#[doc(hidden)]
pub use fsm::MetricsStore;
pub use fsm::{
MetricsAggregatorAction, MetricsAggregatorContext, MetricsAggregatorEvent,
MetricsAggregatorState, StageMetrics,
};
pub use handle::{MetricsHandle, MetricsHandleExt};
pub use inputs::MetricsInputs;
#[cfg(test)]
#[derive(Default)]
pub(crate) struct RecordingSnapshots {
app: std::sync::Mutex<Option<obzenflow_core::metrics::AppMetricsSnapshot>>,
infra: std::sync::Mutex<Option<obzenflow_core::metrics::InfraMetricsSnapshot>>,
}
#[cfg(test)]
impl obzenflow_core::metrics::MetricsSnapshotExporter for RecordingSnapshots {
fn publish_app_snapshot(&self, snapshot: obzenflow_core::metrics::AppMetricsSnapshot) {
*self.app.lock().unwrap() = Some(snapshot);
}
fn publish_infra_snapshot(&self, snapshot: obzenflow_core::metrics::InfraMetricsSnapshot) {
*self.infra.lock().unwrap() = Some(snapshot);
}
}
#[cfg(feature = "test-support")]
pub(crate) mod tests;