Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Member Functions | Private Attributes | Friends
concepts::ResourceMonitor Class Reference

Timer and resource monitor. More...

#include <resourceMonitor.hh>

List of all members.

Public Member Functions

 ResourceMonitor ()
 Default constructor.
std::ostream & sample (std::ostream &os)
 Returns an output stream with resource information.
float utime ()
 Returns the user time since the last call of ResourceMonitor using getrusage.

Private Attributes

rusage ru_
 Stores snapshot of resources since construction or last output.

Friends

std::ostream & operator<< (std::ostream &os, ResourceMonitor &rm)

Detailed Description

Timer and resource monitor.

Examples:

hpFEM2d.cc, and hpFEM3d-EV.cc.

Definition at line 27 of file resourceMonitor.hh.


Constructor & Destructor Documentation

concepts::ResourceMonitor::ResourceMonitor ( ) [inline]

Default constructor.

Initializes the timer and resource monitor, ie. fills ru_.

Definition at line 39 of file resourceMonitor.hh.


Member Function Documentation

std::ostream& concepts::ResourceMonitor::sample ( std::ostream &  os)

Returns an output stream with resource information.

There are timing information since construction or last output and memory usage information of the process.

Example:

3.21s [utime = 6.36s, stime = 3.09s, minflt = 0, majflt = 0, maxrss = 0.00KB]

the numbers before the [] gives the user and system time since the last output. The time values in the [] are the cumulated user and system time since the process started.
minflt gives the number of page faults not requiring physical I/O
maxflt gives the number of page faults requiring physical I/O
maxrss gives the memory needed by the process

float concepts::ResourceMonitor::utime ( )

Returns the user time since the last call of ResourceMonitor using getrusage.

This is not very precise (1/100 sec).

Examples:
hpFEM2d.cc, and hpFEM3d-EV.cc.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
ResourceMonitor rm 
) [friend]

Definition at line 28 of file resourceMonitor.hh.


Member Data Documentation

Stores snapshot of resources since construction or last output.

Definition at line 34 of file resourceMonitor.hh.


The documentation for this class was generated from the following file:

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)