SST  15.1.0
StructuralSimulationToolkit
SST::Util::BasicPerfTracker Class Reference

Class used to track various performance data during simulation execution. More...

#include <basicPerf.h>

Public Member Functions

void initialize (int rank, int num_ranks)
 
RegionPerfInfo getRegionPerfInfo (const std::string &name)
 
void beginRegion (const std::string &tag)
 Begin a new code region.
 
void endRegion (const std::string &tag)
 End the named region. More...
 
double getRegionBeginTime (const std::string &tag)
 Get the local begin time for the specified region.
 
double getRegionEndTime (const std::string &tag)
 Get the local ending time for the specified region.
 
double getRegionDuration (const std::string &tag)
 Get the local duration for the specified region.
 
double getRegionGlobalDuration (const std::string &tag)
 Get the global duration for the specified region.
 
uint64_t getLocalRegionBeginMemSize (const std::string &tag)
 Get the local memory size at begin for the specified region. More...
 
uint64_t getGlobalTotalRegionBeginMemSize (const std::string &tag)
 Get the global total memory size at begin for the specified region. More...
 
std::pair< uint64_t, int > getGlobalMaxRegionBeginMemSize (const std::string &tag)
 Get the global max memory size at begin for the specified region. More...
 
uint64_t getLocalRegionEndMemSize (const std::string &tag)
 Get the local memory size at end for the specified region. More...
 
uint64_t getGlobalTotalRegionEndMemSize (const std::string &tag)
 Get the global total memory size at end for the specified region. More...
 
std::pair< uint64_t, int > getGlobalMaxRegionEndMemSize (const std::string &tag)
 Get the global max memory size at end for the specified region. More...
 
void addMetric (const std::string &name, uint64_t value)
 
void addMetric (const std::string &name, int64_t value)
 
void addMetric (const std::string &name, double value)
 
uint64_t getMetricUnsigned (const std::string &name)
 
int64_t getMetricSigned (const std::string &name)
 
double getMetricFloat (const std::string &name)
 
void outputRegionData (Output &out, size_t verbose)
 

Detailed Description

Class used to track various performance data during simulation execution.

Regions:

Regions are tracked hierarchically and you can output various levels of data based on the verbose value supplied to the output functions. Each region is denoted using beginRegion() and endRegion(). Each region can be contained with another region, but it must be wholly contained within that region. For output, the verbose value can be used to indicate how much detail to output. The verbose value indicates how deep to print in the region hierarchy. A verbose value of 0 indicates no output, 1 will output only the top level regions, etc. The default verbose level is 2.

Scalars:

Scalars are tracked using the addMetric<>() function and are retrieved by using the getMetric<>() function. These can only track signed and unsigned ints and floating point numbers. All types are stored as their 64-bit versions.

Member Function Documentation

◆ endRegion()

void SST::Util::BasicPerfTracker::endRegion ( const std::string &  tag)

End the named region.

This will cause a series of collectives to gather the total and max resource utilizations for the region. This data will be kept on all ranks.

Begin memory ///

End memory ///

◆ getGlobalMaxRegionBeginMemSize()

std::pair< uint64_t, int > SST::Util::BasicPerfTracker::getGlobalMaxRegionBeginMemSize ( const std::string &  tag)

Get the global max memory size at begin for the specified region.

Returns
pair of max memory usage in bytes and the rank that usage was from

◆ getGlobalMaxRegionEndMemSize()

std::pair< uint64_t, int > SST::Util::BasicPerfTracker::getGlobalMaxRegionEndMemSize ( const std::string &  tag)

Get the global max memory size at end for the specified region.

Returns
pair of max memory usage in bytes and the rank that usage was from

◆ getGlobalTotalRegionBeginMemSize()

uint64_t SST::Util::BasicPerfTracker::getGlobalTotalRegionBeginMemSize ( const std::string &  tag)

Get the global total memory size at begin for the specified region.

Returns
global total memory usage in bytes

◆ getGlobalTotalRegionEndMemSize()

uint64_t SST::Util::BasicPerfTracker::getGlobalTotalRegionEndMemSize ( const std::string &  tag)

Get the global total memory size at end for the specified region.

Returns
global total memory usage in bytes

◆ getLocalRegionBeginMemSize()

uint64_t SST::Util::BasicPerfTracker::getLocalRegionBeginMemSize ( const std::string &  tag)

Get the local memory size at begin for the specified region.

Returns
local memory usage in bytes

◆ getLocalRegionEndMemSize()

uint64_t SST::Util::BasicPerfTracker::getLocalRegionEndMemSize ( const std::string &  tag)

Get the local memory size at end for the specified region.

Returns
local memory usage in bytes

The documentation for this class was generated from the following files: