command-rusage 1.0.1

Simple crate to get resource usage of a command
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# command-rusage


Simple wrapper for linux `wait4` syscall to get resource usage of a child process. This allows to measure multiple parameters of a child process, including CPU user/system times, memory usage, number of page faults, etc.

## Usage


```rust
use command_rusage::GetRUsage;
use std::process::Command;

let mut child = Command::new("sleep").arg("1").spawn().unwrap();
let rusage = child.wait_for_rusage().unwrap();
println!("User time: {}s", rusage.utime.as_secs_f64());
```