Next: , Previous: partdiff, Up: Included Script Plugins

4.4.6 procdiff

This hook measures the amount of CPU time used by background processes. This hook has three distinct functionalities:

  1. If PROCDIFF_PROCS is set, then add a column to each measurement line for processes that match the PROCDIFF_PROCS regular expression (PROCDIFF_PROCS is a space separated list). For example PROCDIFF_PROCS="nfsd" should match nfsd processes. The regular expression can be useful when your processes have numbers or other minor variations. The regular expression is a POSIX Extended Regular Expression (specifically the C library's regcomp function with the REG_EXTENDED|REG_NOSUB arguments is used).
  2. If MEASURE_PROCDIFF is set, then print out the amount of CPU time used by all other processes as the procdiff measurement column. This lets you know if something else was using CPU during your benchmark.
  3. If either PROCDIFF_PROCS or MEASURE_PROCDIFF is set, a set of [procdiff] blocks are printed that shows the differences in processes and CPU time before and after the benchmark.

Set PROCDIFF_THRESHOLD to change the amount of CPU time (in milliseconds) that is ignored. By default 10ms (1 quantum on various Linux kernels) is ignored.