HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_NodeStats Class Reference

#include <PDG_NodeStats.h>

Public Types

enum  StatType {
  eFirstGenerateTime, eLastGenerateTime, eTotalGenerateTime, eFirstCookTime,
  eLastCookTime, eTotalCookTime, eStatCount
}
 Enumeration of stats stored in this object. More...
 

Public Member Functions

 PDG_NodeStats ()
 Constructs a new node stat instance. More...
 
void reset (bool full)
 Resets all stats on the node. More...
 
const PDG_WorkItemStateTrackerstateTracker () const
 Returns the work item state tracker for this node. More...
 
PDG_WorkItemStateTrackerstateTracker ()
 
int cookCount () const
 Returns the number of times this node has cooked. More...
 
int incrementCookCount ()
 Increments the cook count and returns the old value. More...
 
fpreal getStat (StatType stat) const
 Returns the current value of the specified stat type. More...
 
fpreal setStat (StatType stat, fpreal value, bool first=false)
 Sets the value of the specified stat type. More...
 
fpreal setTimeStat (StatType stat, bool first=false)
 Sets te value of the specified stat to the current time. More...
 
fpreal addStat (StatType state, fpreal value, bool first=false)
 Adds the value to the specified state type. More...
 
fpreal totalCookTime () const
 Returns the total time spent cooking work items in the node. More...
 
fpreal wallclockCookTime () const
 

Detailed Description

Definition at line 21 of file PDG_NodeStats.h.

Member Enumeration Documentation

Enumeration of stats stored in this object.

Enumerator
eFirstGenerateTime 

The timestamp at which the node first began generating work items.

eLastGenerateTime 

The timestamp at which the node is fully generated.

eTotalGenerateTime 

The total time spent generating work items.

eFirstCookTime 

The timestamp at which the node first began cooking work items.

eLastCookTime 

The timestamp at which the node is fully cooked.

eTotalCookTime 

The total time spent cooking work items.

eStatCount 

The number of different tracked node stats.

Definition at line 25 of file PDG_NodeStats.h.

Constructor & Destructor Documentation

PDG_NodeStats::PDG_NodeStats ( )

Constructs a new node stat instance.

Member Function Documentation

fpreal PDG_NodeStats::addStat ( StatType  state,
fpreal  value,
bool  first = false 
)

Adds the value to the specified state type.

int PDG_NodeStats::cookCount ( ) const
inline

Returns the number of times this node has cooked.

Definition at line 63 of file PDG_NodeStats.h.

fpreal PDG_NodeStats::getStat ( StatType  stat) const

Returns the current value of the specified stat type.

int PDG_NodeStats::incrementCookCount ( )
inline

Increments the cook count and returns the old value.

Definition at line 67 of file PDG_NodeStats.h.

void PDG_NodeStats::reset ( bool  full)

Resets all stats on the node.

fpreal PDG_NodeStats::setStat ( StatType  stat,
fpreal  value,
bool  first = false 
)

Sets the value of the specified stat type.

fpreal PDG_NodeStats::setTimeStat ( StatType  stat,
bool  first = false 
)

Sets te value of the specified stat to the current time.

const PDG_WorkItemStateTracker& PDG_NodeStats::stateTracker ( ) const
inline

Returns the work item state tracker for this node.

Definition at line 57 of file PDG_NodeStats.h.

PDG_WorkItemStateTracker& PDG_NodeStats::stateTracker ( )
inline

Definition at line 59 of file PDG_NodeStats.h.

fpreal PDG_NodeStats::totalCookTime ( ) const

Returns the total time spent cooking work items in the node.

fpreal PDG_NodeStats::wallclockCookTime ( ) const

Returns the wallclock cook time, e.g. the difference between the first work item starting and the last work item ending.


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