NAME Memory::Process - Perl class to determine actual memory usage. SYNOPSIS use Memory::Process; my $m = Memory::Process->new(%params); $m->dump; $m->record($message, $pid); my @report = $m->report; my $report = $m->report; $m->state; METHODS "new(%params)" Constructor. "dump()" Print report to STDERR. Returns return value of print(). "record($message[, $pid])" Get report. In scalar context returns string with report. In array context returns array of report lines. First line is title. "report()" TODO "state()" TODO EXAMPLE # Pragmas. use strict; use warnings; # Modules. use Memory::Process; # Object. my $m = Memory::Process->new; # Example process. $m->record("Before my big method"); my $var = ('foo' x 100); sleep 1; $m->record("After my big method"); sleep 1; $m->record("End"); # Print report. print $m->report."\n"; # Output like: # time vsz ( diff) rss ( diff) shared ( diff) code ( diff) data ( diff) # 1 19120 ( 0) 2464 ( 0) 1824 ( 0) 8 ( 0) 1056 ( 0) After my big method # 2 19120 ( 0) 2464 ( 0) 1824 ( 0) 8 ( 0) 1056 ( 0) End DEPENDENCIES Memory::Usage. SEE ALSO Memory::Stats, Memory::Usage. REPOSITORY AUTHOR Michal Špaček LICENSE AND COPYRIGHT BSD 2-Clause License VERSION 0.02