5 releases (breaking)
0.5.0 | Dec 2, 2024 |
---|---|
0.4.0 | Dec 2, 2024 |
0.3.0 | Dec 2, 2024 |
0.2.0 | Dec 2, 2024 |
0.1.0 | Dec 2, 2024 |
#103 in Simulation
509 downloads per month
5KB
A simple Rust library for simulating a high cpu load. You can stress your CPU by specifying the number of workers and timeout in seconds. Each worker corresponds a native OS thread. For example,
fn main() {
stress_cpu::stress(4, 30);
}
lib.rs
:
Utility that simulates a high cpu load.
It creates N
OS native threads each of which spins in a tight loop calculating the sqrt() of a random number.
Dependencies
~2.6–8MB
~64K SLoC