|
ATLAS Offline Software
|
#include <PerfMonMTSvc.h>
|
| 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 |
|
|
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 166 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 812 of file PerfMonMTSvc.cxx.
815 for (
const auto&
it : slotData) {
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);
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);
◆ divideData2Steps()
void PerfMonMTSvc::divideData2Steps |
( |
| ) |
|
Definition at line 845 of file PerfMonMTSvc.cxx.
847 if (
it.first.stepName ==
"Initialize")
849 else if (
it.first.stepName ==
"FirstEvent")
851 else if (
it.first.stepName ==
"Execute")
853 else if (
it.first.stepName ==
"Finalize")
855 else if (
it.first.stepName ==
"preLoadProxy")
857 else if (
it.first.stepName ==
"Callback")
◆ finalize()
StatusCode PerfMonMTSvc::finalize |
( |
| ) |
|
|
overridevirtual |
◆ 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 922 of file PerfMonMTSvc.cxx.
930 std::string
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;
◆ get_memory_info()
uint64_t PerfMonMTSvc::get_memory_info |
( |
| ) |
const |
◆ getCpuEfficiency()
int PerfMonMTSvc::getCpuEfficiency |
( |
| ) |
const |
|
private |
Definition at line 374 of file PerfMonMTSvc.cxx.
382 const double totalCpuTime =
389 const double scaledWallTime =
396 return ( scaledWallTime > 0 ? totalCpuTime / scaledWallTime * 100. : 0 );
◆ handle()
void PerfMonMTSvc::handle |
( |
const Incident & |
incident | ) |
|
|
overridevirtual |
Incident service handle for post-finalize.
Definition at line 126 of file PerfMonMTSvc.cxx.
128 if (inc.type() == IncidentType::BeginEvent) {
183 else if (inc.type() ==
"EndEvtLoop") {
189 else if (inc.type() == IncidentType::SvcPostFinalize) {
◆ initialize()
StatusCode PerfMonMTSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Standard Gaudi Service initialization.
Configure the auditor
Definition at line 68 of file PerfMonMTSvc.cxx.
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);
85 ATH_MSG_INFO(
"The system doesn't support /proc. Therefore, memory measurements are not available");
90 "analyzing [" <<
m_numberOfSlots.toString() <<
"] events concurrently");
93 ATH_MSG_INFO(
" >> Component-level memory monitoring in the event-loop is disabled in jobs with more than 1 thread");
107 ATH_MSG_ERROR(
"Could not register auditor [PerfMonMTAuditor]!");
108 return StatusCode::FAILURE;
110 return StatusCode::SUCCESS;
◆ interfaceID()
const InterfaceID & IPerfMonMTSvc::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Framework - Service InterfaceID.
Definition at line 37 of file IPerfMonMTSvc.h.
39 static const InterfaceID IID_IPerfMonMTSvc(
"IPerfMonMTSvc", 1, 0);
40 return IID_IPerfMonMTSvc;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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.
54 return StatusCode::FAILURE;
59 return StatusCode::SUCCESS;
62 return AthService::queryInterface(riid, ppvInterface);
◆ report()
void PerfMonMTSvc::report |
( |
| ) |
|
◆ report2JsonFile()
void PerfMonMTSvc::report2JsonFile |
( |
| ) |
|
Report to the JSON File.
Definition at line 643 of file PerfMonMTSvc.cxx.
659 o << std::setw(4) << j << std::endl;
664 int rc = std::system(
cmd.c_str());
◆ report2JsonFile_ComponentLevel()
void PerfMonMTSvc::report2JsonFile_ComponentLevel |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 751 of file PerfMonMTSvc.cxx.
755 for(
const auto& meas : dataMapPerStep){
757 const std::string
step = meas.first.stepName;
758 const std::string component = meas.first.compName;
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();
765 j[
"componentLevel"][
step][component] = {{
"count",
count},
766 {
"cpuTime", cpuTime},
767 {
"wallTime", wallTime},
◆ report2JsonFile_EventLevel()
void PerfMonMTSvc::report2JsonFile_EventLevel |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 776 of file PerfMonMTSvc.cxx.
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");
789 {
"wallTime", wallTime},
◆ report2JsonFile_Summary()
void PerfMonMTSvc::report2JsonFile_Summary |
( |
nlohmann::json & |
j | ) |
const |
Definition at line 681 of file PerfMonMTSvc.cxx.
689 const double cpuUtil = dCPU / dWall;
695 j[
"summary"][
"snapshotLevel"][
step] = {{
"dCPU", dCPU},
697 {
"cpuUtil", cpuUtil},
707 j[
"summary"][
"nEvents"] =
nEvents;
715 j[
"summary"][
"peaks"] = {{
"vmemPeak", vmemPeak},
716 {
"rssPeak", rssPeak},
717 {
"pssPeak", pssPeak},
718 {
"swapPeak", swapPeak}};
725 j[
"summary"][
"leakEstimates"] = {{
"vmemLeak", vmemLeak},
726 {
"pssLeak", pssLeak},
727 {
"nPoints", nPoints}};
734 j[
"summary"][
"sysInfo"] = {{
"cpuModel", cpuModel},
735 {
"coreNum", coreNum},
742 j[
"summary"][
"envInfo"] = {{
"mallocLib", mallocLib},
743 {
"mathLib", mathLib}};
747 j[
"summary"][
"misc"] = {{
"cpuUtilEff", cpuUtilEff}};
◆ report2Log()
void PerfMonMTSvc::report2Log |
( |
| ) |
|
◆ report2Log_ComponentLevel()
void PerfMonMTSvc::report2Log_ComponentLevel |
( |
| ) |
|
Definition at line 456 of file PerfMonMTSvc.cxx.
459 ATH_MSG_INFO(
"=======================================================================================");
461 ATH_MSG_INFO(
"=======================================================================================");
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");
466 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
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);
477 [=](std::pair<PMonMT::StepComp, PMonMT::ComponentData*>&
a,
478 std::pair<PMonMT::StepComp, PMonMT::ComponentData*>&
b) {
479 return a.second->getDeltaCPU() > b.second->getDeltaCPU();
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);
495 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_CpuInfo()
void PerfMonMTSvc::report2Log_CpuInfo |
( |
| ) |
const |
Definition at line 610 of file PerfMonMTSvc.cxx.
614 ATH_MSG_INFO(
"=======================================================================================");
620 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_Description()
void PerfMonMTSvc::report2Log_Description |
( |
| ) |
const |
Definition at line 439 of file PerfMonMTSvc.cxx.
440 ATH_MSG_INFO(
"=======================================================================================");
442 ATH_MSG_INFO(
"=======================================================================================");
445 ATH_MSG_INFO(
"*** In order to make plots using the results run the following commands:");
447 ATH_MSG_INFO(
"*** In order to print tables using the results run the following commands:");
449 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EnvInfo()
void PerfMonMTSvc::report2Log_EnvInfo |
( |
| ) |
const |
Definition at line 626 of file PerfMonMTSvc.cxx.
631 ATH_MSG_INFO(
"=======================================================================================");
636 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EventLevel()
void PerfMonMTSvc::report2Log_EventLevel |
( |
| ) |
|
Definition at line 520 of file PerfMonMTSvc.cxx.
525 " and the last measurements are explicitly printed)");
526 ATH_MSG_INFO(
"=======================================================================================");
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]");
531 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
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"));
553 ATH_MSG_INFO(
"=======================================================================================");
◆ report2Log_EventLevel_instant()
void PerfMonMTSvc::report2Log_EventLevel_instant |
( |
| ) |
const |
◆ report2Log_Summary()
void PerfMonMTSvc::report2Log_Summary |
( |
| ) |
|
Definition at line 559 of file PerfMonMTSvc.cxx.
563 ATH_MSG_INFO(
"=======================================================================================");
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]");
568 ATH_MSG_INFO(
"---------------------------------------------------------------------------------------");
571 ATH_MSG_INFO(
format(
"%1% %|13t|%2% %|25t|%3% %|37t|%4$.2f %|44t|%5% %|55t|%6% %|66t|%7% %|77t|%8%") %
579 ATH_MSG_INFO(
"***************************************************************************************");
587 (wall_exec_total > 0 ?
m_eventCounter / wall_exec_total * 1000. : 0));
591 ATH_MSG_INFO(
"***************************************************************************************");
596 ATH_MSG_INFO(
"***************************************************************************************");
600 <<
" measurements from the Event Level Monitoring");
604 ATH_MSG_INFO(
"=======================================================================================");
◆ scaleMem()
std::string PerfMonMTSvc::scaleMem |
( |
int64_t |
memMeas | ) |
const |
Definition at line 892 of file PerfMonMTSvc.cxx.
900 std::ostringstream
ss;
902 ss << std::setprecision(2);
905 std::vector<std::string> significance = {
"KB",
"MB",
"GB",
"TB"};
908 int64_t absMemMeas = std::abs(memMeas);
916 return ss.str() +
" " + significance[
order];
◆ scaleTime()
std::string PerfMonMTSvc::scaleTime |
( |
double |
timeMeas | ) |
const |
Definition at line 868 of file PerfMonMTSvc.cxx.
871 auto ms =
static_cast<int64_t
>(timeMeas);
874 auto hrs =
ms / 3600000;
877 auto mins =
ms / 60000;
880 auto secs =
ms / 1000;
884 std::stringstream
ss;
886 ss << std::setw(2) << hrs <<
"h" <<
887 std::setw(2) << mins <<
"m" <<
888 std::setw(2) << secs <<
"s";
◆ startAud()
void PerfMonMTSvc::startAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName |
|
) |
| |
|
overridevirtual |
◆ 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.
275 const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
286 if(compLevelDataMap.find(currentState) == compLevelDataMap.end()) {
287 compLevelDataMap.insert({currentState, std::make_unique<PMonMT::ComponentData>()});
298 compLevelDataMap[currentState]->addPointStart(meas, doMem);
302 "Step " << stepName <<
" , "
303 "Event " << ctx.evt() <<
" , "
304 "Slot " << ctx.slot() <<
" , "
305 "Context " << ctx.valid() <<
" , "
306 "Thread " << ithread <<
" , "
309 "Vmem " << meas.
vmem <<
" kb, "
310 "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 236 of file PerfMonMTSvc.cxx.
238 if (
compName ==
"AthOutSeq" && stepName ==
"Start") {
245 if (
compName ==
"AthMasterSeq" && stepName ==
"Finalize") {
◆ stopAud()
void PerfMonMTSvc::stopAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName |
|
) |
| |
|
overridevirtual |
◆ stopCompAud()
void PerfMonMTSvc::stopCompAud |
( |
const std::string & |
stepName, |
|
|
const std::string & |
compName, |
|
|
const EventContext & |
ctx |
|
) |
| |
Definition at line 316 of file PerfMonMTSvc.cxx.
318 const unsigned int ithread = (ctx.valid() && tbb::this_task_arena::current_thread_index() > -1) ? tbb::this_task_arena::current_thread_index() : 0;
336 compLevelDataMap[currentState]->addPointStop(meas, doMem);
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 <<
":"
355 << (meas.
cpu_time - compLevelDataMap[currentState]->m_tmp_cpu) <<
":"
356 << compLevelDataMap[currentState]->m_delta_cpu <<
") ms, "
357 "Wall (" << compLevelDataMap[currentState]->m_tmp_wall <<
":"
359 << (meas.
wall_time - compLevelDataMap[currentState]->m_tmp_wall) <<
":"
360 << compLevelDataMap[currentState]->m_delta_wall <<
") ms, "
361 "Vmem (" << compLevelDataMap[currentState]->m_tmp_vmem <<
":"
363 << (meas.
vmem - compLevelDataMap[currentState]->m_tmp_vmem) <<
":"
364 << compLevelDataMap[currentState]->m_delta_vmem <<
") kb, "
365 "Malloc (" << compLevelDataMap[currentState]->m_tmp_malloc <<
":"
367 << (meas.
malloc - compLevelDataMap[currentState]->m_tmp_malloc) <<
":"
368 << 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 140 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 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 |
◆ 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 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
◆ 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 130 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 136 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 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 |
◆ 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 144 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()
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.
EventMeasMap_t getEventLevelData() const
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
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)
const char * symb2lib(const char *symbol, const char *failstr="unknown")
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.
static const InterfaceID & interfaceID()
Framework - Service InterfaceID.
#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