Add to the transient store a tracker that detects events that are taking too long.
More...
Add to the transient store a tracker that detects events that are taking too long.
Definition at line 48 of file EventWatchdogAlg.cpp.
◆ EventWatchdogAlg()
| Gaudi::EventWatchdogAlg::EventWatchdogAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
|
inline |
◆ operator()()
Definition at line 56 of file EventWatchdogAlg.cpp.
57 using namespace std::chrono_literals;
61 const bool doStackTrace;
62 const bool abortOnTimeout;
63 const unsigned int timeout;
66 const std::vector<IScheduler*> schedulers;
70 const std::chrono::steady_clock::time_point eventStart{ std::chrono::steady_clock::now() };
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 ) {
98 std::raise( SIGQUIT );
104 const std::chrono::duration<float, std::chrono::seconds::period> duration =
105 std::chrono::steady_clock::now() - eventStart;
111 std::vector<IScheduler*> schedulers;
115 schedulers = svcLoc()->getServices() |
116 views::transform( [](
auto svc ) {
return Gaudi::Cast<IScheduler>( svc ); } ) |
117 views::remove(
nullptr ) | to<std::vector>();
◆ m_abortOnTimeout
Initial value:{ this, "AbortOnTimeout", false,
"If set to true, the application is killed when we reach the timeout." }
Definition at line 129 of file EventWatchdogAlg.cpp.
◆ m_eventTimeout
Initial value:{ this, "EventTimeout", 600,
"Number of seconds allowed to process a single event." }
Definition at line 127 of file EventWatchdogAlg.cpp.
◆ m_stackTrace
| Gaudi::Property<bool> Gaudi::EventWatchdogAlg::m_stackTrace { this, "StackTrace", false, "Whether to print the stack-trace on timeout." } |
|
private |
The documentation for this class was generated from the following file: