Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 // ============================================================================
20 #include "GaudiKernel/Kernel.h"
21 #include "GaudiKernel/MsgStream.h"
22 #include "GaudiKernel/Stat.h"
23 #include "GaudiKernel/StatEntity.h"
24 #include "GaudiKernel/StatusCode.h"
25 // ============================================================================
27 // ============================================================================
28 #include "ChronoStatSvc.h"
29 // ============================================================================
32 // ============================================================================
34 // ============================================================================
41 // ============================================================================
42 // ============================================================================
43 // comparison functor
44 // ============================================================================
45 constexpr struct CompareFirstOfPointerPair_t {
46  template <typename S, typename T>
47  inline bool operator()( const std::pair<S*, T*>& p1, const std::pair<S*, T*>& p2 ) const {
48  auto e1 = p1.first;
49  auto e2 = p2.first;
50  return ( !e1 || !e2 ) || *e1 < *e2;
51  }
53 // ============================================================================
54 // Compound assignment operator.
55 // ============================================================================
56 void ChronoStatSvc::merge( const ChronoStatSvc& css ) {
57 
58  // Add the content of the maps, leave the rest unchanged
59 
60  lock_t lock( m_mutex );
61  lock_t otherLock( css.m_mutex );
62 
63  // Merge Chronomaps
64  for ( auto& item : css.m_chronoEntities ) {
65  const IChronoStatSvc::ChronoTag& key = item.first;
66  const ChronoEntity& val = item.second;
67  if ( m_chronoEntities.count( key ) )
68  m_chronoEntities[key] += val;
69  else
71  }
72 
73  // Merge StatMaps
74  for ( auto& item : css.m_statEntities ) {
75  const IChronoStatSvc::StatTag& key = item.first;
76  const StatEntity& val = item.second;
77  if ( m_statEntities.count( key ) )
78  m_statEntities[key] += val;
79  else
80  m_statEntities.emplace( key, val );
81  }
82 }
83 // ============================================================================
84 // Implementation of IService::initialize()
85 // ============================================================================
88  if ( sc.isFailure() ) return sc;
90  // Set my own properties
91  sc = setProperties();
92 
93  if ( sc.isFailure() ) {
94  error() << "setting my properties" << endmsg;
95  return StatusCode::FAILURE;
96  }
97 
98  // only add an EndEvent listener if per-event output requested
99  if ( !m_perEventFile.empty() ) {
101  if ( !m_ofd.is_open() ) {
102  error() << "unable to open per-event output file \"" << m_perEventFile << "\"" << endmsg;
103  return StatusCode::FAILURE;
104  } else {
105  auto ii = serviceLocator()->service<IIncidentSvc>( "IncidentSvc" );
106  if ( !ii ) {
107  error() << "Unable to find IncidentSvc" << endmsg;
108  return StatusCode::FAILURE;
109  }
110  ii->addListener( this, IncidentType::EndEvent );
111  }
112  }
113 
119  chronoStart( name() );
121  return StatusCode::SUCCESS;
122 }
123 // ============================================================================
124 // Implementation of IService::finalize()
125 // ============================================================================
127  std::string local = name() + ".finalize()";
129  MsgStream main_log( msgSvc(), local );
132  chronoStop( name() );
133 
134  if ( m_ofd.is_open() ) {
135  debug() << "writing per-event timing data to '" << m_perEventFile << "'" << endmsg;
136  for ( const auto& itr : m_perEvtTime ) {
137  m_ofd << itr.first.substr( 0, itr.first.length() - 8 ) << " ";
138  for ( const auto& itt : itr.second ) { m_ofd << " " << (long int)( itt ); }
139  m_ofd << std::endl;
140  }
141 
142  m_ofd.close();
143  }
144 
149  MsgStream log( msgSvc(), "*****Chrono*****" );
150  const std::string stars( ( m_chronoCoutFlag ) ? 126 : 100, '*' );
151  if ( m_chronoCoutFlag ) {
152  std::cout << stars << std::endl;
153  if ( isMT() ) { std::cout << "WARNING: MT job; statistics are unreliable" << std::endl; }
154  std::cout << local << " The Final CPU consumption (Chrono) Table "
155  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
156  std::cout << stars << std::endl;
157  } else {
158  log << m_chronoPrintLevel << stars << endmsg;
159  if ( isMT() ) { log << m_chronoPrintLevel << "WARNING: MT job; statistics are unreliable" << endmsg; }
160  log << m_chronoPrintLevel << " The Final CPU consumption ( Chrono ) Table "
161  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << endmsg;
162  log << m_chronoPrintLevel << stars << endmsg;
163  }
165  { // prepare container for printing
167  tmpCont.reserve( m_chronoEntities.size() );
168  for ( auto& it : m_chronoEntities ) { tmpCont.emplace_back( &it.second, &it.first ); }
169  // sort it
170  if ( m_chronoOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
171  // print User Time statistics
172  if ( m_printUserTime ) {
173  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
174  //
175  ChronoEntity* entity = iter->first;
176  if ( !entity ) { continue; }
177  const ChronoTag* tag = iter->second;
178  if ( !tag ) { continue; }
179  entity->stop();
181  if ( m_chronoCoutFlag )
183  {
184  std::cout << *tag << "\t" << entity->outputUserTime() << std::endl;
185  } else
186  {
187  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputUserTime() << endmsg;
188  }
189  //
190  }
191  }
193  if ( m_printSystemTime ) {
197  std::cout << stars << std::endl;
198  } else if ( m_printUserTime && !m_chronoCoutFlag ) {
199  log << m_chronoPrintLevel << stars << endmsg;
200  }
202  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
204  ChronoEntity* entity = iter->first;
205  if ( !entity ) { continue; }
206  const ChronoTag* tag = iter->second;
207  if ( !tag ) { continue; }
208  entity->stop();
210  if ( m_chronoCoutFlag )
212  {
213  std::cout << *tag << "\t" << entity->outputSystemTime() << std::endl;
214  } else
215  {
216  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputSystemTime() << endmsg;
217  }
218  //
219  }
220  }
222  if ( m_printEllapsedTime ) {
226  std::cout << stars << std::endl;
227  } else if ( ( m_printUserTime || m_printSystemTime ) && !m_chronoCoutFlag ) {
228  log << m_chronoPrintLevel << stars << endmsg;
229  }
231  for ( const auto& i : tmpCont ) {
233  ChronoEntity* entity = i.first;
234  if ( !entity ) { continue; }
235  const ChronoTag* tag = i.second;
236  if ( !tag ) { continue; }
237  entity->stop();
239  if ( m_chronoCoutFlag )
241  {
242  std::cout << *tag << "\t" << entity->outputElapsedTime() << std::endl;
243  } else
244  {
245  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputElapsedTime() << endmsg;
246  }
247  //
248  }
249  }
251  tmpCont.clear();
252  }
254  if ( m_chronoCoutFlag ) {
255  std::cout << stars << std::endl;
256  } else {
257  log << m_chronoPrintLevel << stars << endmsg;
258  }
259  }
260 
262 
264  if ( m_statTableFlag ) { printStats(); }
265 
266  if ( !m_statsOutFileName.value().empty() ) { saveStats(); }
267 
268  main_log << MSG::INFO << " Service finalized successfully " << endmsg;
269 
270  return Service::finalize();
271 }
272 // ============================================================================
273 // Implementation of IChronoStatSvc::chronoStart
274 // ============================================================================
275 ChronoEntity* ChronoStatSvc::chronoStart( const ChronoTag& chronoTag ) {
276  ChronoEntity& entity = getEntity( chronoTag );
277  entity.start();
278  return &entity;
279 }
280 // ============================================================================
281 // Implementation of IChronoStatSvc::chronoStop
282 // ============================================================================
283 const ChronoEntity* ChronoStatSvc::chronoStop( const IChronoStatSvc::ChronoTag& chronoTag ) {
284  ChronoEntity& entity = getEntity( chronoTag );
285  entity.stop();
286  return &entity;
287 }
288 // ============================================================================
289 // Implementation of IChronoStatSvc::chronoDelta
290 // ============================================================================
291 IChronoStatSvc::ChronoTime ChronoStatSvc::chronoDelta( const IChronoStatSvc::ChronoTag& chronoTag,
292  IChronoStatSvc::ChronoType theType ) {
293  return getEntity( chronoTag ).delta( theType );
294 }
295 // ============================================================================
296 // Implementation of IChronoStatSvc::chronoPrint
297 // ============================================================================
298 void ChronoStatSvc::chronoPrint( const IChronoStatSvc::ChronoTag& chronoTag ) {
299  MsgStream log( msgSvc(), chronoTag );
300  if ( m_printUserTime ) { log << m_chronoPrintLevel << getEntity( chronoTag ).outputUserTime() << endmsg; }
301  if ( m_printSystemTime ) { log << m_chronoPrintLevel << getEntity( chronoTag ).outputSystemTime() << endmsg; }
302 }
303 // ============================================================================
304 // Implementation of IChronoSvc::chronoStatus
305 // ============================================================================
306 IChronoStatSvc::ChronoStatus ChronoStatSvc::chronoStatus( const IChronoStatSvc::ChronoTag& chronoTag ) {
307  return getEntity( chronoTag ).status();
308 }
309 // ============================================================================
310 // Implementation of IChronoStatSvc::stat
311 // ============================================================================
312 void ChronoStatSvc::stat( const IChronoStatSvc::StatTag& statTag, const IChronoStatSvc::StatFlag& statFlag ) {
313  auto theIter = m_statEntities.find( statTag );
314 
315  StatEntity* theStat = nullptr;
316  // if new entity, specify the number of events to be skipped
317  if ( theIter == m_statEntities.end() ) {
318  // new stat entity
319  StatEntity& theSe = m_statEntities[statTag];
320  theStat = &theSe;
321  } else {
322  // existing stat entity
323  theStat = &theIter->second;
324  }
325 
326  theStat->addFlag( statFlag );
327 }
328 // ============================================================================
329 // Implementation of IChronoStatSvc::statPrint
330 // ============================================================================
331 void ChronoStatSvc::statPrint( const IChronoStatSvc::StatTag& statTag ) {
332  MsgStream log( msgSvc(), statTag );
333  log << m_statPrintLevel << m_statEntities[statTag] << endmsg;
334 }
335 // ============================================================================
336 /* extract the chrono entity for the given tag (name)
337  * @see IChronoStatSvc
338  * @param t chrono tag(name)
339  * @return pointer to chrono entity
340  */
341 // ============================================================================
342 const ChronoEntity* ChronoStatSvc::chrono( const IChronoStatSvc::ChronoTag& t ) const {
343  lock_t lock( m_mutex );
344  auto it = m_chronoEntities.find( t );
345  return m_chronoEntities.end() != it ? &( it->second ) : nullptr;
346 }
347 // ============================================================================
348 /* extract the stat entity for the given tag (name)
349  * @see IChronoStatSvc
350  * @param t stat tag(name)
351  * @return pointer to stat entity
352  */
353 // ============================================================================
354 StatEntity* ChronoStatSvc::stat( const IChronoStatSvc::StatTag& t ) {
355  auto it = m_statEntities.find( t );
356  return m_statEntities.end() != it ? &( it->second ) : nullptr;
357 }
358 // ============================================================================
359 // dump all the statistics into an ASCII file
360 // ============================================================================
362  std::ofstream out( m_statsOutFileName.value(), std::ios_base::out | std::ios_base::trunc );
363  if ( !out.good() ) {
364  info() << "Could not open the output file for writing chrono statistics [" << m_statsOutFileName.value() << "]"
365  << endmsg;
366  return;
367  } else {
368  // format it our way
369  out << std::scientific << std::setprecision( 8 );
370  }
371 
372  // ChronoEntity
374  {
375  lock_t lock( m_mutex );
376  chronos.reserve( m_chronoEntities.size() );
378  []( ChronoMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
379  }
380 
381  // sort it
382  std::sort( std::begin( chronos ), std::end( chronos ), CompareFirstOfPointerPair );
383 
384  // print User Time statistics
385  for ( const auto& iter : chronos ) {
386  //
387  const ChronoEntity* entity = iter.first;
388  if ( !entity ) { continue; }
389 
390  const ChronoTag* tag = iter.second;
391  if ( !tag ) { continue; }
392 
393  // create an entry in the .INI-like table
394  out << "\n[" << *tag << "]\n";
395 
396  // user
397  out << "cpu_user_total = " << entity->uTotalTime() << "\n";
398  out << "cpu_user_min = " << entity->uMinimalTime() << "\n";
399  out << "cpu_user_mean = " << entity->uMeanTime() << "\n";
400  out << "cpu_user_RMS = " << entity->uRMSTime() << "\n";
401  out << "cpu_user_max = " << entity->uMaximalTime() << "\n";
402  out << "cpu_user_nbr = " << entity->nOfMeasurements() << "\n";
403 
404  // system
405  out << "\n"; // just for clarity
406  out << "cpu_system_total = " << entity->kTotalTime() << "\n";
407  out << "cpu_system_min = " << entity->kMinimalTime() << "\n";
408  out << "cpu_system_mean = " << entity->kMeanTime() << "\n";
409  out << "cpu_system_RMS = " << entity->kRMSTime() << "\n";
410  out << "cpu_system_max = " << entity->kMaximalTime() << "\n";
411  out << "cpu_system_nbr = " << entity->nOfMeasurements() << "\n";
412 
413  // real
414  out << "\n"; // just for clarity
415  out << "cpu_real_total = " << entity->eTotalTime() << "\n";
416  out << "cpu_real_min = " << entity->eMinimalTime() << "\n";
417  out << "cpu_real_mean = " << entity->eMeanTime() << "\n";
418  out << "cpu_real_RMS = " << entity->eRMSTime() << "\n";
419  out << "cpu_real_max = " << entity->eMaximalTime() << "\n";
420  out << "cpu_real_nbr = " << entity->nOfMeasurements() << "\n";
421  }
422 
423  out << std::endl;
424 }
425 // ============================================================================
426 // Test if we're running in an MT job.
427 // ============================================================================
428 bool ChronoStatSvc::isMT() const {
429  bool isMT = false;
431  error() << "Cannot retrieve HiveWhiteBoardSvc";
432  } else {
433  // In non-MT mode, `EventDataSvc' does not have an IHiveWhiteBoard interface.
435  if ( wb && wb->getNumberOfStores() > 1 ) { isMT = true; }
436  }
437  return isMT;
438 }
439 // ============================================================================
440 // print the "Stat" part of the ChronoStatSvc
441 // ============================================================================
444  if ( m_statEntities.empty() ) { return; }
445 
446  MsgStream log( msgSvc(), "******Stat******" );
448  const std::string stars( ( m_statCoutFlag ) ? 126 : 100, '*' );
450  if ( m_statCoutFlag ) {
451  std::cout << stars << std::endl;
452  if ( isMT() ) { std::cout << "WARNING: MT job; statistics are unreliable" << std::endl; }
453  std::cout << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
454  std::cout << stars << std::endl;
455  } else {
456  log << m_statPrintLevel << stars << endmsg;
457  if ( isMT() ) { log << (MSG::Level)m_chronoPrintLevel << "WARNING: MT job; statistics are unreliable" << endmsg; }
458  log << m_statPrintLevel << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" )
459  << endmsg;
460  log << m_statPrintLevel << stars << endmsg;
461  }
462 
463  {
464  // prepare container for printing
466  typedef std::vector<SPair> SCont;
467  SCont tmpCont;
469  []( StatMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
470  // sort it
471  if ( m_statOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
472  // print the table header
473  if ( m_statCoutFlag ) {
474  std::cout << m_header.value() << std::endl;
475  } else {
476  log << m_statPrintLevel << m_header.value() << endmsg;
477  }
478 
479  // loop over counters and print them:
480  for ( const auto& iter : tmpCont ) {
482  const StatEntity* entity = iter.first;
483  if ( !entity ) { continue; }
484  const StatTag* tag = iter.second;
485  if ( !tag ) { continue; }
486  if ( m_statCoutFlag ) {
488  entity->print( std::cout, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
489  } else {
490  std::ostringstream ost;
491  entity->print( ost, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
492  log << m_statPrintLevel << ost.str() << endmsg;
493  }
494  }
495  tmpCont.clear();
496  }
498  if ( m_statCoutFlag ) {
499  std::cout << stars << std::endl;
500  } else {
501  log << m_statPrintLevel << stars << endmsg;
502  }
503 }
504 
505 // ============================================================================
506 
507 void ChronoStatSvc::handle( const Incident& /* inc */ ) {
508 
509  if ( !m_ofd.is_open() ) return;
510 
511  lock_t lock( m_mutex );
512  for ( const auto& itr : m_chronoEntities ) {
513  if ( itr.first.find( ":Execute" ) == std::string::npos ) continue;
514 
515  auto itm = m_perEvtTime.find( itr.first );
516  if ( itm == m_perEvtTime.end() ) {
517  m_perEvtTime[itr.first] = {itr.second.delta( IChronoSvc::ELAPSED )};
518  } else {
519  itm->second.push_back( itr.second.delta( IChronoSvc::ELAPSED ) );
520  }
521  }
522 }
523 
524 // ============================================================================
525 // The END
526 // ============================================================================
std::string outputElapsedTime() const
print the chrono ;
ChronoEntity & getEntity(const ChronoTag &chronoTag)
double kMaximalTime() const
maximal measurement for kernel time
Definition: ChronoEntity.h:201
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
StatusCode initialize() override
Definition: Service.cpp:60
T empty(T...args)
double uMinimalTime() const
minimal measurement for user time
Definition: ChronoEntity.h:185
T open(T...args)
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
double uTotalTime() const
total user time
Definition: ChronoEntity.h:209
ChronoStatus chronoStatus(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStatus.
Gaudi::Property< std::string > m_header
StatusCode finalize() override
Definition: Service.cpp:164
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
T * get() const
Release the Service.
Definition: ServiceHandle.h:82
IChronoStatSvc::ChronoTime chronoDelta(const IChronoStatSvc::ChronoTag &chronoTag, IChronoStatSvc::ChronoType theType) override
Implementation of IchronoStatSvc::chronoDelta.
double kTotalTime() const
total Kernel time
Definition: ChronoEntity.h:213
T endl(T...args)
Gaudi::Property< bool > m_chronoOrderFlag
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Gaudi::Property< bool > m_printUserTime
std::mutex m_mutex
Mutex protecting m_chronoEntities.
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:241
T end(T...args)
double kMinimalTime() const
minimal measurement for kernel time
Definition: ChronoEntity.h:189
double eMinimalTime() const
minimal measurement for elapsed time
Definition: ChronoEntity.h:193
double kRMSTime() const
r.m.s Kernel Time
Definition: ChronoEntity.h:237
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:130
STL class.
#define DECLARE_COMPONENT(type)
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:225
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
STL class.
double eMeanTime() const
average Elapsed Time
Definition: ChronoEntity.h:233
void merge(const ChronoStatSvc &css)
Compound assignment operator.
bool isMT() const
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
constexpr struct CompareFirstOfPointerPair_t CompareFirstOfPointerPair
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:171
TimeMap m_perEvtTime
T close(T...args)
IChronoSvc::ChronoStatus status() const
return the status of chrono
Definition: ChronoEntity.h:177
const ChronoEntity * chronoStop(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStop.
StatusCode retrieve() const
Retrieve the Service.
Definition: ServiceHandle.h:71
Gaudi::Property< bool > m_statOrderFlag
T make_pair(T...args)
double eRMSTime() const
r.m.s Elapsed Time
Definition: ChronoEntity.h:245
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:978
Gaudi::Property< bool > m_chronoTableFlag
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
T clear(T...args)
ServiceHandle< IInterface > m_hiveWhiteBoardSvc
std::ofstream m_ofd
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:280
T count(T...args)
T scientific(T...args)
MSG::Level m_chronoPrintLevel
level of info printing
StatusCode initialize() override
Implementation of IService::initialize()
Gaudi::Property< bool > m_printEllapsedTime
T insert(T...args)
double uMeanTime() const
average User Time
Definition: ChronoEntity.h:229
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:205
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:904
T emplace(T...args)
constexpr static const auto FAILURE
Definition: StatusCode.h:86
unsigned long nOfMeasurements() const
number of chrono measurements
Definition: ChronoEntity.h:181
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:837
T is_open(T...args)
IChronoSvc::ChronoStatus stop()
stop the chrono
double uMaximalTime() const
maximal measurement for user time
Definition: ChronoEntity.h:197
T setprecision(T...args)
double eTotalTime() const
total Elapsed time
Definition: ChronoEntity.h:217
void chronoPrint(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoPrint.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:277
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
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:37
T reserve(T...args)
ChronoMap m_chronoEntities
chrono part
IChronoSvc::ChronoTime delta(IChronoSvc::ChronoType type) const
return the last delta-time of type "type"
Definition: ChronoEntity.h:261
T emplace_back(T...args)
Gaudi::Property< bool > m_printSystemTime
StatusCode finalize() override
Implementation of IService::finalize()
Gaudi::Property< std::string > m_perEventFile