Finalize and register — returns HorusResult<&mut Scheduler>
Order Guidelines
Range
Use
0-9
Critical real-time (motor control, safety)
10-49
High priority (sensors, fast loops)
50-99
Normal (processing, planning)
100-199
Low (logging, diagnostics)
200+
Background (telemetry)
Miss Enum
Variant
Behavior
Use Case
Miss::Warn
Log warning, continue
Soft real-time (logging, UI)
Miss::Skip
Skip this tick
Firm real-time (video encoding)
Miss::SafeMode
Call enter_safe_state()
Motor controllers, safety nodes
Miss::Stop
Stop entire scheduler
Hard real-time safety-critical
Default is Miss::Warn.
NodeMetrics
Returned by scheduler.metrics(). Read-only performance data for each node.
Method
Returns
Description
.name()
&str
Node name
.order()
u32
Execution order
.total_ticks()
u64
Total tick count
.successful_ticks()
u64
Ticks without errors
.avg_tick_duration_ms()
f64
Mean tick duration
.max_tick_duration_ms()
f64
Worst-case tick duration
.min_tick_duration_ms()
f64
Best-case tick duration
.last_tick_duration_ms()
f64
Most recent tick duration
.messages_sent()
u64
Total messages published
.messages_received()
u64
Total messages consumed
.errors_count()
u64
Error count
.warnings_count()
u64
Warning count
.uptime_seconds()
f64
Node uptime
Performance Monitoring Example
// After running for a while, check node health
for metric in scheduler.metrics() {
if metric.max_tick_duration_ms() > 1.0 {
hlog!(warn, "Node '{}' worst case: {:.2}ms (avg: {:.2}ms)",
metric.name(),
metric.max_tick_duration_ms(),
metric.avg_tick_duration_ms(),
);
}
}