dial9_core/format.rs
1//! Wire-format events emitted by the bus itself.
2use dial9_trace_format::TraceEvent;
3
4crate::test_util_pub! {
5/// Segment metadata as key/value entries, written when a segment is sealed.
6#[derive(Debug, TraceEvent)]
7#[traceevent(wire_slot)]
8struct SegmentMetadataEvent {
9 #[traceevent(timestamp)]
10 pub timestamp_ns: u64,
11 pub entries: Vec<(String, String)>,
12}
13}
14
15crate::test_util_pub! {
16/// Clock-correlation anchor. `timestamp_ns` (monotonic) and `realtime_ns`
17/// (nanoseconds since Unix epoch) are captured at the same instant via
18/// [`clock_pair`], so offline consumers can recover wall clock from the
19/// monotonic event stream.
20///
21/// [`clock_pair`]: crate::clock::clock_pair
22#[derive(Debug, TraceEvent)]
23#[traceevent(wire_slot)]
24struct ClockSyncEvent {
25 #[traceevent(timestamp)]
26 pub timestamp_ns: u64,
27 pub realtime_ns: u64,
28}
29}