|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef PERFMONCOMPS_PERFMONMTUTILS_H
10 #define PERFMONCOMPS_PERFMONMTUTILS_H
64 return std::make_pair(this->stepName, this->compName) < std::make_pair(
sc.stepName,
sc.compName);
87 malloc = PMonSD::get_malloc_kb();
232 const std::string&
stat)
const {
310 struct timespec ctime;
314 return static_cast<double>(ctime.tv_sec * 1.e3 + ctime.tv_nsec * 1.e-6);
346 static const std::string
fileName =
"/proc/self/smaps";
358 if (
key ==
"Size:") {
367 if (
key ==
"Swap:") {
382 static const std::string
fileName =
"/proc/self/statm";
385 std::string vmem_in_pages{},
line{};
388 if (getline(statm_file,
line)) {
389 std::stringstream
ss{
line};
393 static const double page_size = sysconf(_SC_PAGESIZE) / 1024.0;
394 result = std::stod(vmem_in_pages) * page_size;
401 for (
auto it : map1) {
402 result_map[
it.first] = map1.at(
it.first) - map2.at(
it.first);
415 #endif // PERFMONCOMPS_PERFMONMTUTILS_H
void addPointStart(const ComponentMeasurement &meas, const bool doMem=false)
int64_t getMemMonDeltaMap(const std::string &mem_stat) const
void add2DeltaWall(double val)
uint64_t getCallCount() const
bool operator<(const StepComp &sc) const
void add2DeltaWall(double val)
EventMeasMap_t getEventLevelData() const
double getDeltaCPU() const
double get_process_cpu_time()
bool capture_memory ATLAS_NOT_THREAD_SAFE()
MemoryMap_t operator-(const MemoryMap_t &map1, const MemoryMap_t &map2)
void add2DeltaMalloc(double val)
void add2DeltaCPU(double val)
int64_t getEventLevelMemoryMax(const std::string &stat) const
void add2DeltaVmem(double val)
double getDeltaWall() const
struct timespec clock_gettime()
EventMeasMap_t m_eventLevelDeltaMap
MemoryMap_t m_memMonDeltaMap
int64_t getEventLevelMemory(const uint64_t event_count, const std::string &stat) const
MemoryMap_t get_mem_stats()
void set_wall_time_offset(const double wall_time_offset)
double getDeltaVmem() const
uint64_t getNMeasurements() const
void add2DeltaCPU(double val)
double getDeltaMalloc() const
std::map< std::string, int64_t > MemoryMap_t
void addPointStart(const SnapshotMeasurement &meas)
void add2CallCount(uint64_t val)
void addPointStop(const SnapshotMeasurement &meas)
void addPointStop(const ComponentMeasurement &meas, const bool doMem=false)
double getDeltaWall() const
double get_thread_cpu_time()
Define macros for attributes used to control the static checker.
std::map< uint64_t, SnapshotMeasurement > EventMeasMap_t
bool doesDirectoryExist(const std::string &dir)
double getDeltaCPU() const
double getEventLevelWallTime(const uint64_t event_count) const
MemoryMap_t m_memMonTmpMap
void recordEvent(const SnapshotMeasurement &meas, const int eventCount)
double getEventLevelCpuTime(const uint64_t event_count) const