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 details)

Uploaded Source

Built Distribution

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

Uploaded Source

File details

Details for the file bench-1.2.tar.gz.

File metadata

  • Download URL: bench-1.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bench-1.2.tar.gz
Algorithm Hash digest
SHA256 b33c88ea399a7912a45bf276c627c11450ff40f089d953a693064c196239745d
MD5 be67c5dc32d632b929532109203a7ea5
BLAKE2b-256 162ea08526d3515f09e013a250cb7f01b35b85c7e46bd94ad5d71b0220312ad3

See more details on using hashes here.

File details

Details for the file bench-1.2.linux-x86_64.exe.

File metadata

File hashes

Hashes for bench-1.2.linux-x86_64.exe
Algorithm Hash digest
SHA256 a673416a8c3cde23d7a2582ea8cb191cce10a5575c89ecfae101b038ae2f0b83
MD5 0d0ccc4d9956ba982709d8fc4baf62b1
BLAKE2b-256 50558e962497ee7cbba6126a9d22afb211851dfe4bec8c65df61bd69eeb5e386

See more details on using hashes here.

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