|
ATLAS Offline Software
|
#include <PerfMonMTSvc.h>
|
| PerfMonMTSvc (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Gaudi Service constructor. More...
|
|
virtual | ~PerfMonMTSvc ()=default |
|
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 |
|
|
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::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.
◆ data_map_t
◆ data_map_unique_t
◆ Snapshots
Enumerator |
---|
CONFIGURE | |
INITIALIZE | |
FIRSTEVENT | |
EXECUTE | |
FINALIZE | |
NSNAPSHOTS | |
Definition at line 163 of file PerfMonMTSvc.h.
◆ PerfMonMTSvc()
PerfMonMTSvc::PerfMonMTSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~PerfMonMTSvc()
virtual PerfMonMTSvc::~PerfMonMTSvc |
( |
| ) |
|
|
virtualdefault |
◆ aggregateSlotData()
void PerfMonMTSvc::aggregateSlotData |
( |
| ) |
|
A few helper functions.
Definition at line 785 of file PerfMonMTSvc.cxx.
788 for (
const auto&
it : slotData) {
801 if(
it.second->getDeltaCPU() < 0) {
802 ATH_MSG_WARNING(
"Negative CPU-time measurement of " <<
it.second->getDeltaCPU() <<
803 " ms for component " <<
it.first.compName <<
804 " in step " <<
it.first.stepName);
806 if(
it.second->getDeltaWall() < 0) {
807 ATH_MSG_WARNING(
"Negative Wall-time measurement of " <<
it.second->getDeltaWall() <<
808 " ms for component " <<
it.first.compName <<
809 " in step " <<
it.first.stepName);
◆ divideData2Steps()
void PerfMonMTSvc::divideData2Steps |
( |
| ) |
|
Definition at line 818 of file PerfMonMTSvc.cxx.
820 if (
it.first.stepName ==
"Initialize")
822 else if (
it.first.stepName ==
"FirstEvent")
824 else if (
it.first.stepName ==
"Execute")
826 else if (
it.first.stepName ==
"Finalize")
828 else if (
it.first.stepName ==
"preLoadProxy")
830 else if (
it.first.stepName ==
"Callback")
◆ finalize()
StatusCode PerfMonMTSvc::finalize |
( |
| ) |
|
|
overridevirtual |
Standard Gaudi Service finalization.
Definition at line 97 of file PerfMonMTSvc.cxx.
101 return StatusCode::SUCCESS;
◆ generate_state()
◆ get_cpu_core_info()
int PerfMonMTSvc::get_cpu_core_info |
( |
| ) |
const |
◆ get_cpu_model_info()
std::string PerfMonMTSvc::get_cpu_model_info |
( |
| ) |
const |
◆ 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 895 of file PerfMonMTSvc.cxx.
903 std::string
line{
""};
906 if (
line.empty())
continue;
907 size_t splitIdx =
line.find(
':');
908 if (splitIdx != std::string::npos) {
909 std::string
val =
line.substr(splitIdx + 1);
910 if (
val.empty())
continue;
◆ get_memory_info()
uint64_t PerfMonMTSvc::get_memory_info |
( |
| ) |
const |
◆ getCpuEfficiency()
int PerfMonMTSvc::getCpuEfficiency |
( |
| ) |
const |
|
private |
Definition at line 355 of file PerfMonMTSvc.cxx.
363 const double totalCpuTime =
370 const double scaledWallTime =
377 return ( scaledWallTime > 0 ? totalCpuTime / scaledWallTime * 100. : 0 );
◆ handle()
void PerfMonMTSvc::handle |
( |
const Incident & |
incident | ) |
|
|
overridevirtual |
Incident service handle for post-finalize.
Definition at line 107 of file PerfMonMTSvc.cxx.
109 if (inc.type() == IncidentType::BeginEvent) {
164 else if (inc.type() ==
"EndEvtLoop") {
170 else if (inc.type() == IncidentType::SvcPostFinalize) {
◆ initialize()
StatusCode PerfMonMTSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Standard Gaudi Service initialization.
Configure the auditor
Definition at line 49 of file PerfMonMTSvc.cxx.
56 const long highestPriority =
static_cast<long>(-1);
57 const long lowestPriority = 0;
58 incSvc->addListener(
this, IncidentType::BeginEvent, highestPriority);
59 incSvc->addListener(
this,
"EndAlgorithms", lowestPriority);
60 incSvc->addListener(
this,
"EndEvtLoop", highestPriority);
61 incSvc->addListener(
this, IncidentType::SvcPostFinalize);
66 ATH_MSG_INFO(
"The system doesn't support /proc. Therefore, memory measurements are not available");
71 "analyzing [" <<
m_numberOfSlots.toString() <<
"] events concurrently");
74 ATH_MSG_INFO(
" >> Component-level memory monitoring in the event-loop is disabled in jobs with more than 1 thread");
88 ATH_MSG_ERROR(
"Could not register auditor [PerfMonMTAuditor]!");
89 return StatusCode::FAILURE;
91 return StatusCode::SUCCESS;
◆ report()
void PerfMonMTSvc::report |
( |
| ) |
|
◆ report2JsonFile()
void PerfMonMTSvc::report2JsonFile |
( |
| ) |
|
Report to the JSON File.
Definition at line 616 of file PerfMonMTSvc.cxx.
632 o << std::setw(4) << j << std::endl;
637 int rc = std::system(
cmd.c_str());
◆ report2JsonFile_ComponentLevel()
void PerfMonMTSvc::report2JsonFile_ComponentLevel |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 724 of file PerfMonMTSvc.cxx.
728 for(
const auto& meas : dataMapPerStep){
730 const std::string
step = meas.first.stepName;
731 const std::string component = meas.first.compName;
733 const double cpuTime = meas.second->getDeltaCPU();
734 const double wallTime = meas.second->getDeltaWall();
735 const int64_t vmem = meas.second->getDeltaVmem();
736 const int64_t mall = meas.second->getDeltaMalloc();
738 j[
"componentLevel"][
step][component] = {{
"count",
count},
739 {
"cpuTime", cpuTime},
740 {
"wallTime", wallTime},
◆ report2JsonFile_EventLevel()
void PerfMonMTSvc::report2JsonFile_EventLevel |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 749 of file PerfMonMTSvc.cxx.
754 const double cpuTime =
it.second.cpu_time;
755 const double wallTime =
it.second.wall_time;
756 const int64_t vmem =
it.second.mem_stats.at(
"vmem");
757 const int64_t rss =
it.second.mem_stats.at(
"rss");
758 const int64_t pss =
it.second.mem_stats.at(
"pss");
759 const int64_t
swap =
it.second.mem_stats.at(
"swap");
762 {
"wallTime", wallTime},
◆ report2JsonFile_Summary()
void PerfMonMTSvc::report2JsonFile_Summary |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 654 of file PerfMonMTSvc.cxx.
662 const double cpuUtil = dCPU / dWall;
668 j[
"summary"][
"snapshotLevel"][
step] = {{
"dCPU", dCPU},
670 {
"cpuUtil", cpuUtil},
680 j[
"summary"][
"nEvents"] =
nEvents;
688 j[
"summary"][
"peaks"] = {{
"vmemPeak", vmemPeak},
689 {
"rssPeak", rssPeak},
690 {
"pssPeak", pssPeak},
691 {
"swapPeak", swapPeak}};
698 j[
"summary"][
"leakEstimates"] = {{
"vmemLeak", vmemLeak},
699 {
"pssLeak", pssLeak},
700 {
"nPoints", nPoints}};
707 j[
"summary"][
"sysInfo"] = {{
"cpuModel", cpuModel},
708 {
"coreNum", coreNum},
715 j[
"summary"][
"envInfo"] = {{
"mallocLib", mallocLib},
716 {
"mathLib", mathLib}};
720 j[
"summary"][
"misc"] = {{
"cpuUtilEff", cpuUtilEff}};
◆ report2Log()
void PerfMonMTSvc::report2Log |
( |
| ) |
|
◆ report2Log_ComponentLevel()
void PerfMonMTSvc::report2Log_ComponentLevel |
( |
| ) |
|
Definition at line 437 of file PerfMonMTSvc.cxx.
439 ATH_MSG_INFO(
"=======================================================================================");
441 ATH_MSG_INFO(
"=======================================================================================");
444 "Vmem [kB]",
"Malloc [kB]",
"Component"));
446 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
453 std::vector<std::pair<PMonMT::StepComp, PMonMT::ComponentData*>>
pairs;
454 for (
auto itr = vec_itr.begin(); itr != vec_itr.end(); ++itr)
pairs.push_back(*itr);
457 [=](std::pair<PMonMT::StepComp, PMonMT::ComponentData*>&
a,
458 std::pair<PMonMT::StepComp, PMonMT::ComponentData*>&
b) {
459 return a.second->getDeltaCPU() > b.second->getDeltaCPU();
471 it.second->getCallCount(),
it.second->getDeltaCPU(),
it.second->getDeltaVmem(),
472 it.second->getDeltaMalloc(),
it.first.compName));
475 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_CpuInfo()
void PerfMonMTSvc::report2Log_CpuInfo |
( |
| ) |
const |
Definition at line 587 of file PerfMonMTSvc.cxx.
590 ATH_MSG_INFO(
"=======================================================================================");
595 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_Description()
void PerfMonMTSvc::report2Log_Description |
( |
| ) |
const |
Definition at line 420 of file PerfMonMTSvc.cxx.
421 ATH_MSG_INFO(
"=======================================================================================");
423 ATH_MSG_INFO(
"=======================================================================================");
426 ATH_MSG_INFO(
"*** In order to make plots using the results run the following commands:");
428 ATH_MSG_INFO(
"*** In order to print tables using the results run the following commands:");
430 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EnvInfo()
void PerfMonMTSvc::report2Log_EnvInfo |
( |
| ) |
const |
Definition at line 601 of file PerfMonMTSvc.cxx.
604 ATH_MSG_INFO(
"=======================================================================================");
609 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EventLevel()
void PerfMonMTSvc::report2Log_EventLevel |
( |
| ) |
|
Definition at line 500 of file PerfMonMTSvc.cxx.
504 " and the last measurements are explicitly printed)");
505 ATH_MSG_INFO(
"=======================================================================================");
508 "Wall [s]",
"Vmem [kB]",
"Rss [kB]",
"Pss [kB]",
"Swap [kB]"));
510 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
522 it.second.cpu_time * 0.001,
it.second.wall_time * 0.001,
it.second.mem_stats.at(
"vmem"),
523 it.second.mem_stats.at(
"rss"),
it.second.mem_stats.at(
"pss"),
it.second.mem_stats.at(
"swap")));
532 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EventLevel_instant()
void PerfMonMTSvc::report2Log_EventLevel_instant |
( |
| ) |
const |
◆ report2Log_Summary()
void PerfMonMTSvc::report2Log_Summary |
( |
| ) |
|
Definition at line 538 of file PerfMonMTSvc.cxx.
541 ATH_MSG_INFO(
"=======================================================================================");
544 "dCPU [s]",
"dWall [s]",
"<CPU>",
"dVmem [kB]",
"dRss [kB]",
"dPss [kB]",
"dSwap [kB]"));
546 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
557 ATH_MSG_INFO(
"***************************************************************************************");
565 (wall_exec_total > 0 ?
m_eventCounter / wall_exec_total * 1000. : 0)));
568 ATH_MSG_INFO(
"***************************************************************************************");
573 ATH_MSG_INFO(
"***************************************************************************************");
577 <<
" measurements from the Event Level Monitoring");
581 ATH_MSG_INFO(
"=======================================================================================");
◆ scaleMem()
std::string PerfMonMTSvc::scaleMem |
( |
int64_t |
memMeas | ) |
const |
Definition at line 865 of file PerfMonMTSvc.cxx.
873 std::ostringstream
ss;
875 ss << std::setprecision(2);
878 std::vector<std::string> significance = {
"KB",
"MB",
"GB",
"TB"};
881 int64_t absMemMeas = std::abs(memMeas);
889 return ss.str() +
" " + significance[
order];
◆ scaleTime()
std::string PerfMonMTSvc::scaleTime |
( |
double |
timeMeas | ) |
const |
Definition at line 841 of file PerfMonMTSvc.cxx.
844 auto ms =
static_cast<int64_t
>(timeMeas);
847 auto hrs =
ms / 3600000;
850 auto mins =
ms / 60000;
853 auto secs =
ms / 1000;
857 std::stringstream
ss;
859 ss << std::setw(2) << hrs <<
"h" <<
860 std::setw(2) << mins <<
"m" <<
861 std::setw(2) << secs <<
"s";
◆ startAud()
void PerfMonMTSvc::startAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName |
|
) |
| |
|
overridevirtual |
Start Auditing.
Definition at line 183 of file PerfMonMTSvc.cxx.
194 auto const &ctx = Gaudi::Hive::currentContext();
◆ 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 254 of file PerfMonMTSvc.cxx.
256 const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
267 if(compLevelDataMap.find(currentState) == compLevelDataMap.end()) {
268 compLevelDataMap.insert({currentState, std::make_unique<PMonMT::ComponentData>()});
279 compLevelDataMap[currentState]->addPointStart(meas, doMem);
283 "Step " << stepName <<
" , "
284 "Event " << ctx.evt() <<
" , "
285 "Slot " << ctx.slot() <<
" , "
286 "Context " << ctx.valid() <<
" , "
287 "Thread " << ithread <<
" , "
290 "Vmem " << meas.
vmem <<
" kb, "
291 "Malloc " << meas.
malloc <<
" kb");
◆ 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 217 of file PerfMonMTSvc.cxx.
219 if (
compName ==
"AthOutSeq" && stepName ==
"Start") {
226 if (
compName ==
"AthMasterSeq" && stepName ==
"Finalize") {
◆ stopAud()
void PerfMonMTSvc::stopAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName |
|
) |
| |
|
overridevirtual |
Stop Auditing.
Definition at line 202 of file PerfMonMTSvc.cxx.
209 auto const &ctx = Gaudi::Hive::currentContext();
◆ stopCompAud()
void PerfMonMTSvc::stopCompAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName, |
|
|
const EventContext & |
ctx |
|
) |
| |
Definition at line 297 of file PerfMonMTSvc.cxx.
299 const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
317 compLevelDataMap[currentState]->addPointStop(meas, doMem);
329 "Step " << stepName <<
" , "
330 "Event " << ctx.evt() <<
" , "
331 "Slot " << ctx.slot() <<
" , "
332 "Context " << ctx.valid() <<
" , "
333 "Thread " << ithread <<
" , "
334 "Cpu (" << compLevelDataMap[currentState]->m_tmp_cpu <<
":"
336 << (meas.
cpu_time - compLevelDataMap[currentState]->m_tmp_cpu) <<
":"
337 << compLevelDataMap[currentState]->m_delta_cpu <<
") ms, "
338 "Wall (" << compLevelDataMap[currentState]->m_tmp_wall <<
":"
340 << (meas.
wall_time - compLevelDataMap[currentState]->m_tmp_wall) <<
":"
341 << compLevelDataMap[currentState]->m_delta_wall <<
") ms, "
342 "Vmem (" << compLevelDataMap[currentState]->m_tmp_vmem <<
":"
344 << (meas.
vmem - compLevelDataMap[currentState]->m_tmp_vmem) <<
":"
345 << compLevelDataMap[currentState]->m_delta_vmem <<
") kb, "
346 "Malloc (" << compLevelDataMap[currentState]->m_tmp_malloc <<
":"
348 << (meas.
malloc - compLevelDataMap[currentState]->m_tmp_malloc) <<
":"
349 << compLevelDataMap[currentState]->m_delta_malloc <<
") kb");
◆ stopSnapshotAud()
void PerfMonMTSvc::stopSnapshotAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName |
|
) |
| |
◆ 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 137 of file PerfMonMTSvc.h.
◆ m_checkPointTime
std::atomic<double> PerfMonMTSvc::m_checkPointTime |
|
private |
◆ m_compLevelDataMap
◆ m_compLevelDataMap_1stevt
data_map_t PerfMonMTSvc::m_compLevelDataMap_1stevt |
|
private |
◆ m_compLevelDataMap_cbk
◆ m_compLevelDataMap_evt
◆ m_compLevelDataMap_fin
◆ m_compLevelDataMap_ini
◆ m_compLevelDataMap_plp
◆ m_compLevelDataMapVec
◆ 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 120 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 115 of file PerfMonMTSvc.h.
◆ m_eventCounter
std::atomic<uint64_t> PerfMonMTSvc::m_eventCounter |
|
private |
◆ m_eventLevelData
◆ m_eventLoopMsgCounter
std::atomic<uint64_t> PerfMonMTSvc::m_eventLoopMsgCounter |
|
private |
◆ 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 150 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 155 of file PerfMonMTSvc.h.
◆ m_fit_pss
◆ m_fit_vmem
◆ m_isEvtLoopStopped
std::atomic<bool> PerfMonMTSvc::m_isEvtLoopStopped |
|
private |
◆ m_isFirstEvent
std::atomic<bool> PerfMonMTSvc::m_isFirstEvent |
|
private |
◆ 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 127 of file PerfMonMTSvc.h.
◆ m_measurementEvents
◆ m_measurementSnapshots
◆ 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 133 of file PerfMonMTSvc.h.
◆ m_motherPID
int PerfMonMTSvc::m_motherPID |
|
private |
◆ m_mutex_capture
std::mutex PerfMonMTSvc::m_mutex_capture |
|
private |
◆ m_numberOfSlots
Gaudi::Property<int> PerfMonMTSvc::m_numberOfSlots {this, "numberOfSlots", 1, "Number of slots in the job."} |
|
private |
◆ m_numberOfThreads
Gaudi::Property<int> PerfMonMTSvc::m_numberOfThreads {this, "numberOfThreads", 1, "Number of threads in the job."} |
|
private |
◆ 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 130 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 143 of file PerfMonMTSvc.h.
◆ m_reportResultsToJSON
Gaudi::Property<bool> PerfMonMTSvc::m_reportResultsToJSON {this, "reportResultsToJSON", true, "Report results into the json file."} |
|
private |
◆ m_snapshotData
◆ m_snapshotStepNames
std::vector<std::string> PerfMonMTSvc::m_snapshotStepNames = {"Configure", "Initialize", "FirstEvent", "Execute", "Finalize"} |
|
private |
◆ m_stdoutVec_serial
std::vector<data_map_t> PerfMonMTSvc::m_stdoutVec_serial |
|
private |
◆ 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 141 of file PerfMonMTSvc.h.
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_doComponentLevelMonitoring
Do component level monitoring.
void report2JsonFile()
Report to the JSON File.
std::atomic< bool > m_isFirstEvent
void stopSnapshotAud(const std::string &stepName, const std::string &compName)
void report2Log_Description() const
int getCpuEfficiency() const
void report2Log_ComponentLevel()
const char * symb2lib(const char *symbol, const char *failstr)
data_map_t m_compLevelDataMap_fin
path
python interpreter configuration --------------------------------------—
Gaudi::Property< int > m_numberOfThreads
Get the number of threads.
PMonMT::SnapshotMeasurement m_measurementSnapshots
Measurement to capture snapshots.
data_map_t m_compLevelDataMap
void addPoint(const double &, const double &)
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 ...
int m_motherPID
Snapshots data.
void report2Log_CpuInfo() const
void report2Log_EnvInfo() const
std::atomic< uint64_t > m_eventCounter
int get_cpu_core_info() const
std::atomic< double > m_checkPointTime
Gaudi::Property< double > m_wallTimeOffset
Offset for the wall-time, comes from configuration.
void report2JsonFile_ComponentLevel(nlohmann::json &j) const
PerfMon::LinFitSglPass m_fit_vmem
std::string get_cpu_model_info() const
void stopCompAud(const std::string &stepName, const std::string &compName, const EventContext &ctx)
PMonMT::SnapshotMeasurement m_measurementEvents
Measurement to capture events.
Gaudi::Property< uint64_t > m_eventLoopMsgLimit
Set the number of messages for the event-level report.
void report2Log_EventLevel()
void startSnapshotAud(const std::string &stepName, const std::string &compName)
Snapshot Auditing: Take snapshots at the beginning and at the end of each step.
std::atomic< bool > m_isEvtLoopStopped
void report2Log_Summary()
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
data_map_t m_compLevelDataMap_ini
data_map_t m_compLevelDataMap_evt
std::vector< PMonMT::SnapshotData > m_snapshotData
void report2Log_EventLevel_instant() const
const EventMeasMap_t & getEventLevelData() const
PerfMon::LinFitSglPass m_fit_pss
void report2Log()
Report to log.
POOL::TEvent event(POOL::TEvent::kClassAccess)
int64_t getEventLevelMemoryMax(const std::string &stat) const
Gaudi::Property< bool > m_reportResultsToJSON
Report results to JSON.
Gaudi::Property< std::string > m_jsonFileName
Name of the JSON file.
void report2JsonFile_EventLevel(nlohmann::json &j) const
std::atomic< uint64_t > m_eventLoopMsgCounter
std::string scaleMem(int64_t memMeas) const
std::string scaleTime(double timeMeas) const
uint64_t get_memory_info() const
void report2JsonFile_Summary(nlohmann::json &j) const
std::vector< std::string > m_snapshotStepNames
const std::set< std::string > m_exclusionSet
Exclude some common components from monitoring In the future this might be converted to a inclusion s...
std::string to_string(const DetectorType &type)
int64_t getEventLevelMemory(const uint64_t event_count, const std::string &stat) const
std::mutex m_mutex_capture
Gaudi::Property< int > m_numberOfSlots
Get the number of slots.
Gaudi::Property< int > m_printNComps
Print the top N components.
Gaudi::Property< bool > m_printDetailedTables
Print detailed tables.
void aggregateSlotData()
A few helper functions.
void set_wall_time_offset(const double wall_time_offset)
std::vector< data_map_t > m_stdoutVec_serial
PMonMT::EventLevelData m_eventLevelData
uint64_t getNMeasurements() const
Gaudi::Property< bool > m_doEventLoopMonitoring
Do event loop monitoring.
Gaudi::Property< uint64_t > m_checkPointThreshold
Frequency of event level monitoring.
#define ATH_MSG_WARNING(x)
data_map_t m_compLevelDataMap_1stevt
Gaudi::Property< uint64_t > m_memFitLowerLimit
Lower limit (in number of events) for the memory fit.
#define ATLAS_THREAD_SAFE
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...
bool doesDirectoryExist(const std::string &dir)
std::vector< data_map_unique_t > m_compLevelDataMapVec
data_map_t m_compLevelDataMap_cbk
std::map< PMonMT::StepComp, std::unique_ptr< PMonMT::ComponentData > > data_map_unique_t
PMonMT::StepComp generate_state(const std::string &stepName, const std::string &compName) const
void report()
Report the results.
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.
double getEventLevelWallTime(const uint64_t event_count) const
data_map_t m_compLevelDataMap_plp
void recordEvent(const SnapshotMeasurement &meas, const int eventCount)
double getEventLevelCpuTime(const uint64_t event_count) const