3 unstable releases

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

#904 in Unix APIs

Download history 179/week @ 2024-11-15 65/week @ 2024-11-22 119/week @ 2024-11-29 186/week @ 2024-12-06 195/week @ 2024-12-13 50/week @ 2024-12-20 1/week @ 2024-12-27 3/week @ 2025-01-03 175/week @ 2025-01-10 135/week @ 2025-01-17 225/week @ 2025-01-24 299/week @ 2025-01-31 201/week @ 2025-02-07 175/week @ 2025-02-14 277/week @ 2025-02-21 202/week @ 2025-02-28

942 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–5.5MB
~26K SLoC