ATLAS Offline Software
MemoryMonitorModule.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef EVENT_LOOP__MEMORY_MONITOR_MODULE_H
10 #define EVENT_LOOP__MEMORY_MONITOR_MODULE_H
11 
12 #include <EventLoop/Global.h>
13 
15 #include <EventLoop/Module.h>
16 #include <cstdint>
17 #include <optional>
18 
19 namespace EL
20 {
21  namespace Detail
22  {
34 
36  {
39  public:
40 
41  using Module::Module;
42 
43  virtual StatusCode firstInitialize (ModuleData& data) override;
44  virtual StatusCode onInitialize (ModuleData& data) override;
45  virtual StatusCode onExecute (ModuleData& data) override;
46  virtual StatusCode postFirstEvent (ModuleData& data) override;
47  virtual StatusCode onFinalize (ModuleData& data) override;
48  virtual StatusCode onWorkerEnd (ModuleData& data) override;
49 
54  std::optional<std::uint64_t> lastRSS;
55 
56 
57 
60  private:
61 
66 
67  StatusCode printMemoryUsage (const std::string& location);
68  };
69  }
70 }
71 
72 #endif
EL::Detail::MemoryMonitorModule::printMemoryUsage
StatusCode printMemoryUsage(const std::string &location)
Definition: MemoryMonitorModule.cxx:88
EL::Detail::MemoryMonitorModule
a Module monitoring memory usage at various points during the job
Definition: MemoryMonitorModule.h:36
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
EL::Detail::ModuleData
the data the EventLoop core classes are sharing with the Module implementation
Definition: ModuleData.h:64
EL::Detail::MemoryMonitorModule::m_executeStep
std::uint64_t m_executeStep
Definition: MemoryMonitorModule.h:64
Module.h
EL::Detail::ManagerStep::final
@ final
EL::Detail::MemoryMonitorModule::firstInitialize
virtual StatusCode firstInitialize(ModuleData &data) override
action at the the very beginning of the worker job
Definition: MemoryMonitorModule.cxx:27
EL::Detail::MemoryMonitorModule::m_executeNext
std::uint64_t m_executeNext
Definition: MemoryMonitorModule.h:63
EL::Detail::MemoryMonitorModule::m_executeTarget
std::uint64_t m_executeTarget
Definition: MemoryMonitorModule.h:65
AsgMessaging.h
EL::Detail::MemoryMonitorModule::m_numExecute
std::uint64_t m_numExecute
Definition: MemoryMonitorModule.h:62
EL::Detail::Module
the base class for EventLoop instrumentation module
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Module.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL::Detail::MemoryMonitorModule::onExecute
virtual StatusCode onExecute(ModuleData &data) override
actions just before execute is called on algorithms
Definition: MemoryMonitorModule.cxx:45
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::Detail::MemoryMonitorModule::postFirstEvent
virtual StatusCode postFirstEvent(ModuleData &data) override
action after processing first event
Definition: MemoryMonitorModule.cxx:61
EL::Detail::MemoryMonitorModule::onWorkerEnd
virtual StatusCode onWorkerEnd(ModuleData &data) override
action at the end of the worker job
Definition: MemoryMonitorModule.cxx:79
xAOD::DiTauJetParameters::Detail
Detail
Definition: DiTauDefs.h:38
EL::Detail::MemoryMonitorModule::onFinalize
virtual StatusCode onFinalize(ModuleData &data) override
actions just before algorithms are finalized
Definition: MemoryMonitorModule.cxx:70
EL::Detail::MemoryMonitorModule::lastRSS
std::optional< std::uint64_t > lastRSS
the last RSS value read
Definition: MemoryMonitorModule.h:54
EL::Detail::MemoryMonitorModule::onInitialize
virtual StatusCode onInitialize(ModuleData &data) override
action just before algorithms are initialized
Definition: MemoryMonitorModule.cxx:36
Global.h