Module tracer

Module tracer 

Source
Expand description

SimTracer — structured event capture for simulation analysis.

A lightweight event recorder that captures packet-level events during simulation runs. Events are stored in memory for post-hoc analysis, filtering, and serialization to JSON.

§Usage

use ndn_sim::tracer::{SimTracer, SimEvent, EventKind};

let tracer = SimTracer::new();

// Record events during simulation...
tracer.record(SimEvent {
    timestamp_us: 1000,
    node: 0,
    face: Some(1),
    kind: EventKind::InterestIn,
    name: "/ndn/test/data".into(),
    detail: None,
});

// Analyze after simulation
let events = tracer.events();
let json = tracer.to_json();

Structs§

SimEvent
A recorded simulation event.
SimTracer
Thread-safe event recorder for simulation runs.

Enums§

EventKind
Classification of simulation events.