pub enum Event {
Timer {
task_id: u64,
},
Network {
connection_id: u64,
operation: NetworkOperation,
},
Connection {
id: u64,
state: ConnectionStateChange,
},
Storage {
file_id: u64,
operation: StorageOperation,
},
Shutdown,
ProcessRestart {
ip: IpAddr,
},
ProcessGracefulShutdown {
ip: IpAddr,
grace_period_ms: u64,
recovery_delay_ms: u64,
},
ProcessForceKill {
ip: IpAddr,
recovery_delay_ms: u64,
},
}Expand description
Events that can be scheduled in the simulation.
Variants§
Timer
Timer event for waking sleeping tasks
Network
Network data operations
Connection
Connection state changes
Storage
Storage I/O operations
Shutdown
Shutdown event to wake all tasks for graceful termination
ProcessRestart
Process restart event: a rebooted process is ready to boot again.
Scheduled after a process is killed, at now + recovery_delay.
The orchestrator handles this by calling the process factory
and spawning a new run() task.
ProcessGracefulShutdown
Graceful shutdown initiated for a process.
Cancels the per-process shutdown token so the process can observe
ctx.shutdown().is_cancelled() and perform cleanup. A
ProcessForceKill is scheduled after the
grace period expires.
Fields
ProcessForceKill
Force-kill a process after a graceful shutdown grace period.
Aborts the process task and all its connections, then schedules a
ProcessRestart after a recovery delay.
Implementations§
Source§impl Event
impl Event
Sourcepub fn is_infrastructure_event(&self) -> bool
pub fn is_infrastructure_event(&self) -> bool
Determines if this event is purely infrastructural (not workload-related).
Infrastructure events maintain simulation state but don’t represent actual application work. These events can be safely ignored when determining if a simulation should terminate after workloads complete.