Go to the documentation of this file.
   20 #include <fmt/format.h> 
   22 #include <range/v3/range/conversion.hpp> 
   23 #include <range/v3/view/remove.hpp> 
   24 #include <range/v3/view/transform.hpp> 
   26 #include <string_view> 
   57       using namespace std::chrono_literals;
 
   61         const bool         doStackTrace;
 
   62         const bool         abortOnTimeout;
 
   63         const unsigned int timeout;
 
   82                 << 
fmt::format( 
"Current memory usage is virtual size = {} MB, resident set size = {} MB",
 
   87           std::scoped_lock protectReport( s_watchdogReportMutex );
 
   92               fmt::print( 
stderr, 
"=== Stalled event: current stack trace ({}) ===\n", 
ctx );
 
   93               gSystem->StackTrace();
 
   96           if ( abortOnTimeout ) {
 
  115         schedulers = svcLoc()->getServices() |
 
  116                      views::transform( []( 
auto svc ) { 
return Gaudi::Cast<IScheduler>( svc ); } ) |
 
  117                      views::remove( 
nullptr ) | to<std::vector>();
 
  128                                                          "Number of seconds allowed to process a single event." };
 
  130                                             "If set to true, the application is killed when we reach the timeout." };
 
  
 
PeriodicAction operator()(EventContext const &ctx) const override
 
Gaudi::CheckedProperty< unsigned int > m_eventTimeout
 
Generator[bytes, None, None] stderr(subprocess.CompletedProcess completed_process)
 
Helper to periodically run asynchronous tasks.
 
AttribStringParser::Iterator begin(const AttribStringParser &parser)
 
Gaudi::Property< bool > m_abortOnTimeout
 
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
 
Add to the transient store a tracker that detects events that are taking too long.
 
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
 
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
 
#define DECLARE_COMPONENT(type)
 
Gaudi::Property< bool > m_stackTrace
 
details::Transformer< Signature, Traits_, details::isLegacy< Traits_ > > Transformer
 
EventWatchdogAlg(const std::string &name, ISvcLocator *pSvcLocator)
 
GAUDI_API long pagedMemory(MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1)
Basic Process Information: Amount of paged memory currently occupied by the process 'pid'.
 
GAUDI_API long virtualMemory(MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1)
Basic Process Information: priority boost.