Skip to main content

Benchmark resources usage

Project description

Monitor Process Resources Usage

Bench is able to monitor:
  • CPU time (user time, sys time, real time)

  • Memory usage (vms usage, rss usage)

  • Output to TSV(tab-delimited files)

Examples

  • Example 1: simple command

> python ../monitor.py sleep 2

PID Prog    UsrTime SysTime RealTime        MaxVms  MaxRss  AvgVms  AvgRss  Path    Command
14264       python  0.0     0.0     NA      NA      6728    NA      NA      /home/zhanxw/mycode/bench/bench "python ../monitor.py sleep 2"
  • Example 2: complex shell commands

> python ../monitor.py -i 0.1 'sleep 2 & sleep 4 & seq 1000000 >/dev/null & wait'

PID Prog    UsrTime SysTime RealTime        MaxVms  MaxRss  AvgVms  AvgRss  Path    Command
13849       seq     0.48    0       0.4     7356416 634880  7356416.0       634880.0        /home/zhanxw/mycode/bench/bench "seq 1000000"
13845       python  0.54    0.0     NA      NA      6728    NA      NA      /home/zhanxw/mycode/bench/bench "python ../monitor.py -i 0.1 sleep 2 & sleep 4 & seq 1000000 >/dev/null & wait"
13847       sleep   0       0       1.9     7335936 368640  7335936.0       368640.0        /home/zhanxw/mycode/bench/bench "sleep 2"

NOTE

Shell (/bin/sh) are used to execute commands. It’s a convenient feature with some shell exploit hazard.

This version requires psutil.

Contact

Xiaowei Zhan<zhanxw[at]gmail.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bench-1.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

bench-1.2.linux-x86_64.exe (66.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page