The Gaudi Framework  v30r3 (a5ef0a68)
ChronoStatSvc.cpp
Go to the documentation of this file.
1 #ifdef _WIN32
2 #pragma warning( disable : 4786 )
3 #endif
4 // ============================================================================
5 // STD & STL
6 // ============================================================================
7 #include <algorithm>
8 #include <fstream>
9 #include <functional>
10 #include <iomanip>
11 #include <iostream>
12 #include <string>
13 // ============================================================================
14 // GaudiKernel
15 // ============================================================================
19 #include "GaudiKernel/Kernel.h"
20 #include "GaudiKernel/MsgStream.h"
21 #include "GaudiKernel/Stat.h"
22 #include "GaudiKernel/StatEntity.h"
23 #include "GaudiKernel/StatusCode.h"
24 // ============================================================================
26 // ============================================================================
27 #include "ChronoStatSvc.h"
28 // ============================================================================
31 // ============================================================================
33 // ============================================================================
40 // ============================================================================
41 // ============================================================================
42 // comparison functor
43 // ============================================================================
44 constexpr struct CompareFirstOfPointerPair_t {
45  template <typename S, typename T>
46  inline bool operator()( const std::pair<S*, T*>& p1, const std::pair<S*, T*>& p2 ) const
47  {
48  auto e1 = p1.first;
49  auto e2 = p2.first;
50  return ( !e1 || !e2 ) || *e1 < *e2;
51  }
53 // ============================================================================
54 // Compound assignment operator.
55 // ============================================================================
57 {
58 
59  // Add the content of the maps, leave the rest unchanged
60 
61  // Merge Chronomaps
62  for ( auto& item : css.m_chronoEntities ) {
63  const IChronoStatSvc::ChronoTag& key = item.first;
64  const ChronoEntity& val = item.second;
65  if ( m_chronoEntities.count( key ) )
66  m_chronoEntities[key] += val;
67  else
69  }
70 
71  // Merge StatMaps
72  for ( auto& item : css.m_statEntities ) {
73  const IChronoStatSvc::StatTag& key = item.first;
74  const StatEntity& val = item.second;
75  if ( m_statEntities.count( key ) )
76  m_statEntities[key] += val;
77  else
78  m_statEntities.emplace( key, val );
79  }
80 }
82 {
83  // basically limit the integer to MSG::Level range
84  auto int2level = []( int l ) -> MSG::Level {
85  return static_cast<MSG::Level>(
86  std::max( std::min( l, static_cast<int>( MSG::FATAL ) ), static_cast<int>( MSG::NIL ) ) );
87  };
88 
89  m_intStatPrintLevel.declareUpdateHandler(
90  [this, int2level]( Gaudi::Details::PropertyBase& ) { m_statPrintLevel = int2level( m_intStatPrintLevel ); } );
91  m_intChronoPrintLevel.declareUpdateHandler(
92  [this, int2level]( Gaudi::Details::PropertyBase& ) { m_chronoPrintLevel = int2level( m_intChronoPrintLevel ); } );
93 }
94 // ============================================================================
95 // Implementation of IService::initialize()
96 // ============================================================================
98 {
100  if ( sc.isFailure() ) return sc;
102  // Set my own properties
103  sc = setProperties();
104 
105  if ( sc.isFailure() ) {
106  error() << "setting my properties" << endmsg;
107  return StatusCode::FAILURE;
108  }
109 
110  // only add an EndEvent listener if per-event output requested
111  if ( !m_perEventFile.empty() ) {
113  if ( !m_ofd.is_open() ) {
114  error() << "unable to open per-event output file \"" << m_perEventFile << "\"" << endmsg;
115  return StatusCode::FAILURE;
116  } else {
117  auto ii = serviceLocator()->service<IIncidentSvc>( "IncidentSvc" );
118  if ( !ii ) {
119  error() << "Unable to find IncidentSvc" << endmsg;
120  return StatusCode::FAILURE;
121  }
122  ii->addListener( this, IncidentType::EndEvent );
123  }
124  }
125 
127  m_printUserTime = true;
128  }
131  m_chronoTableFlag = true;
132  }
135  chronoStart( name() );
137  return StatusCode::SUCCESS;
138 }
139 // ============================================================================
140 // Implementation of IService::finalize()
141 // ============================================================================
143 {
144  std::string local = name() + ".finalize()";
146  MsgStream main_log( msgSvc(), local );
149  chronoStop( name() );
150 
151  if ( m_ofd.is_open() ) {
152  debug() << "writing per-event timing data to '" << m_perEventFile << "'" << endmsg;
153  for ( const auto& itr : m_perEvtTime ) {
154  m_ofd << itr.first.substr( 0, itr.first.length() - 8 ) << " ";
155  for ( const auto& itt : itr.second ) {
156  m_ofd << " " << (long int)( itt );
157  }
158  m_ofd << std::endl;
159  }
160 
161  m_ofd.close();
162  }
163 
168  MsgStream log( msgSvc(), "*****Chrono*****" );
169  const std::string stars( ( m_chronoCoutFlag ) ? 126 : 100, '*' );
170  if ( m_chronoCoutFlag ) {
171  std::cout << stars << std::endl;
172  std::cout << local << " The Final CPU consumption (Chrono) Table "
173  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
174  std::cout << stars << std::endl;
175  } else {
176  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
177  log << (MSG::Level)m_chronoPrintLevel << " The Final CPU consumption ( Chrono ) Table "
178  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << endmsg;
179  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
180  }
182  { // prepare container for printing
184  tmpCont.reserve( m_chronoEntities.size() );
185  for ( auto& it : m_chronoEntities ) {
186  tmpCont.emplace_back( &it.second, &it.first );
187  }
188  // sort it
189  if ( m_chronoOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
190  // print User Time statistics
191  if ( m_printUserTime ) {
192  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
193  //
194  ChronoEntity* entity = iter->first;
195  if ( !entity ) {
196  continue;
197  }
198  const ChronoTag* tag = iter->second;
199  if ( !tag ) {
200  continue;
201  }
202  entity->stop();
204  if ( m_chronoCoutFlag )
206  {
207  std::cout << *tag << "\t" << entity->outputUserTime() << std::endl;
208  } else
209  {
210  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputUserTime() << endmsg;
211  }
212  //
213  }
214  }
216  if ( m_printSystemTime ) {
220  std::cout << stars << std::endl;
221  } else if ( m_printUserTime && !m_chronoCoutFlag ) {
222  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
223  }
225  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
227  ChronoEntity* entity = iter->first;
228  if ( !entity ) {
229  continue;
230  }
231  const ChronoTag* tag = iter->second;
232  if ( !tag ) {
233  continue;
234  }
235  entity->stop();
237  if ( m_chronoCoutFlag )
239  {
240  std::cout << *tag << "\t" << entity->outputSystemTime() << std::endl;
241  } else
242  {
243  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputSystemTime() << endmsg;
244  }
245  //
246  }
247  }
249  if ( m_printEllapsedTime ) {
253  std::cout << stars << std::endl;
254  } else if ( ( m_printUserTime || m_printSystemTime ) && !m_chronoCoutFlag ) {
255  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
256  }
258  for ( const auto& i : tmpCont ) {
260  ChronoEntity* entity = i.first;
261  if ( !entity ) {
262  continue;
263  }
264  const ChronoTag* tag = i.second;
265  if ( !tag ) {
266  continue;
267  }
268  entity->stop();
270  if ( m_chronoCoutFlag )
272  {
273  std::cout << *tag << "\t" << entity->outputElapsedTime() << std::endl;
274  } else
275  {
276  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputElapsedTime() << endmsg;
277  }
278  //
279  }
280  }
282  tmpCont.clear();
283  }
285  if ( m_chronoCoutFlag ) {
286  std::cout << stars << std::endl;
287  } else {
288  log << m_chronoPrintLevel << stars << endmsg;
289  }
290  }
291 
293 
295  if ( m_statTableFlag ) {
296  printStats();
297  }
298 
299  if ( !m_statsOutFileName.value().empty() ) {
300  saveStats();
301  }
302 
303  main_log << MSG::INFO << " Service finalized successfully " << endmsg;
304 
305  return Service::finalize();
306 }
307 // ============================================================================
308 // Implementation of IChronoStatSvc::chronoStart
309 // ============================================================================
310 ChronoEntity* ChronoStatSvc::chronoStart( const ChronoTag& chronoTag )
311 {
312  ChronoEntity& entity = m_chronoEntities[chronoTag];
313  entity.start();
314  return &entity;
315 }
316 // ============================================================================
317 // Implementation of IChronoStatSvc::chronoStop
318 // ============================================================================
319 const ChronoEntity* ChronoStatSvc::chronoStop( const IChronoStatSvc::ChronoTag& chronoTag )
320 {
321  ChronoEntity& entity = m_chronoEntities[chronoTag];
322  entity.stop();
323  return &entity;
324 }
325 // ============================================================================
326 // Implementation of IChronoStatSvc::chronoDelta
327 // ============================================================================
328 IChronoStatSvc::ChronoTime ChronoStatSvc::chronoDelta( const IChronoStatSvc::ChronoTag& chronoTag,
329  IChronoStatSvc::ChronoType theType )
330 {
331  return m_chronoEntities[chronoTag].delta( theType );
332 }
333 // ============================================================================
334 // Implementation of IChronoStatSvc::chronoPrint
335 // ============================================================================
336 void ChronoStatSvc::chronoPrint( const IChronoStatSvc::ChronoTag& chronoTag )
337 {
338  MsgStream log( msgSvc(), chronoTag );
339  if ( m_printUserTime ) {
340  log << (MSG::Level)m_chronoPrintLevel << m_chronoEntities[chronoTag].outputUserTime() << endmsg;
341  }
342  if ( m_printSystemTime ) {
343  log << (MSG::Level)m_chronoPrintLevel << m_chronoEntities[chronoTag].outputSystemTime() << endmsg;
344  }
345 }
346 // ============================================================================
347 // Implementation of IChronoSvc::chronoStatus
348 // ============================================================================
349 IChronoStatSvc::ChronoStatus ChronoStatSvc::chronoStatus( const IChronoStatSvc::ChronoTag& chronoTag )
350 {
351  return m_chronoEntities[chronoTag].status();
352 }
353 // ============================================================================
354 // Implementation of IChronoStatSvc::stat
355 // ============================================================================
356 void ChronoStatSvc::stat( const IChronoStatSvc::StatTag& statTag, const IChronoStatSvc::StatFlag& statFlag )
357 {
358  auto theIter = m_statEntities.find( statTag );
359 
360  StatEntity* theStat = nullptr;
361  // if new entity, specify the number of events to be skipped
362  if ( theIter == m_statEntities.end() ) {
363  // new stat entity
364  StatEntity& theSe = m_statEntities[statTag];
365  theStat = &theSe;
366  } else {
367  // existing stat entity
368  theStat = &theIter->second;
369  }
370 
371  theStat->addFlag( statFlag );
372 }
373 // ============================================================================
374 // Implementation of IChronoStatSvc::statPrint
375 // ============================================================================
376 void ChronoStatSvc::statPrint( const IChronoStatSvc::StatTag& statTag )
377 {
378  MsgStream log( msgSvc(), statTag );
379  log << (MSG::Level)m_statPrintLevel << m_statEntities[statTag] << endmsg;
380 }
381 // ============================================================================
382 /* extract the chrono entity for the given tag (name)
383  * @see IChronoStatSvc
384  * @param t chrono tag(name)
385  * @return pointer to chrono entity
386  */
387 // ============================================================================
388 const ChronoEntity* ChronoStatSvc::chrono( const IChronoStatSvc::ChronoTag& t ) const
389 {
390  auto it = m_chronoEntities.find( t );
391  return m_chronoEntities.end() != it ? &( it->second ) : nullptr;
392 }
393 // ============================================================================
394 /* extract the stat entity for the given tag (name)
395  * @see IChronoStatSvc
396  * @param t stat tag(name)
397  * @return pointer to stat entity
398  */
399 // ============================================================================
400 StatEntity* ChronoStatSvc::stat( const IChronoStatSvc::StatTag& t )
401 {
402  auto it = m_statEntities.find( t );
403  return m_statEntities.end() != it ? &( it->second ) : nullptr;
404 }
405 // ============================================================================
406 // dump all the statistics into an ASCII file
407 // ============================================================================
409 {
410  std::ofstream out( m_statsOutFileName.value(), std::ios_base::out | std::ios_base::trunc );
411  if ( !out.good() ) {
412  info() << "Could not open the output file for writing chrono statistics [" << m_statsOutFileName.value() << "]"
413  << endmsg;
414  return;
415  } else {
416  // format it our way
417  out << std::scientific << std::setprecision( 8 );
418  }
419 
420  // ChronoEntity
422  chronos.reserve( m_chronoEntities.size() );
424  []( ChronoMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
425 
426  // sort it
427  std::sort( std::begin( chronos ), std::end( chronos ), CompareFirstOfPointerPair );
428 
429  // print User Time statistics
430  for ( const auto& iter : chronos ) {
431  //
432  const ChronoEntity* entity = iter.first;
433  if ( !entity ) {
434  continue;
435  }
436 
437  const ChronoTag* tag = iter.second;
438  if ( !tag ) {
439  continue;
440  }
441 
442  // create an entry in the .INI-like table
443  out << "\n[" << *tag << "]\n";
444 
445  // user
446  out << "cpu_user_total = " << entity->uTotalTime() << "\n";
447  out << "cpu_user_min = " << entity->uMinimalTime() << "\n";
448  out << "cpu_user_mean = " << entity->uMeanTime() << "\n";
449  out << "cpu_user_RMS = " << entity->uRMSTime() << "\n";
450  out << "cpu_user_max = " << entity->uMaximalTime() << "\n";
451  out << "cpu_user_nbr = " << entity->nOfMeasurements() << "\n";
452 
453  // system
454  out << "\n"; // just for clarity
455  out << "cpu_system_total = " << entity->kTotalTime() << "\n";
456  out << "cpu_system_min = " << entity->kMinimalTime() << "\n";
457  out << "cpu_system_mean = " << entity->kMeanTime() << "\n";
458  out << "cpu_system_RMS = " << entity->kRMSTime() << "\n";
459  out << "cpu_system_max = " << entity->kMaximalTime() << "\n";
460  out << "cpu_system_nbr = " << entity->nOfMeasurements() << "\n";
461 
462  // real
463  out << "\n"; // just for clarity
464  out << "cpu_real_total = " << entity->eTotalTime() << "\n";
465  out << "cpu_real_min = " << entity->eMinimalTime() << "\n";
466  out << "cpu_real_mean = " << entity->eMeanTime() << "\n";
467  out << "cpu_real_RMS = " << entity->eRMSTime() << "\n";
468  out << "cpu_real_max = " << entity->eMaximalTime() << "\n";
469  out << "cpu_real_nbr = " << entity->nOfMeasurements() << "\n";
470  }
471 
472  out << std::endl;
473 }
474 // ============================================================================
475 // print the "Stat" part of the ChronoStatSvc
476 // ============================================================================
478 {
480  if ( m_statEntities.empty() ) {
481  return;
482  }
483 
484  MsgStream log( msgSvc(), "******Stat******" );
486  const std::string stars( ( m_statCoutFlag ) ? 126 : 100, '*' );
488  if ( m_statCoutFlag ) {
489  std::cout << stars << std::endl;
490  std::cout << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
491  std::cout << stars << std::endl;
492  } else {
493  log << m_statPrintLevel << stars << endmsg;
494  log << m_statPrintLevel << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" )
495  << endmsg;
496  log << m_statPrintLevel << stars << endmsg;
497  }
498 
499  {
500  // prepare container for printing
502  typedef std::vector<SPair> SCont;
503  SCont tmpCont;
505  []( StatMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
506  // sort it
507  if ( m_statOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
508  // print the table header
509  if ( m_statCoutFlag ) {
510  std::cout << m_header.value() << std::endl;
511  } else {
512  log << m_statPrintLevel << m_header.value() << endmsg;
513  }
514 
515  // loop over counters and print them:
516  for ( const auto& iter : tmpCont ) {
518  const StatEntity* entity = iter.first;
519  if ( !entity ) {
520  continue;
521  }
522  const StatTag* tag = iter.second;
523  if ( !tag ) {
524  continue;
525  }
526  if ( m_statCoutFlag ) {
528  entity->print( std::cout, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
529  } else {
530  std::ostringstream ost;
531  entity->print( ost, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
532  log << m_statPrintLevel << ost.str() << endmsg;
533  }
534  }
535  tmpCont.clear();
536  }
538  if ( m_statCoutFlag ) {
539  std::cout << stars << std::endl;
540  } else {
541  log << m_statPrintLevel << stars << endmsg;
542  }
543 }
544 
545 // ============================================================================
546 
547 void ChronoStatSvc::handle( const Incident& /* inc */ )
548 {
549 
550  if ( !m_ofd.is_open() ) return;
551 
552  for ( const auto& itr : m_chronoEntities ) {
553  if ( itr.first.find( ":Execute" ) == std::string::npos ) continue;
554 
555  auto itm = m_perEvtTime.find( itr.first );
556  if ( itm == m_perEvtTime.end() ) {
557  m_perEvtTime[itr.first] = {itr.second.delta( IChronoSvc::ELAPSED )};
558  } else {
559  itm->second.push_back( itr.second.delta( IChronoSvc::ELAPSED ) );
560  }
561  }
562 }
563 
564 // ============================================================================
565 // The END
566 // ============================================================================
Gaudi::Property< int > m_intStatPrintLevel
std::string outputElapsedTime() const
print the chrono ;
constexpr static const auto FAILURE
Definition: StatusCode.h:88
double kMaximalTime() const
maximal measurement for kernel time
Definition: ChronoEntity.h:199
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
StatusCode initialize() override
Definition: Service.cpp:63
T empty(T...args)
double uMinimalTime() const
minimal measurement for user time
Definition: ChronoEntity.h:183
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
T open(T...args)
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:288
double uTotalTime() const
total user time
Definition: ChronoEntity.h:207
ChronoStatus chronoStatus(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStatus.
Gaudi::Property< std::string > m_header
StatusCode finalize() override
Definition: Service.cpp:173
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
StatMap m_statEntities
stat part
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition: ChronoEntity.h:21
Gaudi::Property< bool > m_statCoutFlag
IChronoStatSvc::ChronoTime chronoDelta(const IChronoStatSvc::ChronoTag &chronoTag, IChronoStatSvc::ChronoType theType) override
Implementation of IchronoStatSvc::chronoDelta.
double kTotalTime() const
total Kernel time
Definition: ChronoEntity.h:211
T endl(T...args)
Gaudi::Property< bool > m_chronoOrderFlag
Gaudi::Property< bool > m_printUserTime
void stat(const IChronoStatSvc::StatTag &statTag, const IChronoStatSvc::StatFlag &statFlag) override
Implementation of IChronoStatSvc::stat add statistical information to the entity , tagged by its name.
double uRMSTime() const
r.m.s User Time
Definition: ChronoEntity.h:239
T end(T...args)
double kMinimalTime() const
minimal measurement for kernel time
Definition: ChronoEntity.h:187
double eMinimalTime() const
minimal measurement for elapsed time
Definition: ChronoEntity.h:191
double kRMSTime() const
r.m.s Kernel Time
Definition: ChronoEntity.h:235
void statPrint(const IChronoStatSvc::ChronoTag &statTag) override
prints (using message service) info about statistical entity, tagged by its name
std::string outputSystemTime() const
print the chrono ;
IChronoSvc::ChronoStatus start()
start the current chrono
bool isFailure() const
Definition: StatusCode.h:139
STL class.
#define DECLARE_COMPONENT(type)
T min(T...args)
const ChronoEntity * chrono(const IChronoStatSvc::ChronoTag &t) const override
extract the chrono entity for the given tag (name)
double kMeanTime() const
average Kernel Time
Definition: ChronoEntity.h:223
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
STL class.
double eMeanTime() const
average Elapsed Time
Definition: ChronoEntity.h:231
void merge(const ChronoStatSvc &css)
Compound assignment operator.
ChronoStatSvc()=delete
bool operator()(const std::pair< S *, T * > &p1, const std::pair< S *, T * > &p2) const
Gaudi::Property< bool > m_useEffFormat
void saveStats()
dump the statistics into an ASCII file for offline processing
Gaudi::Property< int > m_intChronoPrintLevel
constexpr struct CompareFirstOfPointerPair_t CompareFirstOfPointerPair
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:187
TimeMap m_perEvtTime
T close(T...args)
const ChronoEntity * chronoStop(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStop.
Gaudi::Property< bool > m_statOrderFlag
T make_pair(T...args)
double eRMSTime() const
r.m.s Elapsed Time
Definition: ChronoEntity.h:243
std::ostream & print(std::ostream &o, bool tableFormat, const std::string &name, bool flag=true, std::string fmtHead="%|-48.48s|%|27t|") const
Definition: Counters.h:889
Gaudi::Property< bool > m_chronoTableFlag
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
T clear(T...args)
std::ofstream m_ofd
T max(T...args)
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:294
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
T count(T...args)
T scientific(T...args)
MSG::Level m_chronoPrintLevel
level of info printing
StatusCode initialize() override
Implementation of IService::initialize()
dictionary l
Definition: gaudirun.py:440
Gaudi::Property< bool > m_printEllapsedTime
T insert(T...args)
double uMeanTime() const
average User Time
Definition: ChronoEntity.h:227
std::string outputUserTime() const
print the chrono ;
T find(T...args)
T size(T...args)
HepRndm::Engine< TripleRand > e2
STL class.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
T begin(T...args)
void handle(const Incident &incident) override
T back_inserter(T...args)
Gaudi::Property< bool > m_statTableFlag
double eMaximalTime() const
maximal measurement for elapsed time
Definition: ChronoEntity.h:203
Base class for all Incidents (computing events).
Definition: Incident.h:17
ChronoEntity * chronoStart(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStart.
unsigned long addFlag(const double v)
Definition: Counters.h:857
T emplace(T...args)
unsigned long nOfMeasurements() const
number of chrono measurements
Definition: ChronoEntity.h:179
Gaudi::Property< std::string > m_statsOutFileName
MSG::Level m_statPrintLevel
level of info printing
Gaudi::Property< bool > m_chronoCoutFlag
T sort(T...args)
T transform(T...args)
backward compatible StatEntity class.
Definition: Counters.h:777
T is_open(T...args)
IChronoSvc::ChronoStatus stop()
stop the chrono
double uMaximalTime() const
maximal measurement for user time
Definition: ChronoEntity.h:195
T setprecision(T...args)
double eTotalTime() const
total Elapsed time
Definition: ChronoEntity.h:215
void chronoPrint(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoPrint.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:291
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23
The Chrono & Stat Sservice: service implements the IChronoStatSvc interface and provides the basic ch...
Definition: ChronoStatSvc.h:33
T reserve(T...args)
ChronoMap m_chronoEntities
chrono part
T emplace_back(T...args)
Gaudi::Property< bool > m_printSystemTime
StatusCode finalize() override
Implementation of IService::finalize()
Gaudi::Property< std::string > m_perEventFile