ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PerfMonMTSvc Class Reference

#include <PerfMonMTSvc.h>

Inheritance diagram for PerfMonMTSvc:
Collaboration diagram for PerfMonMTSvc:

Public Member Functions

 PerfMonMTSvc (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Gaudi Service constructor. More...
 
virtual ~PerfMonMTSvc ()=default
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface) override
 Function declaring the interface(s) implemented by the service. More...
 
virtual void handle (const Incident &incident) override
 Incident service handle for post-finalize. More...
 
virtual StatusCode initialize () override
 Standard Gaudi Service initialization. More...
 
virtual StatusCode finalize () override
 Standard Gaudi Service finalization. More...
 
virtual void startAud (const std::string &stepName, const std::string &compName) override
 Start Auditing. More...
 
virtual void stopAud (const std::string &stepName, const std::string &compName) override
 Stop Auditing. More...
 
void startSnapshotAud (const std::string &stepName, const std::string &compName)
 Snapshot Auditing: Take snapshots at the beginning and at the end of each step. More...
 
void stopSnapshotAud (const std::string &stepName, const std::string &compName)
 
void startCompAud (const std::string &stepName, const std::string &compName, const EventContext &ctx)
 Component Level Auditing: Take measurements at the beginning and at the end of each component call. More...
 
void stopCompAud (const std::string &stepName, const std::string &compName, const EventContext &ctx)
 
void report ()
 Report the results. More...
 
void report2Log ()
 Report to log. More...
 
void report2Log_Description () const
 
void report2Log_ComponentLevel ()
 
void report2Log_EventLevel_instant () const
 
void report2Log_EventLevel ()
 
void report2Log_Summary ()
 
void report2Log_CpuInfo () const
 
void report2Log_EnvInfo () const
 
void report2JsonFile ()
 Report to the JSON File. More...
 
void report2JsonFile_Summary (nlohmann::json &j) const
 
void report2JsonFile_ComponentLevel (nlohmann::json &j) const
 
void report2JsonFile_EventLevel (nlohmann::json &j) const
 
void aggregateSlotData ()
 A few helper functions. More...
 
void divideData2Steps ()
 
std::string scaleTime (double timeMeas) const
 
std::string scaleMem (int64_t memMeas) const
 
std::string get_info_from_file (const std::string &fileName, const std::string &fieldName) const
 A few helper methods to get system information These should be carried to PerfMonMTUtils at some point. More...
 
std::string get_cpu_model_info () const
 
int get_cpu_core_info () const
 
uint64_t get_memory_info () const
 
PMonMT::StepComp generate_state (const std::string &stepName, const std::string &compName) const
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Framework - Service InterfaceID. More...
 

Private Types

enum  Snapshots {
  CONFIGURE, INITIALIZE, FIRSTEVENT, EXECUTE,
  FINALIZE, NSNAPSHOTS
}
 
typedef std::map< PMonMT::StepComp, PMonMT::ComponentData * > data_map_t
 
typedef std::map< PMonMT::StepComp, std::unique_ptr< PMonMT::ComponentData > > data_map_unique_t
 

Private Member Functions

int getCpuEfficiency () const
 

Private Attributes

PMonMT::SnapshotMeasurement m_measurementSnapshots
 Measurement to capture snapshots. More...
 
PMonMT::SnapshotMeasurement m_measurementEvents
 Measurement to capture events. More...
 
Gaudi::Property< bool > m_doEventLoopMonitoring
 Do event loop monitoring. More...
 
Gaudi::Property< bool > m_doComponentLevelMonitoring
 Do component level monitoring. More...
 
Gaudi::Property< bool > m_reportResultsToJSON {this, "reportResultsToJSON", true, "Report results into the json file."}
 Report results to JSON. More...
 
Gaudi::Property< std::string > m_jsonFileName
 Name of the JSON file. More...
 
Gaudi::Property< bool > m_printDetailedTables
 Print detailed tables. More...
 
Gaudi::Property< uint64_t > m_memFitLowerLimit
 Lower limit (in number of events) for the memory fit. More...
 
Gaudi::Property< uint64_t > m_checkPointThreshold
 Frequency of event level monitoring. More...
 
Gaudi::Property< double > m_wallTimeOffset {this, "wallTimeOffset", 0, "Job start wall time in miliseconds."}
 Offset for the wall-time, comes from configuration. More...
 
Gaudi::Property< int > m_printNComps
 Print the top N components. More...
 
Gaudi::Property< int > m_numberOfThreads {this, "numberOfThreads", 1, "Number of threads in the job."}
 Get the number of threads. More...
 
Gaudi::Property< int > m_numberOfSlots {this, "numberOfSlots", 1, "Number of slots in the job."}
 Get the number of slots. More...
 
Gaudi::Property< uint64_t > m_eventLoopMsgLimit {this, "eventLoopMsgLimit", 10, "Maximum number of event-level messages."}
 Set the number of messages for the event-level report. More...
 
const std::set< std::string > m_exclusionSet
 Exclude some common components from monitoring In the future this might be converted to a inclusion set which would allow user to monitor only a set of algorithms... More...
 
int m_motherPID
 Snapshots data. More...
 
std::vector< PMonMT::SnapshotDatam_snapshotData
 
std::vector< std::string > m_snapshotStepNames = {"Configure", "Initialize", "FirstEvent", "Execute", "Finalize"}
 
PMonMT::EventLevelData m_eventLevelData {}
 
std::mutex m_mutex_capture
 
std::atomic< bool > m_isFirstEvent
 
std::atomic< uint64_t > m_eventCounter
 
std::atomic< uint64_t > m_eventLoopMsgCounter
 
std::atomic< double > m_checkPointTime
 
std::atomic< bool > m_isEvtLoopStopped
 
data_map_t m_compLevelDataMap
 
std::vector< data_map_unique_tm_compLevelDataMapVec
 
data_map_t m_compLevelDataMap_ini
 
data_map_t m_compLevelDataMap_1stevt
 
data_map_t m_compLevelDataMap_evt
 
data_map_t m_compLevelDataMap_fin
 
data_map_t m_compLevelDataMap_plp
 
data_map_t m_compLevelDataMap_cbk
 
std::vector< data_map_tm_stdoutVec_serial
 
PerfMon::LinFitSglPass m_fit_vmem
 
PerfMon::LinFitSglPass m_fit_pss
 

Detailed Description

Definition at line 41 of file PerfMonMTSvc.h.

Member Typedef Documentation

◆ data_map_t

Definition at line 192 of file PerfMonMTSvc.h.

◆ data_map_unique_t

typedef std::map<PMonMT::StepComp, std::unique_ptr<PMonMT::ComponentData> > PerfMonMTSvc::data_map_unique_t
private

Definition at line 193 of file PerfMonMTSvc.h.

Member Enumeration Documentation

◆ Snapshots

Enumerator
CONFIGURE 
INITIALIZE 
FIRSTEVENT 
EXECUTE 
FINALIZE 
NSNAPSHOTS 

Definition at line 166 of file PerfMonMTSvc.h.

Constructor & Destructor Documentation

◆ PerfMonMTSvc()

PerfMonMTSvc::PerfMonMTSvc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Standard Gaudi Service constructor.

Definition at line 37 of file PerfMonMTSvc.cxx.

39  // Five main snapshots : Configure, Initialize, FirstEvent, Execute, and Finalize
40  m_motherPID = getpid();
41  m_snapshotData.resize(NSNAPSHOTS); // Default construct
42 
43  // Initial capture upon construction
47 }

◆ ~PerfMonMTSvc()

virtual PerfMonMTSvc::~PerfMonMTSvc ( )
virtualdefault

Member Function Documentation

◆ aggregateSlotData()

void PerfMonMTSvc::aggregateSlotData ( )

A few helper functions.

Definition at line 812 of file PerfMonMTSvc.cxx.

812  {
813  // Loop over data from all slots
814  for (const auto& slotData : m_compLevelDataMapVec) {
815  for (const auto& it : slotData) {
816  // Copy the first slot data and sum the rest
817  if(m_compLevelDataMap.find(it.first) == m_compLevelDataMap.end()) {
818  m_compLevelDataMap.insert({it.first, it.second.get()});
819  } else {
820  m_compLevelDataMap[it.first]->add2CallCount(it.second->getCallCount());
821  m_compLevelDataMap[it.first]->add2DeltaCPU(it.second->getDeltaCPU());
822  m_compLevelDataMap[it.first]->add2DeltaWall(it.second->getDeltaWall());
823  m_compLevelDataMap[it.first]->add2DeltaVmem(it.second->getDeltaVmem());
824  m_compLevelDataMap[it.first]->add2DeltaMalloc(it.second->getDeltaMalloc());
825  }
826  // Do a quick consistency check here and print any suspicious measurements.
827  // Timing measurements should always be positive definite
828  if(it.second->getDeltaCPU() < 0) {
829  ATH_MSG_WARNING("Negative CPU-time measurement of " << it.second->getDeltaCPU() <<
830  " ms for component " << it.first.compName <<
831  " in step " << it.first.stepName);
832  }
833  if(it.second->getDeltaWall() < 0) {
834  ATH_MSG_WARNING("Negative Wall-time measurement of " << it.second->getDeltaWall() <<
835  " ms for component " << it.first.compName <<
836  " in step " << it.first.stepName);
837  }
838  }
839  }
840 }

◆ divideData2Steps()

void PerfMonMTSvc::divideData2Steps ( )

Definition at line 845 of file PerfMonMTSvc.cxx.

845  {
846  for (const auto &it : m_compLevelDataMap) {
847  if (it.first.stepName == "Initialize")
848  m_compLevelDataMap_ini[it.first] = it.second;
849  else if (it.first.stepName == "FirstEvent")
850  m_compLevelDataMap_1stevt[it.first] = it.second;
851  else if (it.first.stepName == "Execute")
852  m_compLevelDataMap_evt[it.first] = it.second;
853  else if (it.first.stepName == "Finalize")
854  m_compLevelDataMap_fin[it.first] = it.second;
855  else if (it.first.stepName == "preLoadProxy")
856  m_compLevelDataMap_plp[it.first] = it.second;
857  else if (it.first.stepName == "Callback")
858  m_compLevelDataMap_cbk[it.first] = it.second;
859  }
866 }

◆ finalize()

StatusCode PerfMonMTSvc::finalize ( )
overridevirtual

Standard Gaudi Service finalization.

Definition at line 116 of file PerfMonMTSvc.cxx.

116  {
117  // Print where we are
118  ATH_MSG_INFO("Finalizing " << name());
119 
120  return StatusCode::SUCCESS;
121 }

◆ generate_state()

PMonMT::StepComp PerfMonMTSvc::generate_state ( const std::string &  stepName,
const std::string &  compName 
) const

Definition at line 802 of file PerfMonMTSvc.cxx.

802  {
803  PMonMT::StepComp currentState;
804  currentState.stepName = (m_isFirstEvent && stepName == "Execute") ? "FirstEvent" : stepName;
805  currentState.compName = compName;
806  return currentState;
807 }

◆ get_cpu_core_info()

int PerfMonMTSvc::get_cpu_core_info ( ) const

Definition at line 955 of file PerfMonMTSvc.cxx.

955  {
956  std::string val = get_info_from_file("/proc/cpuinfo","processor");
957  if (val.empty()) return 0;
958  return std::stoi(val) + 1;
959 }

◆ get_cpu_model_info()

std::string PerfMonMTSvc::get_cpu_model_info ( ) const

Definition at line 950 of file PerfMonMTSvc.cxx.

950  {
951  return get_info_from_file("/proc/cpuinfo","model name") +
952  get_info_from_file("/proc/cpuinfo","cache size");
953 }

◆ get_info_from_file()

std::string PerfMonMTSvc::get_info_from_file ( const std::string &  fileName,
const std::string &  fieldName 
) const

A few helper methods to get system information These should be carried to PerfMonMTUtils at some point.

Definition at line 922 of file PerfMonMTSvc.cxx.

923  {
924  // Helper function to read files of type Key : Value
925  // Returns the last instance if there are multiple matches
926  // This is because we use this method to get the processor count
927  std::string result{""};
928 
929  std::ifstream file{fileName};
930  std::string line{""};
931 
932  while (std::getline(file, line)) {
933  if (line.empty()) continue;
934  size_t splitIdx = line.find(':');
935  if (splitIdx != std::string::npos) {
936  std::string val = line.substr(splitIdx + 1);
937  if (val.empty()) continue;
938  if (line.size() >= fieldName.size() &&
939  line.compare(0, fieldName.size(), fieldName) == 0) {
940  result = val;
941  }
942  }
943  }
944 
945  file.close();
946 
947  return result;
948 }

◆ get_memory_info()

uint64_t PerfMonMTSvc::get_memory_info ( ) const

Definition at line 961 of file PerfMonMTSvc.cxx.

961  {
962  std::string val = get_info_from_file("/proc/meminfo","MemTotal");
963  if (val.empty()) return 0;
964  val.resize(val.size() - 3); // strip the trailing kB
965  return std::stoull(val);
966 }

◆ getCpuEfficiency()

int PerfMonMTSvc::getCpuEfficiency ( ) const
private

Definition at line 374 of file PerfMonMTSvc.cxx.

374  {
375 
376  // In AthenaMT only the event-loop is executed concurrently
377  // In this metric, we scale the event-loop wall-time by
378  // the number of slots to take the concurrency into account
379  // Then we divide the total cpu-time by this number
380  // It's A metric not THE metric...
381 
382  const double totalCpuTime =
383  m_snapshotData[CONFIGURE].getDeltaCPU() +
384  m_snapshotData[INITIALIZE].getDeltaCPU() +
385  m_snapshotData[FIRSTEVENT].getDeltaCPU() +
386  m_snapshotData[EXECUTE].getDeltaCPU() +
387  m_snapshotData[FINALIZE].getDeltaCPU();
388 
389  const double scaledWallTime =
390  m_snapshotData[CONFIGURE].getDeltaWall() * 1. +
391  m_snapshotData[INITIALIZE].getDeltaWall() * 1. +
392  m_snapshotData[FIRSTEVENT].getDeltaWall() * 1. +
393  m_snapshotData[EXECUTE].getDeltaWall() * m_numberOfSlots +
394  m_snapshotData[FINALIZE].getDeltaWall() * 1.;
395 
396  return ( scaledWallTime > 0 ? totalCpuTime / scaledWallTime * 100. : 0 );
397 
398 }

◆ handle()

void PerfMonMTSvc::handle ( const Incident &  incident)
overridevirtual

Incident service handle for post-finalize.

Definition at line 126 of file PerfMonMTSvc.cxx.

126  {
127  // Begin event processing
128  if (inc.type() == IncidentType::BeginEvent) {
129  // Lock for data integrity
130  std::lock_guard<std::mutex> lock(m_mutex_capture);
131 
132  // Increment the internal counter
133  m_eventCounter++;
134 
135  // Get current time in seconds
136  double currentTime = PMonMT::get_wall_time()*0.001;
137 
138  // Monitor
140  // Overwrite the last measurement time
141  m_checkPointTime = currentTime;
142 
143  // Capture
146  // Report instantly - no more than m_eventLoopMsgLimit times
150  }
151  }
152  }
153  // End event processing (as signaled by SG clean-up)
154  // By convention the first event is executed serially
155  // Therefore, we treat it a little bit differently
156  else if (m_eventCounter == 1 && inc.type() == "EndAlgorithms") {
157  // In AthenaMP w/ fork-after-initialize, the loop starts
158  // in the mother process but the first event is actually
159  // executed in the worker. Here, we try to work around this
160  // by resetting the first event measurement if we think
161  // we're in AthenaMP. This is not an ideal approach but
162  // gets the job done for the fork-after-initialize case.
163  if (m_motherPID != getpid()) {
164  m_snapshotData[FIRSTEVENT].m_tmp_cpu = 0;
165  m_snapshotData[FIRSTEVENT].m_memMonTmpMap["vmem"] = 0;
166  m_snapshotData[FIRSTEVENT].m_memMonTmpMap["pss"] = 0;
167  m_snapshotData[FIRSTEVENT].m_memMonTmpMap["rss"] = 0;
168  m_snapshotData[FIRSTEVENT].m_memMonTmpMap["swap"] = 0;
169  }
173  // Normally this flag is set in stopCompAud but we don't
174  // go in there unless m_doComponentLevelMonitoring is true.
175  // If it's false, we toggle it here but
176  // this is mostly for completeness since in that mode
177  // this flag is not really used at the moment.
179  m_isFirstEvent = false;
180  }
181  }
182  // This incident is fired by only some loop managers to signal the end of event processing
183  else if (inc.type() == "EndEvtLoop") {
184  m_isEvtLoopStopped = true;
187  }
188  // Finalize ourself and print the metrics in SvcPostFinalize
189  else if (inc.type() == IncidentType::SvcPostFinalize) {
190  // Final capture upon post-finalization
193 
194  // Report everything
195  report();
196  }
197  return;
198 }

◆ initialize()

StatusCode PerfMonMTSvc::initialize ( )
overridevirtual

Standard Gaudi Service initialization.

Configure the auditor

Definition at line 68 of file PerfMonMTSvc.cxx.

68  {
69  // Print where we are
70  ATH_MSG_INFO("Initializing " << name());
71 
72  // Set to be listener to SvcPostFinalize
73  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc/IncidentSvc", name());
74  ATH_CHECK(incSvc.retrieve());
75  const long highestPriority = static_cast<long>(-1);
76  const long lowestPriority = 0;
77  incSvc->addListener(this, IncidentType::BeginEvent, highestPriority);
78  incSvc->addListener(this, "EndAlgorithms", lowestPriority);
79  incSvc->addListener(this, "EndEvtLoop", highestPriority);
80  incSvc->addListener(this, IncidentType::SvcPostFinalize);
81 
82  // Check if /proc exists, if not memory statistics are not available
83  const bool procExists = PMonMT::doesDirectoryExist("/proc");
84  if(!procExists) {
85  ATH_MSG_INFO("The system doesn't support /proc. Therefore, memory measurements are not available");
86  }
87 
88  // Print some information minimal information about our configuration
89  ATH_MSG_INFO("Service is configured for [" << m_numberOfThreads.toString() << "] threads " <<
90  "analyzing [" << m_numberOfSlots.toString() << "] events concurrently");
91  ATH_MSG_INFO("Component-level measurements are [" << (m_doComponentLevelMonitoring ? "Enabled" : "Disabled") << "]");
93  ATH_MSG_INFO(" >> Component-level memory monitoring in the event-loop is disabled in jobs with more than 1 thread");
94  }
95 
96  // Thread specific component-level data map
97  m_compLevelDataMapVec.resize(m_numberOfThreads+1); // Default construct
98 
99  // Set wall time offset
101  if (m_wallTimeOffset > 0) {
102  m_snapshotData[CONFIGURE].add2DeltaWall(-m_wallTimeOffset);
103  }
104 
106  if (!PerfMon::makeAuditor("PerfMonMTAuditor", auditorSvc(), msg()).isSuccess()) {
107  ATH_MSG_ERROR("Could not register auditor [PerfMonMTAuditor]!");
108  return StatusCode::FAILURE;
109  }
110  return StatusCode::SUCCESS;
111 }

◆ interfaceID()

const InterfaceID & IPerfMonMTSvc::interfaceID ( )
inlinestaticinherited

Framework - Service InterfaceID.

Definition at line 37 of file IPerfMonMTSvc.h.

38 {
39  static const InterfaceID IID_IPerfMonMTSvc("IPerfMonMTSvc", 1, 0);
40  return IID_IPerfMonMTSvc;
41 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ queryInterface()

StatusCode PerfMonMTSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
overridevirtual

Function declaring the interface(s) implemented by the service.

Definition at line 52 of file PerfMonMTSvc.cxx.

52  {
53  if (!ppvInterface) {
54  return StatusCode::FAILURE;
55  }
56 
57  if (riid == IPerfMonMTSvc::interfaceID()) {
58  *ppvInterface = static_cast<IPerfMonMTSvc*>(this);
59  return StatusCode::SUCCESS;
60  }
61 
62  return AthService::queryInterface(riid, ppvInterface);
63 }

◆ report()

void PerfMonMTSvc::report ( )

Report the results.

Definition at line 403 of file PerfMonMTSvc.cxx.

403  {
404  // Write into log file
405  report2Log();
406 
407  // Write into JSON
408  if (m_reportResultsToJSON) {
409  report2JsonFile();
410  }
411 }

◆ report2JsonFile()

void PerfMonMTSvc::report2JsonFile ( )

Report to the JSON File.

Definition at line 643 of file PerfMonMTSvc.cxx.

643  {
644  nlohmann::json j;
645 
646  // CPU and Wall-time
647  report2JsonFile_Summary(j); // Snapshots
648 
649  // Memory
651  report2JsonFile_ComponentLevel(j); // Component-level
652  }
654  report2JsonFile_EventLevel(j); // Event-level
655  }
656 
657  // Write and close the JSON file
658  std::ofstream o(m_jsonFileName);
659  o << std::setw(4) << j << std::endl;
660  o.close();
661 
662  // Compress the JSON file into tar.gz
663  auto cmd = "tar -czf " + m_jsonFileName + ".tar.gz " + m_jsonFileName + ";";
664  int rc = std::system(cmd.c_str());
665  if(rc!=0) {
666  ATH_MSG_WARNING("Couldn't compress the JSON file...");
667  return;
668  }
669 
670  // Remove the uncompressed JSON file to save disk-space
671  rc = std::remove(m_jsonFileName.toString().c_str());
672  if(rc!=0) {
673  ATH_MSG_WARNING("Couldn't remove the uncompressed JSON file...");
674  return;
675  }
676 }

◆ report2JsonFile_ComponentLevel()

void PerfMonMTSvc::report2JsonFile_ComponentLevel ( nlohmann::json j) const

Definition at line 751 of file PerfMonMTSvc.cxx.

751  {
752 
753  for (const auto& dataMapPerStep : m_stdoutVec_serial) {
754 
755  for(const auto& meas : dataMapPerStep){
756 
757  const std::string step = meas.first.stepName;
758  const std::string component = meas.first.compName;
759  const uint64_t count = meas.second->getCallCount();
760  const double cpuTime = meas.second->getDeltaCPU();
761  const double wallTime = meas.second->getDeltaWall();
762  const int64_t vmem = meas.second->getDeltaVmem();
763  const int64_t mall = meas.second->getDeltaMalloc();
764 
765  j["componentLevel"][step][component] = {{"count", count},
766  {"cpuTime", cpuTime},
767  {"wallTime", wallTime},
768  {"vmem", vmem},
769  {"malloc", mall}};
770  }
771 
772  }
773 
774 }

◆ report2JsonFile_EventLevel()

void PerfMonMTSvc::report2JsonFile_EventLevel ( nlohmann::json j) const

Definition at line 776 of file PerfMonMTSvc.cxx.

776  {
777 
778  for (const auto& it : m_eventLevelData.getEventLevelData()) {
779 
780  const uint64_t event = it.first;
781  const double cpuTime = it.second.cpu_time;
782  const double wallTime = it.second.wall_time;
783  const int64_t vmem = it.second.mem_stats.at("vmem");
784  const int64_t rss = it.second.mem_stats.at("rss");
785  const int64_t pss = it.second.mem_stats.at("pss");
786  const int64_t swap = it.second.mem_stats.at("swap");
787 
788  j["eventLevel"][std::to_string(event)] = {{"cpuTime", cpuTime},
789  {"wallTime", wallTime},
790  {"vmem", vmem},
791  {"rss", rss},
792  {"pss", pss},
793  {"swap", swap}};
794 
795 
796  }
797 }

◆ report2JsonFile_Summary()

void PerfMonMTSvc::report2JsonFile_Summary ( nlohmann::json j) const

Definition at line 681 of file PerfMonMTSvc.cxx.

681  {
682 
683  // Report snapshot level results
684  for(int i=0; i < NSNAPSHOTS; i++){
685 
686  const std::string step = m_snapshotStepNames[i];
687  const double dCPU = m_snapshotData[i].getDeltaCPU();
688  const double dWall = m_snapshotData[i].getDeltaWall();
689  const double cpuUtil = dCPU / dWall;
690  const int64_t dVmem = m_snapshotData[i].getMemMonDeltaMap("vmem");
691  const int64_t dRss = m_snapshotData[i].getMemMonDeltaMap("rss");
692  const int64_t dPss = m_snapshotData[i].getMemMonDeltaMap("pss");
693  const int64_t dSwap = m_snapshotData[i].getMemMonDeltaMap("swap");
694 
695  j["summary"]["snapshotLevel"][step] = {{"dCPU", dCPU},
696  {"dWall", dWall},
697  {"cpuUtil", cpuUtil},
698  {"dVmem", dVmem},
699  {"dRss", dRss},
700  {"dPss", dPss},
701  {"dSwap", dSwap}};
702 
703  }
704 
705  // Report the total number of events
706  const int64_t nEvents = m_eventCounter;
707  j["summary"]["nEvents"] = nEvents;
708 
709  // Report Peaks
710  const int64_t vmemPeak = m_eventLevelData.getEventLevelMemoryMax("vmem");
711  const int64_t rssPeak = m_eventLevelData.getEventLevelMemoryMax("rss");
712  const int64_t pssPeak = m_eventLevelData.getEventLevelMemoryMax("pss");
713  const int64_t swapPeak = m_eventLevelData.getEventLevelMemoryMax("swap");
714 
715  j["summary"]["peaks"] = {{"vmemPeak", vmemPeak},
716  {"rssPeak", rssPeak},
717  {"pssPeak", pssPeak},
718  {"swapPeak", swapPeak}};
719 
720  // Report leak estimates
721  const int64_t vmemLeak = m_fit_vmem.slope();
722  const int64_t pssLeak = m_fit_pss.slope();
723  const int64_t nPoints = m_fit_vmem.nPoints();
724 
725  j["summary"]["leakEstimates"] = {{"vmemLeak", vmemLeak},
726  {"pssLeak", pssLeak},
727  {"nPoints", nPoints}};
728 
729  // Report Sys info
730  const std::string cpuModel = get_cpu_model_info();
731  const int coreNum = get_cpu_core_info();
732  const int64_t totMem = get_memory_info();
733 
734  j["summary"]["sysInfo"] = {{"cpuModel", cpuModel},
735  {"coreNum", coreNum},
736  {"totMem", totMem}};
737 
738  // Report Enviroment info
739  const std::string mallocLib = std::filesystem::path(PMonSD::symb2lib("malloc")).filename().string();
740  const std::string mathLib = std::filesystem::path(PMonSD::symb2lib("atan2")).filename().string();
741 
742  j["summary"]["envInfo"] = {{"mallocLib", mallocLib},
743  {"mathLib", mathLib}};
744 
745  // Report CPU utilization efficiency;
746  const int cpuUtilEff = getCpuEfficiency();
747  j["summary"]["misc"] = {{"cpuUtilEff", cpuUtilEff}};
748 
749 }

◆ report2Log()

void PerfMonMTSvc::report2Log ( )

Report to log.

Definition at line 416 of file PerfMonMTSvc.cxx.

416  {
417  // Header
419 
420  // Component-level
423  }
424 
425  // Event-level
428  }
429 
430  // Summary and system information
434 }

◆ report2Log_ComponentLevel()

void PerfMonMTSvc::report2Log_ComponentLevel ( )

Definition at line 456 of file PerfMonMTSvc.cxx.

456  {
457  using boost::format;
458 
459  ATH_MSG_INFO("=======================================================================================");
460  ATH_MSG_INFO(" Component Level Monitoring ");
461  ATH_MSG_INFO("=======================================================================================");
462 
463  ATH_MSG_INFO(format("%1% %|15t|%2% %|25t|%3% %|40t|%4% %|55t|%5% %|75t|%6%") % "Step" % "Count" % "CPU Time [ms]" %
464  "Vmem [kB]" % "Malloc [kB]" % "Component");
465 
466  ATH_MSG_INFO("---------------------------------------------------------------------------------------");
467 
468  aggregateSlotData(); // aggregate data from slots
469  divideData2Steps(); // divive data into steps for ordered printing
470 
471  for (auto vec_itr : m_stdoutVec_serial) {
472  // Sort the results by CPU time for the time being
473  std::vector<std::pair<PMonMT::StepComp, PMonMT::ComponentData*>> pairs;
474  for (auto itr = vec_itr.begin(); itr != vec_itr.end(); ++itr) pairs.push_back(*itr);
475 
476  sort(pairs.begin(), pairs.end(),
477  [=](std::pair<PMonMT::StepComp, PMonMT::ComponentData*>& a,
478  std::pair<PMonMT::StepComp, PMonMT::ComponentData*>& b) {
479  return a.second->getDeltaCPU() > b.second->getDeltaCPU();
480  });
481 
482  int counter = 0;
483  for (auto it : pairs) {
484  // Only write out a certian number of components
485  if (counter >= m_printNComps) {
486  break;
487  }
488  counter++;
489 
490  ATH_MSG_INFO(format("%1% %|15t|%2% %|25t|%3$.2f %|40t|%4$.0f %|55t|%5$.0f %|75t|%6%") % it.first.stepName %
491  it.second->getCallCount() % it.second->getDeltaCPU() % it.second->getDeltaVmem() %
492  it.second->getDeltaMalloc() % it.first.compName);
493  }
494  if(counter>0) {
495  ATH_MSG_INFO("=======================================================================================");
496  }
497  }
498 }

◆ report2Log_CpuInfo()

void PerfMonMTSvc::report2Log_CpuInfo ( ) const

Definition at line 610 of file PerfMonMTSvc.cxx.

610  {
611  using boost::format;
612 
613  ATH_MSG_INFO(" System Information ");
614  ATH_MSG_INFO("=======================================================================================");
615 
616  ATH_MSG_INFO(format("%1% %|34t|%2% ") % "CPU Model:" % get_cpu_model_info());
617  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Number of Available Cores:" % get_cpu_core_info());
618  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Total Memory:" % scaleMem(get_memory_info()));
619 
620  ATH_MSG_INFO("=======================================================================================");
621 }

◆ report2Log_Description()

void PerfMonMTSvc::report2Log_Description ( ) const

Definition at line 439 of file PerfMonMTSvc.cxx.

439  {
440  ATH_MSG_INFO("=======================================================================================");
441  ATH_MSG_INFO(" PerfMonMTSvc Report ");
442  ATH_MSG_INFO("=======================================================================================");
443  if (m_reportResultsToJSON) {
444  ATH_MSG_INFO("*** Full set of information can also be found in: " << m_jsonFileName.toString());
445  ATH_MSG_INFO("*** In order to make plots using the results run the following commands:");
446  ATH_MSG_INFO("*** $ perfmonmt-plotter.py -i " << m_jsonFileName.toString());
447  ATH_MSG_INFO("*** In order to print tables using the results run the following commands:");
448  ATH_MSG_INFO("*** $ perfmonmt-printer.py -i " << m_jsonFileName.toString());
449  ATH_MSG_INFO("=======================================================================================");
450  }
451 }

◆ report2Log_EnvInfo()

void PerfMonMTSvc::report2Log_EnvInfo ( ) const

Definition at line 626 of file PerfMonMTSvc.cxx.

626  {
627  using boost::format;
628  using std::filesystem::path;
629 
630  ATH_MSG_INFO(" Environment Information ");
631  ATH_MSG_INFO("=======================================================================================");
632 
633  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Malloc Library:" % path(PMonSD::symb2lib("malloc")).filename().string());
634  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Math Library:" % path(PMonSD::symb2lib("atan2")).filename().string());
635 
636  ATH_MSG_INFO("=======================================================================================");
637 
638 }

◆ report2Log_EventLevel()

void PerfMonMTSvc::report2Log_EventLevel ( )

Definition at line 520 of file PerfMonMTSvc.cxx.

520  {
521  using boost::format;
522 
523  ATH_MSG_INFO(" Event Level Monitoring ");
524  ATH_MSG_INFO(" (Only the first " << m_eventLoopMsgLimit.toString() <<
525  " and the last measurements are explicitly printed)");
526  ATH_MSG_INFO("=======================================================================================");
527 
528  ATH_MSG_INFO(format("%1% %|16t|%2% %|28t|%3% %|40t|%4% %|52t|%5% %|64t|%6% %|76t|%7%") % "Event" % "CPU [s]" %
529  "Wall [s]" % "Vmem [kB]" % "Rss [kB]" % "Pss [kB]" % "Swap [kB]");
530 
531  ATH_MSG_INFO("---------------------------------------------------------------------------------------");
532 
533  m_eventLoopMsgCounter = 0; // reset counter
534  uint64_t nMeasurements = m_eventLevelData.getNMeasurements();
535 
536  for (const auto& it : m_eventLevelData.getEventLevelData()) {
537  // Print
538  if(m_eventLoopMsgCounter < m_eventLoopMsgLimit || m_eventLoopMsgCounter == nMeasurements - 1) {
540  ATH_MSG_INFO(format("%|=87|") % "...");
541  }
542  ATH_MSG_INFO(format("%1% %|16t|%2$.2f %|28t|%3$.2f %|40t|%4% %|52t|%5% %|64t|%6% %|76t|%7%") % it.first %
543  (it.second.cpu_time * 0.001) % (it.second.wall_time * 0.001) % it.second.mem_stats.at("vmem") %
544  it.second.mem_stats.at("rss") % it.second.mem_stats.at("pss") % it.second.mem_stats.at("swap"));
545  }
547  // Add to leak estimate
548  if (it.first >= m_memFitLowerLimit) {
549  m_fit_vmem.addPoint(it.first, it.second.mem_stats.at("vmem"));
550  m_fit_pss.addPoint(it.first, it.second.mem_stats.at("pss"));
551  }
552  }
553  ATH_MSG_INFO("=======================================================================================");
554 }

◆ report2Log_EventLevel_instant()

void PerfMonMTSvc::report2Log_EventLevel_instant ( ) const

Definition at line 503 of file PerfMonMTSvc.cxx.

503  {
506 
507  int64_t vmem = m_eventLevelData.getEventLevelMemory(m_eventCounter, "vmem");
511 
512  ATH_MSG_INFO("Event [" << std::setw(5) << m_eventCounter << "] CPU Time: " << scaleTime(cpu_time) <<
513  ", Wall Time: " << scaleTime(wall_time) << ", Vmem: " << scaleMem(vmem) <<
514  ", Rss: " << scaleMem(rss) << ", Pss: " << scaleMem(pss) << ", Swap: " << scaleMem(swap));
515 }

◆ report2Log_Summary()

void PerfMonMTSvc::report2Log_Summary ( )

Definition at line 559 of file PerfMonMTSvc.cxx.

559  {
560  using boost::format;
561 
562  ATH_MSG_INFO(" Snapshots Summary ");
563  ATH_MSG_INFO("=======================================================================================");
564 
565  ATH_MSG_INFO(format("%1% %|13t|%2% %|25t|%3% %|37t|%4% %|44t|%5% %|55t|%6% %|66t|%7% %|77t|%8%") % "Step" %
566  "dCPU [s]" % "dWall [s]" % "<CPU>" % "dVmem [kB]" % "dRss [kB]" % "dPss [kB]" % "dSwap [kB]");
567 
568  ATH_MSG_INFO("---------------------------------------------------------------------------------------");
569 
570  for (unsigned int idx = 0; idx < NSNAPSHOTS; idx++) {
571  ATH_MSG_INFO(format("%1% %|13t|%2% %|25t|%3% %|37t|%4$.2f %|44t|%5% %|55t|%6% %|66t|%7% %|77t|%8%") %
572  m_snapshotStepNames[idx] % (m_snapshotData[idx].getDeltaCPU() * 0.001) %
573  (m_snapshotData[idx].getDeltaWall() * 0.001) %
574  (m_snapshotData[idx].getDeltaCPU() / m_snapshotData[idx].getDeltaWall()) %
575  m_snapshotData[idx].getMemMonDeltaMap("vmem") % m_snapshotData[idx].getMemMonDeltaMap("rss") %
576  m_snapshotData[idx].getMemMonDeltaMap("pss") % m_snapshotData[idx].getMemMonDeltaMap("swap"));
577  }
578 
579  ATH_MSG_INFO("***************************************************************************************");
580  const double cpu_exec_total = m_snapshotData[FIRSTEVENT].getDeltaCPU() + m_snapshotData[EXECUTE].getDeltaCPU();
581  const double wall_exec_total = m_snapshotData[FIRSTEVENT].getDeltaWall() + m_snapshotData[EXECUTE].getDeltaWall();
582 
583  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Number of events processed:" % m_eventCounter);
584  ATH_MSG_INFO(format("%1% %|35t|%2$.0f ") % "CPU usage per event [ms]:" %
585  (m_eventCounter > 0 ? cpu_exec_total / m_eventCounter : 0));
586  ATH_MSG_INFO(format("%1% %|35t|%2$.3f ") % "Events per second:" %
587  (wall_exec_total > 0 ? m_eventCounter / wall_exec_total * 1000. : 0));
588  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "CPU utilization efficiency [%]:" % getCpuEfficiency());
589 
591  ATH_MSG_INFO("***************************************************************************************");
592  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Max Vmem: " % scaleMem(m_eventLevelData.getEventLevelMemoryMax("vmem")));
593  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Max Rss: " % scaleMem(m_eventLevelData.getEventLevelMemoryMax("rss")));
594  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Max Pss: " % scaleMem(m_eventLevelData.getEventLevelMemoryMax("pss")));
595  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Max Swap: " % scaleMem(m_eventLevelData.getEventLevelMemoryMax("swap")));
596  ATH_MSG_INFO("***************************************************************************************");
597  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Leak estimate per event Vmem: " % scaleMem(m_fit_vmem.slope()));
598  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Leak estimate per event Pss: " % scaleMem(m_fit_pss.slope()));
599  ATH_MSG_INFO(" >> Estimated using the last " << m_fit_vmem.nPoints()
600  << " measurements from the Event Level Monitoring");
601  ATH_MSG_INFO(" >> Events prior to the first " << m_memFitLowerLimit.toString() << " are omitted...");
602  }
603 
604  ATH_MSG_INFO("=======================================================================================");
605 }

◆ scaleMem()

std::string PerfMonMTSvc::scaleMem ( int64_t  memMeas) const

Definition at line 892 of file PerfMonMTSvc.cxx.

892  {
893 
894  // Check if there is anything to be done
895  if (memMeas == 0) {
896  return "0.00 KB" ;
897  }
898 
899  // Prepare for the result
900  std::ostringstream ss;
901  ss << std::fixed;
902  ss << std::setprecision(2);
903 
904  // The input is in KB
905  std::vector<std::string> significance = {"KB", "MB", "GB", "TB"};
906 
907  // Get the absolute value
908  int64_t absMemMeas = std::abs(memMeas);
909  // Find the order, note that this is an int operation
910  int64_t order = std::log(absMemMeas)/std::log(1024);
911  // Compute the final value preserving the sign
912  double value = memMeas/std::pow(1024, order);
913  // Convert the result to a string
914  ss << value;
915 
916  return ss.str() + " " + significance[order];
917 }

◆ scaleTime()

std::string PerfMonMTSvc::scaleTime ( double  timeMeas) const

Definition at line 868 of file PerfMonMTSvc.cxx.

868  {
869  // Not a huge fan of this, we should eventually unify the types
870  // Just want to be explicit about what's happening
871  auto ms = static_cast<int64_t>(timeMeas);
872 
873  // Compute hrs and offset
874  auto hrs = ms / 3600000;
875  ms -= hrs * 3600000;
876  // Compute mins and offset
877  auto mins = ms / 60000;
878  ms -= mins * 60000;
879  // Compute secs and offset
880  auto secs = ms / 1000;
881  ms -= secs * 1000;
882 
883  // Primarily care about H:M:S
884  std::stringstream ss;
885  ss.fill('0');
886  ss << std::setw(2) << hrs << "h" <<
887  std::setw(2) << mins << "m" <<
888  std::setw(2) << secs << "s";
889  return ss.str();
890 }

◆ startAud()

void PerfMonMTSvc::startAud ( const std::string &  stepName,
const std::string &  compName 
)
overridevirtual

Start Auditing.

Implements IPerfMonMTSvc.

Definition at line 202 of file PerfMonMTSvc.cxx.

202  {
203  // Snapshots, i.e. Initialize, Event Loop, etc.
204  startSnapshotAud(stepName, compName);
205 
206  /*
207  * Perform component monitoring only if the user asked for it.
208  * By default we don't monitor a set of common components.
209  * Once we adopt C++20, we can switch this from count to contains.
210  */
212  // Start component auditing
213  auto const &ctx = Gaudi::Hive::currentContext();
214  startCompAud(stepName, compName, ctx);
215  }
216 }

◆ startCompAud()

void PerfMonMTSvc::startCompAud ( const std::string &  stepName,
const std::string &  compName,
const EventContext &  ctx 
)

Component Level Auditing: Take measurements at the beginning and at the end of each component call.

Definition at line 273 of file PerfMonMTSvc.cxx.

273  {
274  // Get the thread index
275  const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
276 
277  // Memory measurement is only done outside the loop except when there is only a single thread
278  const bool doMem = !ctx.valid() || (m_numberOfThreads == 1);
279 
280  // Generate State
281  PMonMT::StepComp currentState = generate_state(stepName, compName);
282 
283  // Check if this is the first time calling if so create the mesurement data if not use the existing one.
284  // Metrics are collected per thread then aggregated before reporting
285  data_map_unique_t& compLevelDataMap = m_compLevelDataMapVec[ithread];
286  if(compLevelDataMap.find(currentState) == compLevelDataMap.end()) {
287  compLevelDataMap.insert({currentState, std::make_unique<PMonMT::ComponentData>()});
288  }
289 
290  // Capture and store
292  meas.capture(); // No memory in the event-loop
293  if (doMem) {
294  // we made sure this is only run outside event loop or single-threaded
295  [[maybe_unused]] bool dummy ATLAS_THREAD_SAFE = meas.capture_memory();
296  }
297 
298  compLevelDataMap[currentState]->addPointStart(meas, doMem);
299 
300  // Debug
301  ATH_MSG_DEBUG("Start Audit - Component " << compName << " , "
302  "Step " << stepName << " , "
303  "Event " << ctx.evt() << " , "
304  "Slot " << ctx.slot() << " , "
305  "Context " << ctx.valid() << " , "
306  "Thread " << ithread << " , "
307  "Cpu " << meas.cpu_time << " ms, "
308  "Wall " << meas.wall_time << " ms, "
309  "Vmem " << meas.vmem << " kb, "
310  "Malloc " << meas.malloc << " kb");
311 }

◆ startSnapshotAud()

void PerfMonMTSvc::startSnapshotAud ( const std::string &  stepName,
const std::string &  compName 
)

Snapshot Auditing: Take snapshots at the beginning and at the end of each step.

Definition at line 236 of file PerfMonMTSvc.cxx.

236  {
237  // Last thing to be called before the event loop begins
238  if (compName == "AthOutSeq" && stepName == "Start") {
241  m_isFirstEvent = true;
242  }
243 
244  // Last thing to be called before finalize step begins
245  if (compName == "AthMasterSeq" && stepName == "Finalize") {
248  }
249 }

◆ stopAud()

void PerfMonMTSvc::stopAud ( const std::string &  stepName,
const std::string &  compName 
)
overridevirtual

Stop Auditing.

Implements IPerfMonMTSvc.

Definition at line 221 of file PerfMonMTSvc.cxx.

221  {
222  // Snapshots, i.e. Initialize, Event Loop, etc.
223  stopSnapshotAud(stepName, compName);
224 
225  // Check if we should monitor this component
227  // Stop component auditing
228  auto const &ctx = Gaudi::Hive::currentContext();
229  stopCompAud(stepName, compName, ctx);
230  }
231 }

◆ stopCompAud()

void PerfMonMTSvc::stopCompAud ( const std::string &  stepName,
const std::string &  compName,
const EventContext &  ctx 
)

Definition at line 316 of file PerfMonMTSvc.cxx.

316  {
317  // Get the thread index
318  const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
319 
320  // Memory measurement is only done outside the loop except when there is only a single thread
321  const bool doMem = !ctx.valid() || (m_numberOfThreads == 1);
322 
323  // Capture
325  meas.capture(); // No memory in the event-loop
326  if (doMem) {
327  // we made sure this is only run outside event loop or single-threaded
328  [[maybe_unused]] bool dummy ATLAS_THREAD_SAFE = meas.capture_memory();
329  }
330 
331  // Generate State
332  PMonMT::StepComp currentState = generate_state(stepName, compName);
333 
334  // Store
335  data_map_unique_t& compLevelDataMap = m_compLevelDataMapVec[ithread];
336  compLevelDataMap[currentState]->addPointStop(meas, doMem);
337 
338  // Once the first time IncidentProcAlg3 is excuted, toggle m_isFirstEvent to false.
339  // Doing it this way, instead of at EndAlgorithms incident, makes sure there is no
340  // mismatch in start-stop calls to IncidentProcAlg3.
341  // It's a little ad-hoc but I don't think this workflow will change much anytime soon.
342  if ( m_isFirstEvent && compName == "IncidentProcAlg3" && stepName == "Execute") {
343  m_isFirstEvent = false;
344  }
345 
346  // Debug
347  ATH_MSG_DEBUG("Stop Audit - Component " << compName << " , "
348  "Step " << stepName << " , "
349  "Event " << ctx.evt() << " , "
350  "Slot " << ctx.slot() << " , "
351  "Context " << ctx.valid() << " , "
352  "Thread " << ithread << " , "
353  "Cpu (" << compLevelDataMap[currentState]->m_tmp_cpu << ":"
354  << meas.cpu_time << ":"
355  << (meas.cpu_time - compLevelDataMap[currentState]->m_tmp_cpu) << ":"
356  << compLevelDataMap[currentState]->m_delta_cpu << ") ms, "
357  "Wall (" << compLevelDataMap[currentState]->m_tmp_wall << ":"
358  << meas.wall_time << ":"
359  << (meas.wall_time - compLevelDataMap[currentState]->m_tmp_wall) << ":"
360  << compLevelDataMap[currentState]->m_delta_wall << ") ms, "
361  "Vmem (" << compLevelDataMap[currentState]->m_tmp_vmem << ":"
362  << meas.vmem << ":"
363  << (meas.vmem - compLevelDataMap[currentState]->m_tmp_vmem) << ":"
364  << compLevelDataMap[currentState]->m_delta_vmem << ") kb, "
365  "Malloc (" << compLevelDataMap[currentState]->m_tmp_malloc << ":"
366  << meas.malloc << ":"
367  << (meas.malloc - compLevelDataMap[currentState]->m_tmp_malloc) << ":"
368  << compLevelDataMap[currentState]->m_delta_malloc << ") kb");
369 }

◆ stopSnapshotAud()

void PerfMonMTSvc::stopSnapshotAud ( const std::string &  stepName,
const std::string &  compName 
)

Definition at line 254 of file PerfMonMTSvc.cxx.

254  {
255  // First thing to be called after the initialize step ends
256  if (compName == "AthMasterSeq" && stepName == "Initialize") {
259  }
260 
261  // First thing to be called after the event loop ends
262  // Some loop managers fire a dedicated incident to signal the end of the event loop
263  // That preceeds the AthMasterSeq Stop and if it is already handled we don't do anything here
264  if (compName == "AthMasterSeq" && stepName == "Stop" && m_eventCounter > 0 && !m_isEvtLoopStopped) {
267  }
268 }

Member Data Documentation

◆ m_checkPointThreshold

Gaudi::Property<uint64_t> PerfMonMTSvc::m_checkPointThreshold
private
Initial value:
{
this, "checkPointThreshold", 30,
"Least amount of time (in seconds) between event-level checks."}

Frequency of event level monitoring.

Definition at line 140 of file PerfMonMTSvc.h.

◆ m_checkPointTime

std::atomic<double> PerfMonMTSvc::m_checkPointTime
private

Definition at line 184 of file PerfMonMTSvc.h.

◆ m_compLevelDataMap

data_map_t PerfMonMTSvc::m_compLevelDataMap
private

Definition at line 197 of file PerfMonMTSvc.h.

◆ m_compLevelDataMap_1stevt

data_map_t PerfMonMTSvc::m_compLevelDataMap_1stevt
private

Definition at line 203 of file PerfMonMTSvc.h.

◆ m_compLevelDataMap_cbk

data_map_t PerfMonMTSvc::m_compLevelDataMap_cbk
private

Definition at line 207 of file PerfMonMTSvc.h.

◆ m_compLevelDataMap_evt

data_map_t PerfMonMTSvc::m_compLevelDataMap_evt
private

Definition at line 204 of file PerfMonMTSvc.h.

◆ m_compLevelDataMap_fin

data_map_t PerfMonMTSvc::m_compLevelDataMap_fin
private

Definition at line 205 of file PerfMonMTSvc.h.

◆ m_compLevelDataMap_ini

data_map_t PerfMonMTSvc::m_compLevelDataMap_ini
private

Definition at line 202 of file PerfMonMTSvc.h.

◆ m_compLevelDataMap_plp

data_map_t PerfMonMTSvc::m_compLevelDataMap_plp
private

Definition at line 206 of file PerfMonMTSvc.h.

◆ m_compLevelDataMapVec

std::vector<data_map_unique_t> PerfMonMTSvc::m_compLevelDataMapVec
private

Definition at line 201 of file PerfMonMTSvc.h.

◆ m_doComponentLevelMonitoring

Gaudi::Property<bool> PerfMonMTSvc::m_doComponentLevelMonitoring
private
Initial value:
{
this, "doComponentLevelMonitoring", false,
"True if component level monitoring is enabled, false o/w. Component monitoring may cause a decrease in the "
"performance due to the usage of locks."}

Do component level monitoring.

Definition at line 123 of file PerfMonMTSvc.h.

◆ m_doEventLoopMonitoring

Gaudi::Property<bool> PerfMonMTSvc::m_doEventLoopMonitoring
private
Initial value:
{
this, "doEventLoopMonitoring", true,
"True if event loop monitoring is enabled, false o/w. Event loop monitoring may cause a decrease in the "
"performance due to the usage of locks."}

Do event loop monitoring.

Definition at line 118 of file PerfMonMTSvc.h.

◆ m_eventCounter

std::atomic<uint64_t> PerfMonMTSvc::m_eventCounter
private

Definition at line 178 of file PerfMonMTSvc.h.

◆ m_eventLevelData

PMonMT::EventLevelData PerfMonMTSvc::m_eventLevelData {}
private

Definition at line 169 of file PerfMonMTSvc.h.

◆ m_eventLoopMsgCounter

std::atomic<uint64_t> PerfMonMTSvc::m_eventLoopMsgCounter
private

Definition at line 181 of file PerfMonMTSvc.h.

◆ m_eventLoopMsgLimit

Gaudi::Property<uint64_t> PerfMonMTSvc::m_eventLoopMsgLimit {this, "eventLoopMsgLimit", 10, "Maximum number of event-level messages."}
private

Set the number of messages for the event-level report.

Definition at line 153 of file PerfMonMTSvc.h.

◆ m_exclusionSet

const std::set<std::string> PerfMonMTSvc::m_exclusionSet
private
Initial value:
= {"AthMasterSeq", "AthAlgEvtSeq", "AthAllAlgSeq", "AthAlgSeq", "AthOutSeq",
"AthCondSeq", "AthBeginSeq", "AthEndSeq", "AthenaEventLoopMgr", "AthenaHiveEventLoopMgr", "AthMpEvtLoopMgr", "AthenaMtesEventLoopMgr",
"PerfMonMTSvc"}

Exclude some common components from monitoring In the future this might be converted to a inclusion set which would allow user to monitor only a set of algorithms...

Definition at line 158 of file PerfMonMTSvc.h.

◆ m_fit_pss

PerfMon::LinFitSglPass PerfMonMTSvc::m_fit_pss
private

Definition at line 213 of file PerfMonMTSvc.h.

◆ m_fit_vmem

PerfMon::LinFitSglPass PerfMonMTSvc::m_fit_vmem
private

Definition at line 212 of file PerfMonMTSvc.h.

◆ m_isEvtLoopStopped

std::atomic<bool> PerfMonMTSvc::m_isEvtLoopStopped
private

Definition at line 187 of file PerfMonMTSvc.h.

◆ m_isFirstEvent

std::atomic<bool> PerfMonMTSvc::m_isFirstEvent
private

Definition at line 175 of file PerfMonMTSvc.h.

◆ m_jsonFileName

Gaudi::Property<std::string> PerfMonMTSvc::m_jsonFileName
private
Initial value:
{this, "jsonFileName", "PerfMonMTSvc_result.json",
"Name of the JSON file that contains the results."}

Name of the JSON file.

Definition at line 130 of file PerfMonMTSvc.h.

◆ m_measurementEvents

PMonMT::SnapshotMeasurement PerfMonMTSvc::m_measurementEvents
private

Measurement to capture events.

Definition at line 115 of file PerfMonMTSvc.h.

◆ m_measurementSnapshots

PMonMT::SnapshotMeasurement PerfMonMTSvc::m_measurementSnapshots
private

Measurement to capture snapshots.

Definition at line 112 of file PerfMonMTSvc.h.

◆ m_memFitLowerLimit

Gaudi::Property<uint64_t> PerfMonMTSvc::m_memFitLowerLimit
private
Initial value:
{
this, "memFitLowerLimit", 25,
"Lower limit (in number of events) for the memory fit."}

Lower limit (in number of events) for the memory fit.

Definition at line 136 of file PerfMonMTSvc.h.

◆ m_motherPID

int PerfMonMTSvc::m_motherPID
private

Snapshots data.

Definition at line 163 of file PerfMonMTSvc.h.

◆ m_mutex_capture

std::mutex PerfMonMTSvc::m_mutex_capture
private

Definition at line 172 of file PerfMonMTSvc.h.

◆ m_numberOfSlots

Gaudi::Property<int> PerfMonMTSvc::m_numberOfSlots {this, "numberOfSlots", 1, "Number of slots in the job."}
private

Get the number of slots.

Definition at line 151 of file PerfMonMTSvc.h.

◆ m_numberOfThreads

Gaudi::Property<int> PerfMonMTSvc::m_numberOfThreads {this, "numberOfThreads", 1, "Number of threads in the job."}
private

Get the number of threads.

Definition at line 149 of file PerfMonMTSvc.h.

◆ m_printDetailedTables

Gaudi::Property<bool> PerfMonMTSvc::m_printDetailedTables
private
Initial value:
{this, "printDetailedTables", true,
"Print detailed component-level metrics."}

Print detailed tables.

Definition at line 133 of file PerfMonMTSvc.h.

◆ m_printNComps

Gaudi::Property<int> PerfMonMTSvc::m_printNComps
private
Initial value:
{
this, "printNComps", 50, "Maximum number of components to be printed."}

Print the top N components.

Definition at line 146 of file PerfMonMTSvc.h.

◆ m_reportResultsToJSON

Gaudi::Property<bool> PerfMonMTSvc::m_reportResultsToJSON {this, "reportResultsToJSON", true, "Report results into the json file."}
private

Report results to JSON.

Definition at line 128 of file PerfMonMTSvc.h.

◆ m_snapshotData

std::vector<PMonMT::SnapshotData> PerfMonMTSvc::m_snapshotData
private

Definition at line 164 of file PerfMonMTSvc.h.

◆ m_snapshotStepNames

std::vector<std::string> PerfMonMTSvc::m_snapshotStepNames = {"Configure", "Initialize", "FirstEvent", "Execute", "Finalize"}
private

Definition at line 165 of file PerfMonMTSvc.h.

◆ m_stdoutVec_serial

std::vector<data_map_t> PerfMonMTSvc::m_stdoutVec_serial
private

Definition at line 209 of file PerfMonMTSvc.h.

◆ m_wallTimeOffset

Gaudi::Property<double> PerfMonMTSvc::m_wallTimeOffset {this, "wallTimeOffset", 0, "Job start wall time in miliseconds."}
private

Offset for the wall-time, comes from configuration.

Definition at line 144 of file PerfMonMTSvc.h.


The documentation for this class was generated from the following files:
AthService::AthService
AthService()
PerfMonMTSvc::m_doComponentLevelMonitoring
Gaudi::Property< bool > m_doComponentLevelMonitoring
Do component level monitoring.
Definition: PerfMonMTSvc.h:123
PerfMonMTSvc::report2JsonFile
void report2JsonFile()
Report to the JSON File.
Definition: PerfMonMTSvc.cxx:643
PerfMonMTSvc::m_isFirstEvent
std::atomic< bool > m_isFirstEvent
Definition: PerfMonMTSvc.h:175
PerfMonMTSvc::stopSnapshotAud
void stopSnapshotAud(const std::string &stepName, const std::string &compName)
Definition: PerfMonMTSvc.cxx:254
PerfMonMTSvc::report2Log_Description
void report2Log_Description() const
Definition: PerfMonMTSvc.cxx:439
PerfMonMTSvc::divideData2Steps
void divideData2Steps()
Definition: PerfMonMTSvc.cxx:845
PerfMonMTSvc::getCpuEfficiency
int getCpuEfficiency() const
Definition: PerfMonMTSvc.cxx:374
AddEmptyComponent.compName
compName
Definition: AddEmptyComponent.py:32
checkFileSG.line
line
Definition: checkFileSG.py:75
PerfMonMTSvc::report2Log_ComponentLevel
void report2Log_ComponentLevel()
Definition: PerfMonMTSvc.cxx:456
get_generator_info.result
result
Definition: get_generator_info.py:21
PerfMonMTSvc::m_compLevelDataMap_fin
data_map_t m_compLevelDataMap_fin
Definition: PerfMonMTSvc.h:205
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
PerfMonMTSvc::m_numberOfThreads
Gaudi::Property< int > m_numberOfThreads
Get the number of threads.
Definition: PerfMonMTSvc.h:149
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
PerfMonMTSvc::m_measurementSnapshots
PMonMT::SnapshotMeasurement m_measurementSnapshots
Measurement to capture snapshots.
Definition: PerfMonMTSvc.h:112
PerfMonMTSvc::m_compLevelDataMap
data_map_t m_compLevelDataMap
Definition: PerfMonMTSvc.h:197
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PerfMon::LinFitSglPass::addPoint
void addPoint(const double &, const double &)
Definition: LinFitSglPass.h:56
PerfMon::makeAuditor
StatusCode makeAuditor(const std::string &audName, IAuditorSvc *audSvc, MsgStream &msg)
simple function to factorize boring things such as asking the AuditorSvc if an auditor is there (and ...
Definition: PerfMonUtils.cxx:32
PerfMonMTSvc::m_motherPID
int m_motherPID
Snapshots data.
Definition: PerfMonMTSvc.h:163
PerfMonMTSvc::report2Log_CpuInfo
void report2Log_CpuInfo() const
Definition: PerfMonMTSvc.cxx:610
PerfMonMTSvc::report2Log_EnvInfo
void report2Log_EnvInfo() const
Definition: PerfMonMTSvc.cxx:626
json
nlohmann::json json
Definition: HistogramDef.cxx:9
PerfMonMTSvc::m_eventCounter
std::atomic< uint64_t > m_eventCounter
Definition: PerfMonMTSvc.h:178
PerfMonMTSvc::get_cpu_core_info
int get_cpu_core_info() const
Definition: PerfMonMTSvc.cxx:955
rerun_display.cmd
string cmd
Definition: rerun_display.py:67
PerfMonMTSvc::m_checkPointTime
std::atomic< double > m_checkPointTime
Definition: PerfMonMTSvc.h:184
PerfMonMTSvc::m_wallTimeOffset
Gaudi::Property< double > m_wallTimeOffset
Offset for the wall-time, comes from configuration.
Definition: PerfMonMTSvc.h:144
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
PerfMonMTSvc::report2JsonFile_ComponentLevel
void report2JsonFile_ComponentLevel(nlohmann::json &j) const
Definition: PerfMonMTSvc.cxx:751
skel.it
it
Definition: skel.GENtoEVGEN.py:423
PerfMonMTSvc::m_fit_vmem
PerfMon::LinFitSglPass m_fit_vmem
Definition: PerfMonMTSvc.h:212
PMonMT::StepComp
Definition: PerfMonMTUtils.h:58
PerfMonMTSvc::get_cpu_model_info
std::string get_cpu_model_info() const
Definition: PerfMonMTSvc.cxx:950
PerfMonMTSvc::stopCompAud
void stopCompAud(const std::string &stepName, const std::string &compName, const EventContext &ctx)
Definition: PerfMonMTSvc.cxx:316
PerfMonMTSvc::CONFIGURE
@ CONFIGURE
Definition: PerfMonMTSvc.h:166
PerfMonMTSvc::m_measurementEvents
PMonMT::SnapshotMeasurement m_measurementEvents
Measurement to capture events.
Definition: PerfMonMTSvc.h:115
athena.value
value
Definition: athena.py:122
PerfMonMTSvc::m_eventLoopMsgLimit
Gaudi::Property< uint64_t > m_eventLoopMsgLimit
Set the number of messages for the event-level report.
Definition: PerfMonMTSvc.h:153
PerfMonMTSvc::FINALIZE
@ FINALIZE
Definition: PerfMonMTSvc.h:166
PMonMT::EventLevelData::getEventLevelData
EventMeasMap_t getEventLevelData() const
Definition: PerfMonMTUtils.h:215
PerfMonMTSvc::report2Log_EventLevel
void report2Log_EventLevel()
Definition: PerfMonMTSvc.cxx:520
PerfMonMTSvc::startSnapshotAud
void startSnapshotAud(const std::string &stepName, const std::string &compName)
Snapshot Auditing: Take snapshots at the beginning and at the end of each step.
Definition: PerfMonMTSvc.cxx:236
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
PerfMonMTSvc::m_isEvtLoopStopped
std::atomic< bool > m_isEvtLoopStopped
Definition: PerfMonMTSvc.h:187
PerfMonMTSvc::report2Log_Summary
void report2Log_Summary()
Definition: PerfMonMTSvc.cxx:559
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
PerfMonMTSvc::m_compLevelDataMap_ini
data_map_t m_compLevelDataMap_ini
Definition: PerfMonMTSvc.h:202
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
PMonMT::ComponentMeasurement::cpu_time
double cpu_time
Definition: PerfMonMTUtils.h:72
PerfMonMTSvc::m_compLevelDataMap_evt
data_map_t m_compLevelDataMap_evt
Definition: PerfMonMTSvc.h:204
python.CreateTierZeroArgdict.pairs
pairs
Definition: CreateTierZeroArgdict.py:201
PerfMonMTSvc::m_snapshotData
std::vector< PMonMT::SnapshotData > m_snapshotData
Definition: PerfMonMTSvc.h:164
PMonMT::ComponentMeasurement
Definition: PerfMonMTUtils.h:69
PerfMonMTSvc::INITIALIZE
@ INITIALIZE
Definition: PerfMonMTSvc.h:166
PerfMonMTSvc::report2Log_EventLevel_instant
void report2Log_EventLevel_instant() const
Definition: PerfMonMTSvc.cxx:503
PixelModuleFeMask_create_db.remove
string remove
Definition: PixelModuleFeMask_create_db.py:83
PMonMT::get_wall_time
double get_wall_time()
Definition: PerfMonMTUtils.h:325
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PerfMonMTSvc::m_fit_pss
PerfMon::LinFitSglPass m_fit_pss
Definition: PerfMonMTSvc.h:213
PerfMonMTSvc::report2Log
void report2Log()
Report to log.
Definition: PerfMonMTSvc.cxx:416
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
PMonMT::ComponentMeasurement::wall_time
double wall_time
Definition: PerfMonMTUtils.h:72
lumiFormat.i
int i
Definition: lumiFormat.py:92
PMonMT::EventLevelData::getEventLevelMemoryMax
int64_t getEventLevelMemoryMax(const std::string &stat) const
Definition: PerfMonMTUtils.h:236
PerfMonMTSvc::m_reportResultsToJSON
Gaudi::Property< bool > m_reportResultsToJSON
Report results to JSON.
Definition: PerfMonMTSvc.h:128
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
mc.order
order
Configure Herwig7.
Definition: mc.Herwig7_Dijet.py:12
PerfMonMTSvc::m_jsonFileName
Gaudi::Property< std::string > m_jsonFileName
Name of the JSON file.
Definition: PerfMonMTSvc.h:130
taskman.fieldName
fieldName
Definition: taskman.py:492
PerfMonMTSvc::report2JsonFile_EventLevel
void report2JsonFile_EventLevel(nlohmann::json &j) const
Definition: PerfMonMTSvc.cxx:776
file
TFile * file
Definition: tile_monitor.h:29
PerfMonMTSvc::m_eventLoopMsgCounter
std::atomic< uint64_t > m_eventLoopMsgCounter
Definition: PerfMonMTSvc.h:181
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
nEvents
int nEvents
Definition: fbtTestBasics.cxx:77
PMonMT::SnapshotMeasurement::capture
void capture()
Definition: PerfMonMTUtils.h:172
PerfMonMTSvc::scaleMem
std::string scaleMem(int64_t memMeas) const
Definition: PerfMonMTSvc.cxx:892
PerfMonMTSvc::scaleTime
std::string scaleTime(double timeMeas) const
Definition: PerfMonMTSvc.cxx:868
PerfMonMTSvc::get_memory_info
uint64_t get_memory_info() const
Definition: PerfMonMTSvc.cxx:961
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
PerfMonMTSvc::NSNAPSHOTS
@ NSNAPSHOTS
Definition: PerfMonMTSvc.h:166
PerfMon::LinFitSglPass::nPoints
unsigned nPoints() const
Definition: LinFitSglPass.h:31
PerfMonMTSvc::report2JsonFile_Summary
void report2JsonFile_Summary(nlohmann::json &j) const
Definition: PerfMonMTSvc.cxx:681
PMonMT::StepComp::stepName
std::string stepName
Definition: PerfMonMTUtils.h:59
PerfMonMTSvc::m_snapshotStepNames
std::vector< std::string > m_snapshotStepNames
Definition: PerfMonMTSvc.h:165
PerfMonMTSvc::m_exclusionSet
const std::set< std::string > m_exclusionSet
Exclude some common components from monitoring In the future this might be converted to a inclusion s...
Definition: PerfMonMTSvc.h:158
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
PMonSD::symb2lib
const char * symb2lib(const char *symbol, const char *failstr="unknown")
Definition: SemiDetMisc.h:433
PMonMT::EventLevelData::getEventLevelMemory
int64_t getEventLevelMemory(const uint64_t event_count, const std::string &stat) const
Definition: PerfMonMTUtils.h:231
PerfMonMTSvc::m_mutex_capture
std::mutex m_mutex_capture
Definition: PerfMonMTSvc.h:172
PMonMT::ComponentMeasurement::vmem
double vmem
Definition: PerfMonMTUtils.h:73
PerfMonMTSvc::m_numberOfSlots
Gaudi::Property< int > m_numberOfSlots
Get the number of slots.
Definition: PerfMonMTSvc.h:151
PerfMonMTSvc::m_printNComps
Gaudi::Property< int > m_printNComps
Print the top N components.
Definition: PerfMonMTSvc.h:146
PerfMonMTSvc::m_printDetailedTables
Gaudi::Property< bool > m_printDetailedTables
Print detailed tables.
Definition: PerfMonMTSvc.h:133
PerfMonMTSvc::aggregateSlotData
void aggregateSlotData()
A few helper functions.
Definition: PerfMonMTSvc.cxx:812
PMonMT::EventLevelData::set_wall_time_offset
void set_wall_time_offset(const double wall_time_offset)
Definition: PerfMonMTUtils.h:213
PerfMonMTSvc::m_stdoutVec_serial
std::vector< data_map_t > m_stdoutVec_serial
Definition: PerfMonMTSvc.h:209
PerfMonMTSvc::m_eventLevelData
PMonMT::EventLevelData m_eventLevelData
Definition: PerfMonMTSvc.h:169
IPerfMonMTSvc
STL includes.
Definition: IPerfMonMTSvc.h:16
a
TList * a
Definition: liststreamerinfos.cxx:10
PMonMT::EventLevelData::getNMeasurements
uint64_t getNMeasurements() const
Definition: PerfMonMTUtils.h:219
PerfMonMTSvc::m_doEventLoopMonitoring
Gaudi::Property< bool > m_doEventLoopMonitoring
Do event loop monitoring.
Definition: PerfMonMTSvc.h:118
PerfMonMTSvc::EXECUTE
@ EXECUTE
Definition: PerfMonMTSvc.h:166
PerfMonMTSvc::m_checkPointThreshold
Gaudi::Property< uint64_t > m_checkPointThreshold
Frequency of event level monitoring.
Definition: PerfMonMTSvc.h:140
IPerfMonMTSvc::interfaceID
static const InterfaceID & interfaceID()
Framework - Service InterfaceID.
Definition: IPerfMonMTSvc.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
PMonMT::ComponentMeasurement::malloc
double malloc
Definition: PerfMonMTUtils.h:73
AthCommonMsg< Service >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
PerfMon::LinFitSglPass::slope
double slope() const
Definition: LinFitSglPass.h:75
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
PerfMonMTSvc::m_compLevelDataMap_1stevt
data_map_t m_compLevelDataMap_1stevt
Definition: PerfMonMTSvc.h:203
PerfMonMTSvc::m_memFitLowerLimit
Gaudi::Property< uint64_t > m_memFitLowerLimit
Lower limit (in number of events) for the memory fit.
Definition: PerfMonMTSvc.h:136
LArCellBinning.step
step
Definition: LArCellBinning.py:158
PMonMT::StepComp::compName
std::string compName
Definition: PerfMonMTUtils.h:60
PerfMonMTSvc::FIRSTEVENT
@ FIRSTEVENT
Definition: PerfMonMTSvc.h:166
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
test_pyathena.counter
counter
Definition: test_pyathena.py:15
PerfMonMTSvc::get_info_from_file
std::string get_info_from_file(const std::string &fileName, const std::string &fieldName) const
A few helper methods to get system information These should be carried to PerfMonMTUtils at some poin...
Definition: PerfMonMTSvc.cxx:922
PMonMT::doesDirectoryExist
bool doesDirectoryExist(const std::string &dir)
Definition: PerfMonMTUtils.h:410
PerfMonMTSvc::m_compLevelDataMapVec
std::vector< data_map_unique_t > m_compLevelDataMapVec
Definition: PerfMonMTSvc.h:201
PerfMonMTSvc::m_compLevelDataMap_cbk
data_map_t m_compLevelDataMap_cbk
Definition: PerfMonMTSvc.h:207
PerfMonMTSvc::data_map_unique_t
std::map< PMonMT::StepComp, std::unique_ptr< PMonMT::ComponentData > > data_map_unique_t
Definition: PerfMonMTSvc.h:193
PerfMonMTSvc::generate_state
PMonMT::StepComp generate_state(const std::string &stepName, const std::string &compName) const
Definition: PerfMonMTSvc.cxx:802
PMonMT::ComponentMeasurement::capture
void capture()
Definition: PerfMonMTUtils.h:76
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:350
PerfMonMTSvc::report
void report()
Report the results.
Definition: PerfMonMTSvc.cxx:403
PerfMonMTSvc::startCompAud
void startCompAud(const std::string &stepName, const std::string &compName, const EventContext &ctx)
Component Level Auditing: Take measurements at the beginning and at the end of each component call.
Definition: PerfMonMTSvc.cxx:273
PMonMT::EventLevelData::getEventLevelWallTime
double getEventLevelWallTime(const uint64_t event_count) const
Definition: PerfMonMTUtils.h:227
PerfMonMTSvc::m_compLevelDataMap_plp
data_map_t m_compLevelDataMap_plp
Definition: PerfMonMTSvc.h:206
PMonMT::EventLevelData::recordEvent
void recordEvent(const SnapshotMeasurement &meas, const int eventCount)
Definition: PerfMonMTUtils.h:198
PMonMT::EventLevelData::getEventLevelCpuTime
double getEventLevelCpuTime(const uint64_t event_count) const
Definition: PerfMonMTUtils.h:223
ServiceHandle< IIncidentSvc >