## erlang_pmp

[![Hex pm](](

[Poor Man's Profiler]( inspired Erlang profiler.

### Running


#### Opts

* `duration`: duration the profiling will run for, in seconds (default: `60`).
* `processes`: list of PIDs that will be profiled, or `all` to use
  [`erlang:processes()`]( before taking each sample (default: `all`).
* `sleep`: sleep duration in milliseconds between taking samples (default: `10`).
* `show_pid`: if `true`, PID (or process name if registered) will be prepended to the stack trace (default: `false`).
* `filename`: path under which the profiling results will be saved (default: `/tmp/erlang_pmp.trace`).
* `include_statuses`: a list of process statuses as returned from
  [`erlang:process_info(Pid, status)`](
  A stack trace will only be counted if the process status belongs to the list, or if `include_statuses` is `all` (default: `all`).
* `show_status`: if `true`, status of the process will be appended to the stack trace (default: `false`)

#### Output

The output of `erlang_pmp` is meant to be used with [FlameGraph stack trace visualizer](

git clone
FlameGraph/ /tmp/erlang_pmp.trace > /tmp/erlang_pmp.svg