Ignore:
Timestamp:
11/22/22 12:43:52 (17 months ago)
Author:
jderouillat
Message:

Backport the system to log the memory consumption (commit ID [2418-2420,2425-2426])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/branches/xios-3.0-beta/src/mem_checker.hpp

    r2274 r2427  
    44#include <string> 
    55#include <map> 
     6#include <fstream> 
     7#include <vector> 
    68 
    79namespace xios 
     
    1416      void resume(void); 
    1517      void reset(void); 
    16       double getCumulatedMem(void); 
    17       static double getMem(void); 
     18      std::vector<double> getCumulatedMem(void); 
     19      static std::vector<double> getMem(void); 
     20      static std::vector<double> getMemories(void); 
     21      static void logMem( std::string id, bool finalizeLog = false ); 
    1822      static CMemChecker& get(std::string name); 
    1923      static std::string getAllCumulatedMem(void) ; 
     
    2327    private: 
    2428      static void check(void) ; 
    25       double cumulatedMem_; 
    26       double lastMem_; 
     29      std::vector<double> cumulatedMem_; 
     30      std::vector<double> lastMem_; 
    2731      bool suspended_; 
    2832      std::string name_; 
     
    3236      static bool first_ ; 
    3337      static bool enabled_ ; 
     38 
     39      static double vsize_init_; 
     40      static double rss_init_; 
     41      static double vmhwm_init_; 
     42      static double time_init_; 
     43      static std::ofstream fout_; 
     44      static int flush_counter_; 
    3445  }; 
    3546} 
Note: See TracChangeset for help on using the changeset viewer.