Skip to content
mattx edited this page Sep 6, 2023 · 2 revisions

rusage

rusage is a tool for measuring command-line program resource usage with high precision output from getrusage(2).

Build Instructions

git clone https://github.com/jart/cosmopolitan -o /opt/cosmo && cd /opt/cosmo
build/bootstrap/make.com -j8 o//examples/rusage.com

Usage Examples

See how much resources get used by echo:

$ o/examples/rusage.com echo Success!
Success!
RL: took 871µs wall time
RL: ballooned to 1,928kb in size
RL: needed 438µs cpu (0% kernel)
RL: caused 92 page faults (98% memcpy)
RL: 3 context switches (100% consensual)
RL: performed 72 reads and 0 write i/o operations

Download

This program is available in precompiled form.

curl https://justine.lol/rusage/rusage.com -o rusage.com
chmod +x rusage.com

Documentation

Clone this wiki locally