3 unstable releases

0.2.0 Aug 4, 2022
0.1.1 Jul 19, 2022
0.1.0 Jul 19, 2022

#834 in Unix APIs

Download history 188/week @ 2024-07-27 112/week @ 2024-08-03 2/week @ 2024-08-10 14/week @ 2024-08-17 85/week @ 2024-08-24 9/week @ 2024-08-31 3/week @ 2024-09-07 53/week @ 2024-09-14 85/week @ 2024-09-21 158/week @ 2024-09-28 146/week @ 2024-10-05 136/week @ 2024-10-12 98/week @ 2024-10-19 43/week @ 2024-10-26 144/week @ 2024-11-02 67/week @ 2024-11-09

372 downloads per month
Used in cpulimit

LGPL-3.0-only

18KB
385 lines

cpulimiter

Limit the CPU usage of a process.

Example

use cpulimiter::{CpuLimit, Pid};

let handle = CpuLimit::new(Pid::from(1048), 10.0).unwrap();
handle.set_limit(42.0);
handle.stop();

lib.rs:

Limit the CPU usage of a process.

Example

use cpulimiter::{CpuLimit, Pid};

let handle = CpuLimit::new(Pid::from(1048), 10.0).unwrap();
handle.set_limit(42.0);
handle.stop();

Dependencies

~0.6–6MB
~28K SLoC