Charades
Public Member Functions | List of all members
Statistics Class Reference

Class for holding all PE level statistics for a given simulation run. More...

#include <statistics.h>

Public Member Functions

 Statistics ()
 Calls clear() to 0 out stats on creation.
 
void clear ()
 Sets all stats to their "0" values.
 
void add (const Statistics *)
 Adds the passed in statistics object to this one. More...
 
void reduce (const Statistics *)
 Reduces the passed in statistics object with this one. More...
 
Print Utility functions

Utility functions for nicely printing out stats data

void print_section (const char *) const
 Print a section title and border.
 
void print_int (const char *, uint64_t) const
 Print a formatted and labeled integer value.
 
void print_double (const char *, double) const
 Print a formatted and labeled double value.
 
void print () const
 Print out the entire stats class at the end of a simulation. More...
 

Public Attributes

Timing stats
double total_time
 execution time these stats were collected during
 
Event stats
uint64_t events_executed
 total number of events executed
 
uint64_t events_committed
 number of committed events
 
uint64_t events_rolled_back
 number of rolled back events
 
Rollback stats
uint64_t total_rollback_calls
 total number of times a rollback is called
 
uint64_t ts_rollback_calls
 number of rollbacks to a certain timestamp
 
uint64_t event_rollback_calls
 number of rollbacks to a specific event
 
Send stats
uint64_t self_sends
 events sent to ourselves
 
uint64_t local_sends
 events sent to different LPs in the same chare
 
uint64_t remote_sends
 events sent to different chares
 
uint64_t remote_holds
 
uint64_t remote_cancels
 
uint64_t anti_sends
 anti events sent
 
uint64_t anti_cancels
 
GVT stats
Todo:
Move these to the GVT controllers and add more
uint64_t total_gvts
 total number of GVT calculations
 
Memory stats
uint64_t max_events_used
 max number of events allocated from buffer
 
uint64_t new_event_calls
 number of events allocated for an empty buffer
 
uint64_t del_event_calls
 number of events deleted for a full buffer
 

Detailed Description

Class for holding all PE level statistics for a given simulation run.

Stats are incremented within the simulation code as needed. If stats tracing is turned on, then one instance of the Statistics class holds data for the most recent interval, and another instance holds accumulated stats for the entire run. Stats need to be aggregatable (for tracing) and reducible (for end of run reduction).

Member Function Documentation

◆ add()

void Statistics::add ( const Statistics other)

Adds the passed in statistics object to this one.

The accumulation done here is used when current stats are logged to the tracing file, and then added to the cumulative stats for the PE.

This is slightly different that a reduction. One example of a difference, is that the total number of GVTs is summed, where for a reduction they should be the same and are left unmodified.

◆ print()

void Statistics::print ( ) const

Print out the entire stats class at the end of a simulation.

Todo:
Add stats about PEs, num nodes, etc?
Todo:
Improve these stats to include remote % and also track the sent events that were committed vs those sent and cancelled, or rolled back
Todo:
Add stats about cancellations

◆ reduce()

void Statistics::reduce ( const Statistics other)

Reduces the passed in statistics object with this one.

The accumulation done here is used when combining cumulative stats from multiple PEs.

So for example, the total number of GVTs is left unchanged since every PE does the same number of GVTs.


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