A collection of convenience functions for stress testing purposes.
Disclaimer: Use at your own risk. Stress testing may damage hardware.
busywait(seconds)
- LikeBase.sleep(seconds)
except it maxes out the thread
For instance, for testing multithreaded CPU loading in Julia
using StressTest
Threads.@threads for _ in 1:4
busywait(10)
end
(System monitor then shows julia ramping up to ~400% for 10 seconds)
PR's welcome!