Components
Logging & Reports
How CSV reports and per-transition protocol traces are emitted.
Days writes periodic CSV reports through CsvLogger (src/utils/logger.rs).
How reporting works
- Components construct report structs (e.g.,
PacketSourceReport,SchedulerReport). - Reports are appended to an in-memory buffer (guarded by a lock).
- When buffers grow beyond a threshold, the logger flushes a batch to disk.
- At the end of the run,
CsvLogger::flush_reports()flushes all remaining data.
The logger is initialized once from config at the start of Topology::run.
Output files
All files are written under log_path (default: ./output/):
sources.csv: source reports (PacketSourceReport)sinks.csv: sink reports (PacketSinkReport)switches.csv: scheduler reports (SchedulerReport)pfc.csv: PFC ingress port reports (PfcPortReport, only withl2_pfc)dcqcn_events.csv: per-event DCQCN trace rows (only withdcqcn+lean)pfc_events.csv: per-event PFC trace rows (only withl2_pfc+lean)cubic_events.csv: per-event TCP CUBIC trace rows (only withlean)drr_events.csv: per-event DRR trace rows (only withlean)wfq_events.csv: per-event WFQ trace rows (only withlean)
Report interval
Set report_interval in the TOML config:
- if omitted, it defaults to
f64::MAX(effectively “only final flush”), - if set, many models schedule periodic events to emit reports.
See /docs/configuration/logging for configuration details.