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


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.h

    r2159 r2212  
    2424  // Memory usage in kilo-bytes 
    2525  // NOTE: getDataSize() getStackSize() retournent des valeurs bizarres
     26  //! Returns the current memory (Resident) size (in kilo-bytes)
    2627  inline uint_8 getMemorySize() { return cur_rss; }
     28  //! Returns the maximum allowed memory size: Min( \c MaxResidentSize , \c MaxDataSize ))
    2729  inline uint_8 getMaxMemorySize()
    2830    { return((getMaxResidentSize()<getMaxDataSize()) ?
    2931             getMaxResidentSize() :getMaxDataSize() ); }
     32  //! Returns the increase in memory usage since the previous call to \b Update()
    3033  inline uint_8 getDeltaMemorySize() { return delta_rss; }
    3134
     35  //! Returns the maximum allowd data segment size (in kilo-bytes)
    3236  inline uint_8 getMaxDataSize() { return((max_datasz>0)?max_datasz:1024); }
     37  //! Returns the current data segment size (in kilo-bytes)
    3338  inline uint_8 getDataSize() { return cur_datasz; } 
     39  //! Returns the maximum allowed resident size (in kilo-bytes)
    3440  inline uint_8 getMaxResidentSize() { return((max_rss>0)?max_rss:1024); }
     41  //! Returns the current resident memory size (in kilo-bytes)
    3542  inline uint_8 getResidentSize() { return cur_rss; }
     43  //! Returns the maximum allowed stack size (in kilo-bytes)
    3644  inline uint_8 getMaxStackSize() { return max_stack; }
     45  //! Returns the current stack size (in kilo-bytes)
    3746  inline uint_8 getStackSize() { return cur_stack; }
    3847
    3948 
    4049  // Time in milli-second
     50  //! Returns the total CPU time used (in milli-second)
    4151  inline uint_8 getCPUTime() { return cur_tottm; }
     52  //! Returns the total elapsed time (in milli-second)
    4253  inline uint_8 getElapsedTime() { return elapsed_time; }
     54  //! Returns the average load ( CPU time / elapsed time)
    4355  inline double  getAverageCPULoad()
    4456    { return ((elapsed_time>1) ? (double)cur_tottm/(double)elapsed_time: 1.);}
    4557
     58  //! Returns the CPU time used since the previous call to \b Update() (in milli-second)
    4659  inline uint_8 getDeltaCPUTime() { return delta_tottm; }
     60  //! Returns the elapsed time since the previous call to \b Update() (in milli-second)
    4761  inline uint_8 getDeltaElapsedTime() { return delta_elapsed_time; }
     62  //! Returns the CPU load since the previous call to \b Update()
    4863  inline double  getCPULoad()
    4964    { return ((delta_elapsed_time>1) ? (double)delta_tottm/(double)delta_elapsed_time: 1.);}
    5065
    5166
     67  //! Returns the total CPU time (in milli-second)
    5268  inline uint_8 getTotalCPUTime() { return cur_tottm; }
     69  //! Returns the CPU time in user mode (in milli-second)
    5370  inline uint_8 getUserCPUTime() { return cur_usrtm; }
     71  //! Returns the CPU time in system mode (in milli-second)
    5472  inline uint_8 getSysCPUTime() { return cur_systm; }
    5573
    5674
    5775  void  Print(ostream& os, int lp=0, bool upd=true);
     76  //! Alias for the \b Print() method.
    5877  inline void print(ostream& os, int lp=0, bool upd=true){ Print(os,lp,upd); }
    5978
     
    81100};
    82101
     102//! Prints the resource usage information on the output stream
    83103inline ostream& operator << (ostream& os, ResourceUsage& ru)
    84104{ ru.Print(os,0,true); return(os); }
Note: See TracChangeset for help on using the changeset viewer.