swactor/crates/datastream/src/health.rs
Zachery Aaron Shores-Chmielewski 0d1b95695d refactor: drop datastore crate, stale specs, and benches
Remove the datastore crate, the top-level design/orchestration/ring specs, the
benches, and the ci config. Add the dashboard host telemetry sampler
(cpu/disk/net/gpu/mem). Localize the pipeline-parallel e2e stub/mock paths.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-06-23 19:42:28 +04:00

25 lines
774 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! Datastream-owned self-health record.
use serde::{Deserialize, Serialize};
use crate::record::Record;
/// Datastream self-health — the mux's own integrity counters.
pub const DATASTREAM_HEALTH: &str = "datastream.health";
/// `assigned` is the gap-free high-water mark (every position handed out);
/// `dropped` is the frames lost to mux overflow.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct DatastreamHealth {
#[serde(default)]
pub assigned: u64,
#[serde(default)]
pub dropped: u64,
/// `dropped / assigned × 1_000_000`; `0` when nothing has been assigned yet.
#[serde(default)]
pub loss_rate_ppm: u32,
}
impl Record for DatastreamHealth {
const CHANNEL: &'static str = DATASTREAM_HEALTH;
}