HTGS  v2.0
The Hybrid Task Graph Scheduler
htgs::TaskManagerProfile Class Reference

Implements a task manager profile that holds profiling data for a task manager. More...

#include <htgs/core/graph/profile/TaskManagerProfile.hpp>

Collaboration diagram for htgs::TaskManagerProfile:
Collaboration graph

Public Member Functions

 TaskManagerProfile ()
 Constructs a task manager profile with no profiling data.
 
 TaskManagerProfile (unsigned long long int computeTime, unsigned long long int waitTime, size_t maxQueueSize, unsigned long long int memoryWaitTime)
 Constructs a task manager profile with profiling data. More...
 
std::string genDot (int flags)
 Generates the dot contents for the task manager profile. More...
 
double getValue (int colorFlag)
 Gets one of the values based on the DOTGEN color flag. More...
 
unsigned long long int getComputeTime () const
 Gets the compute time. More...
 
unsigned long long int getWaitTime () const
 Gets the wait time. More...
 
size_t getMaxQueueSize () const
 Gets the maximum queue size. More...
 
unsigned long long int getMemoryWaitTime () const
 Gets the memory wait time. More...
 
void sum (TaskManagerProfile *other)
 Computes the sum for the compute time and wait time between this profile and some other profile. More...
 
void setMaxQueueSize (size_t maxQueueSize)
 Sets the max queue size for the profile. More...
 
void average (int count)
 Computes the average compute and wait time for the profile. More...
 

Private Attributes

unsigned long long int computeTime
 The compute time for the task manager.
 
unsigned long long int waitTime
 The wait time for the task manager.
 
unsigned long long int memoryWaitTime
 The time spent waiting for memory from the memory manager.
 
size_t maxQueueSize
 The maximum queue size for the task manager.
 

Friends

std::ostream & operator<< (std::ostream &os, const TaskManagerProfile &profile)
 Output stream operator to output the task manager profile to a stream. More...
 

Detailed Description

Implements a task manager profile that holds profiling data for a task manager.

Note
Add the PROFILE directive during compilation to enable profiling

Constructor & Destructor Documentation

◆ TaskManagerProfile()

htgs::TaskManagerProfile::TaskManagerProfile ( unsigned long long int  computeTime,
unsigned long long int  waitTime,
size_t  maxQueueSize,
unsigned long long int  memoryWaitTime 
)
inline

Constructs a task manager profile with profiling data.

Parameters
computeTimethe compute time
waitTimethe wait time
maxQueueSizethe max queue size
memoryWaitTimethe amount of time spent waiting for data from a memory manager

Member Function Documentation

◆ average()

void htgs::TaskManagerProfile::average ( int  count)
inline

Computes the average compute and wait time for the profile.

Parameters
countthe number of items to divide by

◆ genDot()

std::string htgs::TaskManagerProfile::genDot ( int  flags)
inline

Generates the dot contents for the task manager profile.

The flags control which profiling data to add or hide.

Parameters
flagsThe DOTGEN flags to control profiling timings that are to be hidden.
Returns
the profiling data for dot graphviz.

◆ getComputeTime()

unsigned long long int htgs::TaskManagerProfile::getComputeTime ( ) const
inline

Gets the compute time.

Returns
the compute time

◆ getMaxQueueSize()

size_t htgs::TaskManagerProfile::getMaxQueueSize ( ) const
inline

Gets the maximum queue size.

Returns
the maximum queue size

◆ getMemoryWaitTime()

unsigned long long int htgs::TaskManagerProfile::getMemoryWaitTime ( ) const
inline

Gets the memory wait time.

Returns
the amount of time the task is waiting for memory

◆ getValue()

double htgs::TaskManagerProfile::getValue ( int  colorFlag)
inline

Gets one of the values based on the DOTGEN color flag.

Parameters
colorFlagthe DOTGEN flag used to control which value to output
Returns
the profile value

◆ getWaitTime()

unsigned long long int htgs::TaskManagerProfile::getWaitTime ( ) const
inline

Gets the wait time.

Returns
the wait time

◆ setMaxQueueSize()

void htgs::TaskManagerProfile::setMaxQueueSize ( size_t  maxQueueSize)
inline

Sets the max queue size for the profile.

Parameters
maxQueueSizethe max queue size

◆ sum()

void htgs::TaskManagerProfile::sum ( TaskManagerProfile other)
inline

Computes the sum for the compute time and wait time between this profile and some other profile.

This is used when computing the average compute/wait time among multiple task managers.

Parameters
otherthe other task manager

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const TaskManagerProfile profile 
)
friend

Output stream operator to output the task manager profile to a stream.

Parameters
osthe output stream
profilethe profile to output
Returns
the output stream

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