Changeset 2212 in Sophya for trunk/SophyaLib/SysTools/resusage.cc


Ignore:
Timestamp:
Oct 15, 2002, 5:48:53 PM (23 years ago)
Author:
ansari
Message:

Mise a jour de la documentation SysTools, Reza 15/10/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SysTools/resusage.cc

    r2191 r2212  
    1616  The information should be updated through the call to the
    1717  Update() method.
     18  Note: The information is obtained through \c getrusage()   
     19  and \c getrlimit() system calls, and depending on the OS,
     20  not all of the memory usage values are correctly filled.
     21  \code
     22  // How to check resource usage for a given part of the program
     23  ResourceUsage res;
     24  // --- Part of the program to be checked : Start
     25  // ...
     26  res.Update();
     27  cout << " Memory size increase (KB):" << res.getDeltaMemorySize() << endl;
     28  cout << " Resource usage info : \n" << res << endl;
     29  \endcode
    1830*/
    19 
     31/*!
     32  Constructor. the \b Update() method is called.
     33*/
    2034ResourceUsage::ResourceUsage()
    2135{
     
    4761 
    4862}
    49 
     63/*!
     64   Destructor.
     65*/
    5066ResourceUsage::~ResourceUsage()
    5167{
     
    5874}
    5975
     76/*!
     77  Update the CPU and memory usage information.
     78*/
    6079int ResourceUsage::Update()
    6180{
     
    82101}
    83102
     103/*!
     104   Prints the CPU and memory usage information.
     105   \param os : The output stream
     106   \param lp : The print level (0 .. 2)
     107   \param upd : if \c true , the Update method is called.
     108*/
    84109void ResourceUsage::Print(ostream& os, int lp, bool upd)
    85110{
Note: See TracChangeset for help on using the changeset viewer.