Inca::Process::Usage - Data object to store the system usage of a process
use Inca::Process::Usage; my $usage = new Inca::Process::Usage(); $usage->setMemory( 100 ); $usage->setCpuTime( 2 ); $usage->setWallClockTime( 5 );
Describes the system usage of a process in terms of cpu usage, memory usage, and wall clock time. This object is used by the Inca::Process::Profiler module to store monitoring data for a process while it is executing.
Class constructor which returns a new Inca::Process::Usage object.
Get the CPU time used by a process in seconds.
Returns:
An integer representing the number of CPU seconds used by the process.
Get the memory usage of a process in megabytes (MB).
Returns:
An integer representing the number of megabytes of memory used by the process.
Get the wall clock (or elapsed time) for a process in seconds.
Returns:
An integer representing the wall clock (or elapsed time) for a process in seconds.
Compare the calling object to the passed Inca::Process::Usage object and return true if the calling object is greater than the passed object.
Returns:
A true value if the calling object is greater than the passed object; otherwise returns true.
Check to see if a value for CPU time has been set.
Returns:
Returns true if a value for CPU time has been set and is positive; otherwise returns false.
Check to see if a value for memory has been set.
Returns:
Returns true if a value for memory has been set and is positive; otherwise returns false.
Check to see if a value for wall clock time has been set.
Returns:
Returns true if a value for wall clock time has been set and is positive; otherwise returns false.
Compare the calling object to the passed Inca::Process::Usage object and return a string representation of whether the calling object is greater than the passed object (e.g., 'wall clock time of X is greater than limit Y').
Arguments:
- usage
An object of type Inca::Process::Usage.
Returns:
A string representation of whether the calling object is greater than the limits represented in the passed object.
Set the CPU time used by a process in seconds.
Arguments:
- seconds
An integer representing the number of CPU seconds used by the process.
Set the memory usage of a process in megabytes (MB).
Arguments:
- megabytes
An integer representing the number of megabytes of memory used by the process.
Set the wall clock (or elapsed time) for a process in seconds.
Arguments:
- seconds
An integer representing the wall clock (or elapsed time) for a process in seconds.
Set all values to 0.
Return the contents of the object as name=value pairs on separate lines.
Returns:
A string containing the contents of the object in name=value pairs.
Shava Smallen <ssmallen@sdsc.edu>
No known problems.