Ignore:
Timestamp:
04/03/24 10:33:55 (7 weeks ago)
Author:
jderouillat
Message:

New timers integration/reporting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/manager/services.cpp

    r2589 r2628  
    1010namespace xios 
    1111{ 
     12  extern CLogType logTimers ; 
     13 
    1214  CService::CService(MPI_Comm serviceComm, shared_ptr<CEventScheduler> eventScheduler, const std::string& poolId, const std::string& serviceId, const int& partitionId,  
    1315                     int type, int nbPartitions)  
     
    115117  { 
    116118    //checkCreateContextNotification() ; 
    117     CTimer::get("CService::eventLoop").resume(); 
     119    if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").resume(); 
    118120    int flag ; 
    119121    MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 
     
    140142    } 
    141143   
    142     CTimer::get("CService::eventLoop").suspend(); 
     144    if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").suspend(); 
    143145    if (contexts_.empty() && finalizeSignal_) return true ; 
    144146    else return false ; 
     
    147149  void CService::threadEventLoop(void) 
    148150  { 
     151    if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").resume(); 
    149152    info(100)<<"Launch Thread for  CService::threadEventLoop, service id = "<<name_<<endl ; 
    150153    CThreadManager::threadInitialize() ;  
     
    152155    do 
    153156    { 
    154       CTimer::get("CService::eventLoop").resume(); 
    155157      int flag ; 
    156158      MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 
     
    177179      } 
    178180 
    179       CTimer::get("CService::eventLoop").suspend(); 
    180181      if (contexts_.empty() && finalizeSignal_) finished_=true ; 
    181182      if (!finished_) CThreadManager::yield() ; 
     
    184185    CThreadManager::threadFinalize() ; 
    185186    info(100)<<"Close thread for  CService::threadEventLoop, service id = "<<name_<<endl ; 
     187    if (info.isActive(logTimers)) CTimer::get("CService::eventLoop").suspend(); 
    186188  } 
    187189 
Note: See TracChangeset for help on using the changeset viewer.