ATLAS Offline Software
Loading...
Searching...
No Matches
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
19namespace 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
62 std::uint64_t m_numExecute = 0;
63 std::uint64_t m_executeNext = 1;
64 std::uint64_t m_executeStep = 1;
65 std::uint64_t m_executeTarget = 30;
66
67 StatusCode printMemoryUsage (const std::string& location);
68 };
69 }
70}
71
72#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
a Module monitoring memory usage at various points during the job
std::optional< std::uint64_t > lastRSS
the last RSS value read
virtual StatusCode onInitialize(ModuleData &data) override
action just before algorithms are initialized
virtual StatusCode firstInitialize(ModuleData &data) override
action at the the very beginning of the worker job
virtual StatusCode onExecute(ModuleData &data) override
actions just before execute is called on algorithms
virtual StatusCode onFinalize(ModuleData &data) override
actions just before algorithms are finalized
virtual StatusCode postFirstEvent(ModuleData &data) override
action after processing first event
StatusCode printMemoryUsage(const std::string &location)
virtual StatusCode onWorkerEnd(ModuleData &data) override
action at the end of the worker job
the base class for EventLoop instrumentation module
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
the data the EventLoop core classes are sharing with the Module implementation
Definition ModuleData.h:64