Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::runtime::DistStatManager Class Reference

Class responsible for tracking all statistics of a running distributed Galois program and reporting them at the end of program execution. More...

#include <DistStats.h>

Inheritance diagram for galois::runtime::DistStatManager:
galois::runtime::StatManager

Public Member Functions

 DistStatManager (const std::string &outfile="")
 Dist stat manager constructor. More...
 
 ~DistStatManager ()
 
template<typename T >
void addToStat (const Str &region, const Str &category, const T &val, const StatTotal::Type &thrdTotalTy, const StatTotal::Type &hTotalTy)
 Adds a statistic to the statistics manager. More...
 
- Public Member Functions inherited from galois::runtime::StatManager
 StatManager (const std::string &outfile="")
 
virtual ~StatManager ()
 
void setStatFile (const std::string &outfile)
 
template<typename S1 , typename S2 , typename T , typename = std::enable_if_t<std::is_integral<T>::value || std::is_floating_point<T>::value>>
void addToStat (const S1 &region, const S2 &category, const T &val, const StatTotal::Type &type)
 
template<typename S1 , typename S2 , typename V >
void addToParam (const S1 &region, const S2 &category, const V &val)
 
void print (void)
 

Protected Member Functions

void mergeStats (void)
 Merge all stats from each individual thread as well as each individual host as prescribed the the reduction (Total) type specified for each statistic. More...
 
void printHeader (std::ostream &out) const
 Print the header of the stats file output. More...
 
virtual void printStats (std::ostream &out)
 Merge all stats. More...
 
- Protected Member Functions inherited from galois::runtime::StatManager
void mergeStats (void)
 
int_iterator intBegin (void) const
 
int_iterator intEnd (void) const
 
fp_iterator fpBegin (void) const
 
fp_iterator fpEnd (void) const
 
str_iterator paramBegin (void) const
 
str_iterator paramEnd (void) const
 
template<typename S , typename V >
void readIntStat (const int_iterator &i, S &region, S &category, int64_t &total, StatTotal::Type &type, V &vec) const
 
template<typename S , typename V >
void readFPstat (const fp_iterator &i, S &region, S &category, double &total, StatTotal::Type &type, V &vec) const
 
template<typename S , typename V >
void readParam (const str_iterator &i, S &region, S &category, Str &total, StatTotal::Type &type, V &vec) const
 
void printHeader (std::ostream &out) const
 

Friends

class galois::runtime::StatRecvHelper
 Friend class that helps with receiving stats. More...
 

Additional Inherited Members

- Public Types inherited from galois::runtime::StatManager
using Str = galois::gstl::Str
 
- Static Public Member Functions inherited from galois::runtime::StatManager
static bool printingThreadVals (void)
 
template<typename T >
static constexpr const char * statKind (void)
 
- Static Public Attributes inherited from galois::runtime::StatManager
static constexpr const char *const SEP = ", "
 
static constexpr const char *const TSTAT_SEP = "; "
 
static constexpr const char *const TSTAT_NAME = "ThreadValues"
 
static constexpr const char *const TSTAT_ENV_VAR = "PRINT_PER_THREAD_STATS"
 

Detailed Description

Class responsible for tracking all statistics of a running distributed Galois program and reporting them at the end of program execution.

Constructor & Destructor Documentation

DistStatManager::DistStatManager ( const std::string &  outfile = "")

Dist stat manager constructor.

DistStatManager::~DistStatManager ( )

Member Function Documentation

template<typename T >
void galois::runtime::DistStatManager::addToStat ( const Str &  region,
const Str &  category,
const T &  val,
const StatTotal::Type thrdTotalTy,
const StatTotal::Type hTotalTy 
)
inline

Adds a statistic to the statistics manager.

Parameters
regionRegion name to give statistic
categoryCategory of statistic
valValue of the statistic
thrdTotalTyThe type of reduction used to combine thread statistics of the same kind
hTotalTyThe type of reduction used to combine host statistics of the same kind
void DistStatManager::mergeStats ( void  )
protected

Merge all stats from each individual thread as well as each individual host as prescribed the the reduction (Total) type specified for each statistic.

void DistStatManager::printHeader ( std::ostream &  out) const
protected

Print the header of the stats file output.

Parameters
outFile to print header out to
void DistStatManager::printStats ( std::ostream &  out)
protectedvirtual

Merge all stats.

Host 0 will then print out all collected stats.

Reimplemented from galois::runtime::StatManager.

Friends And Related Function Documentation

friend class galois::runtime::StatRecvHelper
friend

Friend class that helps with receiving stats.


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