swactor/crates/runtime-dashboard/src/trace.rs
zacheryasc 1a64f421bf feat: runtime dashboard and docs (#23)
Live and replay demo for a runtime dashboard. Added docs with svg files.
2026-02-09 09:04:57 +00:00

18 lines
519 B
Rust

use serde::{Deserialize, Serialize};
use swactor::stats::RuntimeStats;
use crate::layer::DashboardEvent;
/// Complete trace of a runtime execution, suitable for saving/loading.
#[derive(Debug, Serialize, Deserialize)]
pub struct RuntimeTrace {
pub events: Vec<DashboardEvent>,
pub stats_timeline: Vec<TimestampedStats>,
}
/// A stats snapshot with a wall-clock timestamp.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TimestampedStats {
pub timestamp_ms: u64,
pub stats: RuntimeStats,
}