 |
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 782 of file PerfMonMTSvc.cxx.
785 for (
const auto&
it : slotData) {
798 if(
it.second->getDeltaCPU() < 0) {
799 ATH_MSG_WARNING(
"Negative CPU-time measurement of " <<
it.second->getDeltaCPU() <<
800 " ms for component " <<
it.first.compName <<
801 " in step " <<
it.first.stepName);
803 if(
it.second->getDeltaWall() < 0) {
804 ATH_MSG_WARNING(
"Negative Wall-time measurement of " <<
it.second->getDeltaWall() <<
805 " ms for component " <<
it.first.compName <<
806 " in step " <<
it.first.stepName);
◆ divideData2Steps()
void PerfMonMTSvc::divideData2Steps |
( |
| ) |
|
Definition at line 815 of file PerfMonMTSvc.cxx.
817 if (
it.first.stepName ==
"Initialize")
819 else if (
it.first.stepName ==
"FirstEvent")
821 else if (
it.first.stepName ==
"Execute")
823 else if (
it.first.stepName ==
"Finalize")
825 else if (
it.first.stepName ==
"preLoadProxy")
827 else if (
it.first.stepName ==
"Callback")
◆ finalize()
StatusCode PerfMonMTSvc::finalize |
( |
| ) |
|
|
overridevirtual |
Standard Gaudi Service finalization.
Definition at line 94 of file PerfMonMTSvc.cxx.
98 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 892 of file PerfMonMTSvc.cxx.
900 std::string
line{
""};
903 if (
line.empty())
continue;
904 size_t splitIdx =
line.find(
':');
905 if (splitIdx != std::string::npos) {
906 std::string
val =
line.substr(splitIdx + 1);
907 if (
val.empty())
continue;
◆ get_memory_info()
uint64_t PerfMonMTSvc::get_memory_info |
( |
| ) |
const |
◆ getCpuEfficiency()
int PerfMonMTSvc::getCpuEfficiency |
( |
| ) |
const |
|
private |
Definition at line 352 of file PerfMonMTSvc.cxx.
360 const double totalCpuTime =
367 const double scaledWallTime =
374 return ( scaledWallTime > 0 ? totalCpuTime / scaledWallTime * 100. : 0 );
◆ handle()
void PerfMonMTSvc::handle |
( |
const Incident & |
incident | ) |
|
|
overridevirtual |
Incident service handle for post-finalize.
Definition at line 104 of file PerfMonMTSvc.cxx.
106 if (inc.type() == IncidentType::BeginEvent) {
161 else if (inc.type() ==
"EndEvtLoop") {
167 else if (inc.type() == IncidentType::SvcPostFinalize) {
◆ initialize()
StatusCode PerfMonMTSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Standard Gaudi Service initialization.
Configure the auditor
Definition at line 48 of file PerfMonMTSvc.cxx.
55 const long highestPriority =
static_cast<long>(-1);
56 const long lowestPriority = 0;
57 incSvc->addListener(
this, IncidentType::BeginEvent, highestPriority);
58 incSvc->addListener(
this,
"EndAlgorithms", lowestPriority);
59 incSvc->addListener(
this,
"EndEvtLoop", highestPriority);
60 incSvc->addListener(
this, IncidentType::SvcPostFinalize);
65 ATH_MSG_INFO(
"The system doesn't support /proc. Therefore, memory measurements are not available");
70 "analyzing [" <<
m_numberOfSlots.toString() <<
"] events concurrently");
73 ATH_MSG_INFO(
" >> Component-level memory monitoring in the event-loop is disabled in jobs with more than 1 thread");
86 ATH_CHECK(auditorSvc()->addAuditor(
"PerfMonMTAuditor"));
88 return StatusCode::SUCCESS;
◆ report()
void PerfMonMTSvc::report |
( |
| ) |
|
◆ report2JsonFile()
void PerfMonMTSvc::report2JsonFile |
( |
| ) |
|
Report to the JSON File.
Definition at line 613 of file PerfMonMTSvc.cxx.
629 o << std::setw(4) << j << std::endl;
634 int rc = std::system(
cmd.c_str());
◆ report2JsonFile_ComponentLevel()
void PerfMonMTSvc::report2JsonFile_ComponentLevel |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 721 of file PerfMonMTSvc.cxx.
725 for(
const auto& meas : dataMapPerStep){
727 const std::string
step = meas.first.stepName;
728 const std::string component = meas.first.compName;
730 const double cpuTime = meas.second->getDeltaCPU();
731 const double wallTime = meas.second->getDeltaWall();
732 const int64_t vmem = meas.second->getDeltaVmem();
733 const int64_t mall = meas.second->getDeltaMalloc();
735 j[
"componentLevel"][
step][component] = {{
"count",
count},
736 {
"cpuTime", cpuTime},
737 {
"wallTime", wallTime},
◆ report2JsonFile_EventLevel()
void PerfMonMTSvc::report2JsonFile_EventLevel |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 746 of file PerfMonMTSvc.cxx.
751 const double cpuTime =
it.second.cpu_time;
752 const double wallTime =
it.second.wall_time;
753 const int64_t vmem =
it.second.mem_stats.at(
"vmem");
754 const int64_t rss =
it.second.mem_stats.at(
"rss");
755 const int64_t pss =
it.second.mem_stats.at(
"pss");
756 const int64_t
swap =
it.second.mem_stats.at(
"swap");
759 {
"wallTime", wallTime},
◆ report2JsonFile_Summary()
void PerfMonMTSvc::report2JsonFile_Summary |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 651 of file PerfMonMTSvc.cxx.
659 const double cpuUtil = dCPU / dWall;
665 j[
"summary"][
"snapshotLevel"][
step] = {{
"dCPU", dCPU},
667 {
"cpuUtil", cpuUtil},
677 j[
"summary"][
"nEvents"] =
nEvents;
685 j[
"summary"][
"peaks"] = {{
"vmemPeak", vmemPeak},
686 {
"rssPeak", rssPeak},
687 {
"pssPeak", pssPeak},
688 {
"swapPeak", swapPeak}};
695 j[
"summary"][
"leakEstimates"] = {{
"vmemLeak", vmemLeak},
696 {
"pssLeak", pssLeak},
697 {
"nPoints", nPoints}};
704 j[
"summary"][
"sysInfo"] = {{
"cpuModel", cpuModel},
705 {
"coreNum", coreNum},
712 j[
"summary"][
"envInfo"] = {{
"mallocLib", mallocLib},
713 {
"mathLib", mathLib}};
717 j[
"summary"][
"misc"] = {{
"cpuUtilEff", cpuUtilEff}};
◆ report2Log()
void PerfMonMTSvc::report2Log |
( |
| ) |
|
◆ report2Log_ComponentLevel()
void PerfMonMTSvc::report2Log_ComponentLevel |
( |
| ) |
|
Definition at line 434 of file PerfMonMTSvc.cxx.
436 ATH_MSG_INFO(
"=======================================================================================");
438 ATH_MSG_INFO(
"=======================================================================================");
441 "Vmem [kB]",
"Malloc [kB]",
"Component"));
443 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
450 std::vector<std::pair<PMonMT::StepComp, PMonMT::ComponentData*>>
pairs;
451 for (
auto itr = vec_itr.begin(); itr != vec_itr.end(); ++itr)
pairs.push_back(*itr);
454 [=](std::pair<PMonMT::StepComp, PMonMT::ComponentData*>&
a,
455 std::pair<PMonMT::StepComp, PMonMT::ComponentData*>&
b) {
456 return a.second->getDeltaCPU() > b.second->getDeltaCPU();
468 it.second->getCallCount(),
it.second->getDeltaCPU(),
it.second->getDeltaVmem(),
469 it.second->getDeltaMalloc(),
it.first.compName));
472 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_CpuInfo()
void PerfMonMTSvc::report2Log_CpuInfo |
( |
| ) |
const |
Definition at line 584 of file PerfMonMTSvc.cxx.
587 ATH_MSG_INFO(
"=======================================================================================");
592 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_Description()
void PerfMonMTSvc::report2Log_Description |
( |
| ) |
const |
Definition at line 417 of file PerfMonMTSvc.cxx.
418 ATH_MSG_INFO(
"=======================================================================================");
420 ATH_MSG_INFO(
"=======================================================================================");
423 ATH_MSG_INFO(
"*** In order to make plots using the results run the following commands:");
425 ATH_MSG_INFO(
"*** In order to print tables using the results run the following commands:");
427 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EnvInfo()
void PerfMonMTSvc::report2Log_EnvInfo |
( |
| ) |
const |
Definition at line 598 of file PerfMonMTSvc.cxx.
601 ATH_MSG_INFO(
"=======================================================================================");
606 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EventLevel()
void PerfMonMTSvc::report2Log_EventLevel |
( |
| ) |
|
Definition at line 497 of file PerfMonMTSvc.cxx.
501 " and the last measurements are explicitly printed)");
502 ATH_MSG_INFO(
"=======================================================================================");
505 "Wall [s]",
"Vmem [kB]",
"Rss [kB]",
"Pss [kB]",
"Swap [kB]"));
507 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
519 it.second.cpu_time * 0.001,
it.second.wall_time * 0.001,
it.second.mem_stats.at(
"vmem"),
520 it.second.mem_stats.at(
"rss"),
it.second.mem_stats.at(
"pss"),
it.second.mem_stats.at(
"swap")));
529 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EventLevel_instant()
void PerfMonMTSvc::report2Log_EventLevel_instant |
( |
| ) |
const |
◆ report2Log_Summary()
void PerfMonMTSvc::report2Log_Summary |
( |
| ) |
|
Definition at line 535 of file PerfMonMTSvc.cxx.
538 ATH_MSG_INFO(
"=======================================================================================");
541 "dCPU [s]",
"dWall [s]",
"<CPU>",
"dVmem [kB]",
"dRss [kB]",
"dPss [kB]",
"dSwap [kB]"));
543 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
554 ATH_MSG_INFO(
"***************************************************************************************");
562 (wall_exec_total > 0 ?
m_eventCounter / wall_exec_total * 1000. : 0)));
565 ATH_MSG_INFO(
"***************************************************************************************");
570 ATH_MSG_INFO(
"***************************************************************************************");
574 <<
" measurements from the Event Level Monitoring");
578 ATH_MSG_INFO(
"=======================================================================================");
◆ scaleMem()
std::string PerfMonMTSvc::scaleMem |
( |
int64_t |
memMeas | ) |
const |
Definition at line 862 of file PerfMonMTSvc.cxx.
870 std::ostringstream
ss;
872 ss << std::setprecision(2);
875 std::vector<std::string> significance = {
"KB",
"MB",
"GB",
"TB"};
878 int64_t absMemMeas = std::abs(memMeas);
886 return ss.str() +
" " + significance[
order];
◆ scaleTime()
std::string PerfMonMTSvc::scaleTime |
( |
double |
timeMeas | ) |
const |
Definition at line 838 of file PerfMonMTSvc.cxx.
841 auto ms =
static_cast<int64_t
>(timeMeas);
844 auto hrs =
ms / 3600000;
847 auto mins =
ms / 60000;
850 auto secs =
ms / 1000;
854 std::stringstream
ss;
856 ss << std::setw(2) << hrs <<
"h" <<
857 std::setw(2) << mins <<
"m" <<
858 std::setw(2) << secs <<
"s";
◆ startAud()
void PerfMonMTSvc::startAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName |
|
) |
| |
|
overridevirtual |
Start Auditing.
Definition at line 180 of file PerfMonMTSvc.cxx.
191 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 251 of file PerfMonMTSvc.cxx.
253 const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
264 if(compLevelDataMap.find(currentState) == compLevelDataMap.end()) {
265 compLevelDataMap.insert({currentState, std::make_unique<PMonMT::ComponentData>()});
276 compLevelDataMap[currentState]->addPointStart(meas, doMem);
280 "Step " << stepName <<
" , "
281 "Event " << ctx.evt() <<
" , "
282 "Slot " << ctx.slot() <<
" , "
283 "Context " << ctx.valid() <<
" , "
284 "Thread " << ithread <<
" , "
287 "Vmem " << meas.
vmem <<
" kb, "
288 "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 214 of file PerfMonMTSvc.cxx.
216 if (
compName ==
"AthOutSeq" && stepName ==
"Start") {
223 if (
compName ==
"AthMasterSeq" && stepName ==
"Finalize") {
◆ stopAud()
void PerfMonMTSvc::stopAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName |
|
) |
| |
|
overridevirtual |
Stop Auditing.
Definition at line 199 of file PerfMonMTSvc.cxx.
206 auto const &ctx = Gaudi::Hive::currentContext();
◆ stopCompAud()
void PerfMonMTSvc::stopCompAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName, |
|
|
const EventContext & |
ctx |
|
) |
| |
Definition at line 294 of file PerfMonMTSvc.cxx.
296 const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
314 compLevelDataMap[currentState]->addPointStop(meas, doMem);
326 "Step " << stepName <<
" , "
327 "Event " << ctx.evt() <<
" , "
328 "Slot " << ctx.slot() <<
" , "
329 "Context " << ctx.valid() <<
" , "
330 "Thread " << ithread <<
" , "
331 "Cpu (" << compLevelDataMap[currentState]->m_tmp_cpu <<
":"
333 << (meas.
cpu_time - compLevelDataMap[currentState]->m_tmp_cpu) <<
":"
334 << compLevelDataMap[currentState]->m_delta_cpu <<
") ms, "
335 "Wall (" << compLevelDataMap[currentState]->m_tmp_wall <<
":"
337 << (meas.
wall_time - compLevelDataMap[currentState]->m_tmp_wall) <<
":"
338 << compLevelDataMap[currentState]->m_delta_wall <<
") ms, "
339 "Vmem (" << compLevelDataMap[currentState]->m_tmp_vmem <<
":"
341 << (meas.
vmem - compLevelDataMap[currentState]->m_tmp_vmem) <<
":"
342 << compLevelDataMap[currentState]->m_delta_vmem <<
") kb, "
343 "Malloc (" << compLevelDataMap[currentState]->m_tmp_malloc <<
":"
345 << (meas.
malloc - compLevelDataMap[currentState]->m_tmp_malloc) <<
":"
346 << 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 &)
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...
constexpr int pow(int base, int exp) noexcept
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