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);
cfg.priority_jitter = 2;
cfg.shuffle_affinity = true;
return e.componentTag == "io";
});
RAII controller that periodically applies chaos operations.
Modern C++23 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.