The Gaudi Framework  v29r0 (ff2e7097)
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
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 
126  info() << " Number of skipped events for MemStat" << m_numberOfSkippedEventsForMemStat.value() << endmsg;
127 
129  m_printUserTime = true;
130  }
133  m_chronoTableFlag = true;
134  }
137  chronoStart( name() );
139  return StatusCode::SUCCESS;
140 }
141 // ============================================================================
142 // Implementation of IService::finalize()
143 // ============================================================================
145 {
146  std::string local = name() + ".finalize()";
148  MsgStream main_log( msgSvc(), local );
151  chronoStop( name() );
152 
153  if ( m_ofd.is_open() ) {
154  debug() << "writing per-event timing data to '" << m_perEventFile << "'" << endmsg;
155  for ( const auto& itr : m_perEvtTime ) {
156  m_ofd << itr.first.substr( 0, itr.first.length() - 8 ) << " ";
157  for ( const auto& itt : itr.second ) {
158  m_ofd << " " << (long int)( itt );
159  }
160  m_ofd << std::endl;
161  }
162 
163  m_ofd.close();
164  }
165 
170  MsgStream log( msgSvc(), "*****Chrono*****" );
171  const std::string stars( ( m_chronoCoutFlag ) ? 126 : 100, '*' );
172  if ( m_chronoCoutFlag ) {
173  std::cout << stars << std::endl;
174  std::cout << local << " The Final CPU consumption (Chrono) Table "
175  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
176  std::cout << stars << std::endl;
177  } else {
178  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
179  log << (MSG::Level)m_chronoPrintLevel << " The Final CPU consumption ( Chrono ) Table "
180  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << endmsg;
181  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
182  }
184  { // prepare container for printing
186  tmpCont.reserve( m_chronoEntities.size() );
187  for ( auto& it : m_chronoEntities ) {
188  tmpCont.emplace_back( &it.second, &it.first );
189  }
190  // sort it
191  if ( m_chronoOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
192  // print User Time statistics
193  if ( m_printUserTime ) {
194  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
195  //
196  ChronoEntity* entity = iter->first;
197  if ( !entity ) {
198  continue;
199  }
200  const ChronoTag* tag = iter->second;
201  if ( !tag ) {
202  continue;
203  }
204  entity->stop();
206  if ( m_chronoCoutFlag )
208  {
209  std::cout << *tag << "\t" << entity->outputUserTime() << std::endl;
210  } else
211  {
212  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputUserTime() << endmsg;
213  }
214  //
215  }
216  }
218  if ( m_printSystemTime ) {
222  std::cout << stars << std::endl;
223  } else if ( m_printUserTime && !m_chronoCoutFlag ) {
224  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
225  }
227  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
229  ChronoEntity* entity = iter->first;
230  if ( !entity ) {
231  continue;
232  }
233  const ChronoTag* tag = iter->second;
234  if ( !tag ) {
235  continue;
236  }
237  entity->stop();
239  if ( m_chronoCoutFlag )
241  {
242  std::cout << *tag << "\t" << entity->outputSystemTime() << std::endl;
243  } else
244  {
245  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputSystemTime() << endmsg;
246  }
247  //
248  }
249  }
251  if ( m_printEllapsedTime ) {
255  std::cout << stars << std::endl;
256  } else if ( ( m_printUserTime || m_printSystemTime ) && !m_chronoCoutFlag ) {
257  log << (MSG::Level)m_chronoPrintLevel << stars << endmsg;
258  }
260  for ( const auto& i : tmpCont ) {
262  ChronoEntity* entity = i.first;
263  if ( !entity ) {
264  continue;
265  }
266  const ChronoTag* tag = i.second;
267  if ( !tag ) {
268  continue;
269  }
270  entity->stop();
272  if ( m_chronoCoutFlag )
274  {
275  std::cout << *tag << "\t" << entity->outputElapsedTime() << std::endl;
276  } else
277  {
278  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputElapsedTime() << endmsg;
279  }
280  //
281  }
282  }
284  tmpCont.clear();
285  }
287  if ( m_chronoCoutFlag ) {
288  std::cout << stars << std::endl;
289  } else {
290  log << m_chronoPrintLevel << stars << endmsg;
291  }
292  }
293 
295 
297  if ( m_statTableFlag ) {
298  printStats();
299  }
300 
301  if ( !m_statsOutFileName.value().empty() ) {
302  saveStats();
303  }
304 
305  main_log << MSG::INFO << " Service finalized successfully " << endmsg;
306 
307  return Service::finalize();
308 }
309 // ============================================================================
310 // Implementation of IChronoStatSvc::chronoStart
311 // ============================================================================
312 ChronoEntity* ChronoStatSvc::chronoStart( const ChronoTag& chronoTag )
313 {
314  ChronoEntity& entity = m_chronoEntities[chronoTag];
315  entity.start();
316  return &entity;
317 }
318 // ============================================================================
319 // Implementation of IChronoStatSvc::chronoStop
320 // ============================================================================
321 const ChronoEntity* ChronoStatSvc::chronoStop( const IChronoStatSvc::ChronoTag& chronoTag )
322 {
323  ChronoEntity& entity = m_chronoEntities[chronoTag];
324  entity.stop();
325  return &entity;
326 }
327 // ============================================================================
328 // Implementation of IChronoStatSvc::chronoDelta
329 // ============================================================================
330 IChronoStatSvc::ChronoTime ChronoStatSvc::chronoDelta( const IChronoStatSvc::ChronoTag& chronoTag,
331  IChronoStatSvc::ChronoType theType )
332 {
333  return m_chronoEntities[chronoTag].delta( theType );
334 }
335 // ============================================================================
336 // Implementation of IChronoStatSvc::chronoPrint
337 // ============================================================================
338 void ChronoStatSvc::chronoPrint( const IChronoStatSvc::ChronoTag& chronoTag )
339 {
340  MsgStream log( msgSvc(), chronoTag );
341  if ( m_printUserTime ) {
342  log << (MSG::Level)m_chronoPrintLevel << m_chronoEntities[chronoTag].outputUserTime() << endmsg;
343  }
344  if ( m_printSystemTime ) {
345  log << (MSG::Level)m_chronoPrintLevel << m_chronoEntities[chronoTag].outputSystemTime() << endmsg;
346  }
347 }
348 // ============================================================================
349 // Implementation of IChronoSvc::chronoStatus
350 // ============================================================================
351 IChronoStatSvc::ChronoStatus ChronoStatSvc::chronoStatus( const IChronoStatSvc::ChronoTag& chronoTag )
352 {
353  return m_chronoEntities[chronoTag].status();
354 }
355 // ============================================================================
356 // Implementation of IChronoStatSvc::stat
357 // ============================================================================
358 void ChronoStatSvc::stat( const IChronoStatSvc::StatTag& statTag, const IChronoStatSvc::StatFlag& statFlag )
359 {
360  auto theIter = m_statEntities.find( statTag );
361 
362  StatEntity* theStat = nullptr;
363  // if new entity, specify the number of events to be skipped
364  if ( theIter == m_statEntities.end() ) {
365  // new stat entity
366  StatEntity& theSe = m_statEntities[statTag];
367  theStat = &theSe;
369  } else {
370  // existing stat entity
371  theStat = &theIter->second;
372  }
373 
374  theStat->addFlag( statFlag );
375 }
376 // ============================================================================
377 // Implementation of IChronoStatSvc::statPrint
378 // ============================================================================
379 void ChronoStatSvc::statPrint( const IChronoStatSvc::StatTag& statTag )
380 {
381  MsgStream log( msgSvc(), statTag );
382  log << (MSG::Level)m_statPrintLevel << m_statEntities[statTag] << endmsg;
383 }
384 // ============================================================================
385 /* extract the chrono entity for the given tag (name)
386  * @see IChronoStatSvc
387  * @param t chrono tag(name)
388  * @return pointer to chrono entity
389  */
390 // ============================================================================
391 const ChronoEntity* ChronoStatSvc::chrono( const IChronoStatSvc::ChronoTag& t ) const
392 {
393  auto it = m_chronoEntities.find( t );
394  return m_chronoEntities.end() != it ? &( it->second ) : nullptr;
395 }
396 // ============================================================================
397 /* extract the stat entity for the given tag (name)
398  * @see IChronoStatSvc
399  * @param t stat tag(name)
400  * @return pointer to stat entity
401  */
402 // ============================================================================
403 const StatEntity* ChronoStatSvc::stat( const IChronoStatSvc::StatTag& t ) const
404 {
405  auto it = m_statEntities.find( t );
406  return m_statEntities.end() != it ? &( it->second ) : nullptr;
407 }
408 // ============================================================================
409 // dump all the statistics into an ASCII file
410 // ============================================================================
412 {
413  std::ofstream out( m_statsOutFileName.value(), std::ios_base::out | std::ios_base::trunc );
414  if ( !out.good() ) {
415  info() << "Could not open the output file for writing chrono statistics [" << m_statsOutFileName.value() << "]"
416  << endmsg;
417  return;
418  } else {
419  // format it our way
420  out << std::scientific << std::setprecision( 8 );
421  }
422 
423  // ChronoEntity
425  chronos.reserve( m_chronoEntities.size() );
427  []( ChronoMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
428 
429  // sort it
430  std::sort( std::begin( chronos ), std::end( chronos ), CompareFirstOfPointerPair );
431 
432  // print User Time statistics
433  for ( const auto& iter : chronos ) {
434  //
435  const ChronoEntity* entity = iter.first;
436  if ( !entity ) {
437  continue;
438  }
439 
440  const ChronoTag* tag = iter.second;
441  if ( !tag ) {
442  continue;
443  }
444 
445  // create an entry in the .INI-like table
446  out << "\n[" << *tag << "]\n";
447 
448  // user
449  out << "cpu_user_total = " << entity->uTotalTime() << "\n";
450  out << "cpu_user_min = " << entity->uMinimalTime() << "\n";
451  out << "cpu_user_mean = " << entity->uMeanTime() << "\n";
452  out << "cpu_user_RMS = " << entity->uRMSTime() << "\n";
453  out << "cpu_user_max = " << entity->uMaximalTime() << "\n";
454  out << "cpu_user_nbr = " << entity->nOfMeasurements() << "\n";
455 
456  // system
457  out << "\n"; // just for clarity
458  out << "cpu_system_total = " << entity->kTotalTime() << "\n";
459  out << "cpu_system_min = " << entity->kMinimalTime() << "\n";
460  out << "cpu_system_mean = " << entity->kMeanTime() << "\n";
461  out << "cpu_system_RMS = " << entity->kRMSTime() << "\n";
462  out << "cpu_system_max = " << entity->kMaximalTime() << "\n";
463  out << "cpu_system_nbr = " << entity->nOfMeasurements() << "\n";
464 
465  // real
466  out << "\n"; // just for clarity
467  out << "cpu_real_total = " << entity->eTotalTime() << "\n";
468  out << "cpu_real_min = " << entity->eMinimalTime() << "\n";
469  out << "cpu_real_mean = " << entity->eMeanTime() << "\n";
470  out << "cpu_real_RMS = " << entity->eRMSTime() << "\n";
471  out << "cpu_real_max = " << entity->eMaximalTime() << "\n";
472  out << "cpu_real_nbr = " << entity->nOfMeasurements() << "\n";
473  }
474 
475  out << std::endl;
476 }
477 // ============================================================================
478 // print the "Stat" part of the ChronoStatSvc
479 // ============================================================================
481 {
483  if ( m_statEntities.empty() ) {
484  return;
485  }
486 
487  MsgStream log( msgSvc(), "******Stat******" );
489  const std::string stars( ( m_statCoutFlag ) ? 126 : 100, '*' );
491  if ( m_statCoutFlag ) {
492  std::cout << stars << std::endl;
493  std::cout << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
494  std::cout << stars << std::endl;
495  } else {
496  log << m_statPrintLevel << stars << endmsg;
497  log << m_statPrintLevel << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" )
498  << endmsg;
499  log << m_statPrintLevel << stars << endmsg;
500  }
501 
502  {
503  // prepare container for printing
505  typedef std::vector<SPair> SCont;
506  SCont tmpCont;
508  []( StatMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
509  // sort it
510  if ( m_statOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
511  // print the table header
512  if ( m_statCoutFlag ) {
513  std::cout << m_header.value() << std::endl;
514  } else {
515  log << m_statPrintLevel << m_header.value() << endmsg;
516  }
517 
518  // loop over counters and print them:
519  for ( const auto& iter : tmpCont ) {
521  const StatEntity* entity = iter.first;
522  if ( !entity ) {
523  continue;
524  }
525  const StatTag* tag = iter.second;
526  if ( !tag ) {
527  continue;
528  }
529  if ( m_statCoutFlag ) {
532  } else {
534  << endmsg;
535  }
536  }
537  tmpCont.clear();
538  }
540  if ( m_statCoutFlag ) {
541  std::cout << stars << std::endl;
542  } else {
543  log << m_statPrintLevel << stars << endmsg;
544  }
545 }
546 
547 // ============================================================================
548 
549 void ChronoStatSvc::handle( const Incident& /* inc */ )
550 {
551 
552  if ( !m_ofd.is_open() ) return;
553 
554  for ( const auto& itr : m_chronoEntities ) {
555  if ( itr.first.find( ":Execute" ) == std::string::npos ) continue;
556 
557  auto itm = m_perEvtTime.find( itr.first );
558  if ( itm == m_perEvtTime.end() ) {
559  m_perEvtTime[itr.first] = {itr.second.delta( IChronoSvc::ELAPSED )};
560  } else {
561  itm->second.push_back( itr.second.delta( IChronoSvc::ELAPSED ) );
562  }
563  }
564 }
565 
566 // ============================================================================
567 // The END
568 // ============================================================================
Gaudi::Property< int > m_intStatPrintLevel
std::string outputElapsedTime() const
print the chrono ;
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:64
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:289
double uTotalTime() const
total user time
Definition: ChronoEntity.h:207
virtual ChronoStatus chronoStatus(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStatus.
Gaudi::Property< std::string > m_header
StatusCode finalize() override
Definition: Service.cpp:174
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
virtual 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
Gaudi::Property< long > m_numberOfSkippedEventsForMemStat
T endl(T...args)
Gaudi::Property< bool > m_chronoOrderFlag
Gaudi::Property< bool > m_printUserTime
virtual 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
virtual 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
Test for a status code of FAILURE.
Definition: StatusCode.h:86
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:33
GAUDI_API std::string formatAsTableRow(const StatEntity &counter, const bool flag, const std::string &format1=" |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |")
print the counter in a form of the table row
Definition: StatEntity.cpp:305
STL class.
void setnEntriesBeforeReset(unsigned long nEntriesBeforeReset)
DR specify number of entry before reset.
Definition: StatEntity.cpp:215
T min(T...args)
virtual 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:28
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:187
TimeMap m_perEvtTime
Gaudi::Property< std::string > m_format2
T close(T...args)
virtual 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
Gaudi::Property< bool > m_chronoTableFlag
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
T clear(T...args)
std::ofstream m_ofd
Gaudi::Property< std::string > m_format1
T max(T...args)
unsigned long addFlag(const double Flag)
add a flag
Definition: StatEntity.h:413
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:295
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
virtual ChronoEntity * chronoStart(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStart.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
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)
The basic counter used for Monitoring purposes.
Definition: StatEntity.h:65
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
virtual void chronoPrint(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoPrint.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292
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