Use chaos to validate stability under changing runtime conditions like CPU migrations and priority perturbations.
API
Header: include/threadschedule/chaos.hpp
using namespace threadschedule;
cfg.
interval = std::chrono::milliseconds(200);
return e.componentTag == "io";
});
RAII controller that periodically perturbs scheduling attributes of registered threads for chaos/fuzz...
Plain value type holding runtime chaos-testing parameters.
int priority_jitter
+/- range applied around the current thread priority each interval.
std::chrono::milliseconds interval
Snapshot of metadata for a single registered thread.
Modern C++17/20/23/26 Thread Scheduling Library.
Tips
- Limit chaos to a subset of threads via the predicate.
- Keep intervals reasonable to avoid excessive thrashing.
- Combine with logging/metrics to observe impact.