![]() |
ATLAS Offline Software
|
#include <PerfMonMTSvc.h>
Public Member Functions | |
| PerfMonMTSvc (const std::string &name, ISvcLocator *pSvcLocator) | |
| Standard Gaudi Service constructor. | |
| virtual | ~PerfMonMTSvc ()=default |
| virtual void | handle (const Incident &incident) override |
| Incident service handle for post-finalize. | |
| virtual StatusCode | initialize () override |
| Standard Gaudi Service initialization. | |
| virtual StatusCode | finalize () override |
| Standard Gaudi Service finalization. | |
| virtual void | startAud (const std::string &stepName, const std::string &compName, const EventContext &ctx) override |
| Start Auditing. | |
| virtual void | stopAud (const std::string &stepName, const std::string &compName, const EventContext &ctx) override |
| Stop Auditing. | |
| void | startSnapshotAud (const std::string &stepName, const std::string &compName) |
| Snapshot Auditing: Take snapshots at the beginning and at the end of each step. | |
| 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. | |
| void | stopCompAud (const std::string &stepName, const std::string &compName, const EventContext &ctx) |
| void | report () |
| Report the results. | |
| void | report2Log () |
| Report to log. | |
| 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. | |
| 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. | |
| 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. | |
| 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 |
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. | |
| PMonMT::SnapshotMeasurement | m_measurementEvents |
| Measurement to capture events. | |
| Gaudi::Property< bool > | m_doEventLoopMonitoring |
| Do event loop monitoring. | |
| Gaudi::Property< bool > | m_doComponentLevelMonitoring |
| Do component level monitoring. | |
| Gaudi::Property< bool > | m_reportResultsToJSON {this, "reportResultsToJSON", true, "Report results into the json file."} |
| Report results to JSON. | |
| Gaudi::Property< std::string > | m_jsonFileName |
| Name of the JSON file. | |
| Gaudi::Property< bool > | m_printDetailedTables |
| Print detailed tables. | |
| Gaudi::Property< uint64_t > | m_memFitLowerLimit |
| Lower limit (in number of events) for the memory fit. | |
| Gaudi::Property< uint64_t > | m_checkPointThreshold |
| Frequency of event level monitoring. | |
| Gaudi::Property< double > | m_wallTimeOffset {this, "wallTimeOffset", 0, "Job start wall time in miliseconds."} |
| Offset for the wall-time, comes from configuration. | |
| Gaudi::Property< int > | m_printNComps |
| Print the top N components. | |
| Gaudi::Property< int > | m_numberOfThreads {this, "numberOfThreads", 1, "Number of threads in the job."} |
| Get the number of threads. | |
| Gaudi::Property< int > | m_numberOfSlots {this, "numberOfSlots", 1, "Number of slots in the job."} |
| Get the number of slots. | |
| 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. | |
| 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... | |
| int | m_motherPID |
| Snapshots data. | |
| std::vector< PMonMT::SnapshotData > | m_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_t > | m_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_t > | m_stdoutVec_serial |
| PerfMon::LinFitSglPass | m_fit_vmem |
| PerfMon::LinFitSglPass | m_fit_pss |
Definition at line 41 of file PerfMonMTSvc.h.
|
private |
Definition at line 189 of file PerfMonMTSvc.h.
|
private |
Definition at line 190 of file PerfMonMTSvc.h.
|
private |
| Enumerator | |
|---|---|
| CONFIGURE | |
| INITIALIZE | |
| FIRSTEVENT | |
| EXECUTE | |
| FINALIZE | |
| NSNAPSHOTS | |
Definition at line 163 of file PerfMonMTSvc.h.
| PerfMonMTSvc::PerfMonMTSvc | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator ) |
Standard Gaudi Service constructor.
Definition at line 32 of file PerfMonMTSvc.cxx.
|
virtualdefault |
| void PerfMonMTSvc::aggregateSlotData | ( | ) |
A few helper functions.
Definition at line 793 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::divideData2Steps | ( | ) |
Definition at line 826 of file PerfMonMTSvc.cxx.
|
overridevirtual |
Standard Gaudi Service finalization.
Definition at line 93 of file PerfMonMTSvc.cxx.
| PMonMT::StepComp PerfMonMTSvc::generate_state | ( | const std::string & | stepName, |
| const std::string & | compName ) const |
Definition at line 783 of file PerfMonMTSvc.cxx.
| int PerfMonMTSvc::get_cpu_core_info | ( | ) | const |
Definition at line 936 of file PerfMonMTSvc.cxx.
| std::string PerfMonMTSvc::get_cpu_model_info | ( | ) | const |
Definition at line 931 of file PerfMonMTSvc.cxx.
| 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 903 of file PerfMonMTSvc.cxx.
| uint64_t PerfMonMTSvc::get_memory_info | ( | ) | const |
Definition at line 942 of file PerfMonMTSvc.cxx.
|
private |
Definition at line 363 of file PerfMonMTSvc.cxx.
|
overridevirtual |
Incident service handle for post-finalize.
Definition at line 103 of file PerfMonMTSvc.cxx.
|
overridevirtual |
Standard Gaudi Service initialization.
Configure the auditor
Definition at line 47 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report | ( | ) |
Report the results.
Definition at line 392 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2JsonFile | ( | ) |
Report to the JSON File.
Definition at line 624 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2JsonFile_ComponentLevel | ( | nlohmann::json & | j | ) | const |
Definition at line 732 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2JsonFile_EventLevel | ( | nlohmann::json & | j | ) | const |
Definition at line 757 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2JsonFile_Summary | ( | nlohmann::json & | j | ) | const |
Definition at line 662 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log | ( | ) |
Report to log.
Definition at line 405 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log_ComponentLevel | ( | ) |
Definition at line 445 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log_CpuInfo | ( | ) | const |
Definition at line 595 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log_Description | ( | ) | const |
Definition at line 428 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log_EnvInfo | ( | ) | const |
Definition at line 609 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log_EventLevel | ( | ) |
Definition at line 508 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log_EventLevel_instant | ( | ) | const |
Definition at line 491 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::report2Log_Summary | ( | ) |
Definition at line 546 of file PerfMonMTSvc.cxx.
| std::string PerfMonMTSvc::scaleMem | ( | int64_t | memMeas | ) | const |
Definition at line 873 of file PerfMonMTSvc.cxx.
| std::string PerfMonMTSvc::scaleTime | ( | double | timeMeas | ) | const |
Definition at line 849 of file PerfMonMTSvc.cxx.
|
overridevirtual |
Start Auditing.
Definition at line 188 of file PerfMonMTSvc.cxx.
| 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 256 of file PerfMonMTSvc.cxx.
| 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 219 of file PerfMonMTSvc.cxx.
|
overridevirtual |
Stop Auditing.
Definition at line 205 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::stopCompAud | ( | const std::string & | stepName, |
| const std::string & | compName, | ||
| const EventContext & | ctx ) |
Definition at line 299 of file PerfMonMTSvc.cxx.
| void PerfMonMTSvc::stopSnapshotAud | ( | const std::string & | stepName, |
| const std::string & | compName ) |
Definition at line 237 of file PerfMonMTSvc.cxx.
|
private |
Frequency of event level monitoring.
Definition at line 137 of file PerfMonMTSvc.h.
|
private |
Definition at line 181 of file PerfMonMTSvc.h.
|
private |
Definition at line 194 of file PerfMonMTSvc.h.
|
private |
Definition at line 200 of file PerfMonMTSvc.h.
|
private |
Definition at line 204 of file PerfMonMTSvc.h.
|
private |
Definition at line 201 of file PerfMonMTSvc.h.
|
private |
Definition at line 202 of file PerfMonMTSvc.h.
|
private |
Definition at line 199 of file PerfMonMTSvc.h.
|
private |
Definition at line 203 of file PerfMonMTSvc.h.
|
private |
Definition at line 198 of file PerfMonMTSvc.h.
|
private |
Do component level monitoring.
Definition at line 120 of file PerfMonMTSvc.h.
|
private |
Do event loop monitoring.
Definition at line 115 of file PerfMonMTSvc.h.
|
private |
Definition at line 175 of file PerfMonMTSvc.h.
|
private |
Definition at line 166 of file PerfMonMTSvc.h.
|
private |
Definition at line 178 of file PerfMonMTSvc.h.
|
private |
Set the number of messages for the event-level report.
Definition at line 150 of file PerfMonMTSvc.h.
|
private |
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 155 of file PerfMonMTSvc.h.
|
private |
Definition at line 210 of file PerfMonMTSvc.h.
|
private |
Definition at line 209 of file PerfMonMTSvc.h.
|
private |
Definition at line 184 of file PerfMonMTSvc.h.
|
private |
Definition at line 172 of file PerfMonMTSvc.h.
|
private |
Definition at line 127 of file PerfMonMTSvc.h.
|
private |
Measurement to capture events.
Definition at line 112 of file PerfMonMTSvc.h.
|
private |
Measurement to capture snapshots.
Definition at line 109 of file PerfMonMTSvc.h.
|
private |
Lower limit (in number of events) for the memory fit.
Definition at line 133 of file PerfMonMTSvc.h.
|
private |
Snapshots data.
Definition at line 160 of file PerfMonMTSvc.h.
|
private |
Definition at line 169 of file PerfMonMTSvc.h.
|
private |
Get the number of slots.
Definition at line 148 of file PerfMonMTSvc.h.
|
private |
Get the number of threads.
Definition at line 146 of file PerfMonMTSvc.h.
|
private |
Print detailed tables.
Definition at line 130 of file PerfMonMTSvc.h.
|
private |
Print the top N components.
Definition at line 143 of file PerfMonMTSvc.h.
|
private |
Report results to JSON.
Definition at line 125 of file PerfMonMTSvc.h.
|
private |
Definition at line 161 of file PerfMonMTSvc.h.
|
private |
Definition at line 162 of file PerfMonMTSvc.h.
|
private |
Definition at line 206 of file PerfMonMTSvc.h.
|
private |
Offset for the wall-time, comes from configuration.
Definition at line 141 of file PerfMonMTSvc.h.