The Sparta Modeling Framework
|
StatePool class template is templatized on the enum type we are tracking. More...
#include <StateTracker.hpp>
Public Member Functions | |
StatePool ()=delete | |
The Default Ctor is deleted because StatePool cannot be created. | |
StatePool (const std::string &tracking_filename) | |
A file name is a must when constructing StatePool. | |
state_tracker_ptr< T > | getNewStateTrackerUnit (Scheduler *scheduler) noexcept |
Method which gets invoked whenever a demand for a new. | |
void | releaseToPool (StateTrackerUnit< T > *&raw_ptr) |
Method which is invoked when individual State Tracker Units. | |
void | transferQueueData (std::deque< state_tracker_ptr< T > > *raw_queue) |
This is the main method, the custom deleter of the Tracker Queues. | |
Static Public Member Functions | |
static size_t | id () noexcept |
Method which associates this StatePool template instantiation. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from sparta::tracker::StatePoolBase | |
static size_t | next () noexcept |
StatePool class template is templatized on the enum type we are tracking.
Definition at line 176 of file StateTracker.hpp.
|
inlineexplicit |
A file name is a must when constructing StatePool.
Definition at line 184 of file StateTracker.hpp.
|
inlinenoexcept |
Method which gets invoked whenever a demand for a new.
Increment the instance count as number of tracker units
If the Queue of tracker units is empty, we create a new
If the Queue has available Tracker Units to go, we just pop
Definition at line 211 of file StateTracker.hpp.
|
inlinestaticnoexcept |
Method which associates this StatePool template instantiation.
Definition at line 204 of file StateTracker.hpp.
|
inline |
Method which is invoked when individual State Tracker Units.
Wrap this raw pointer into a unique pointer.
This tracker unit cannot be a nullptr.
If this tracker unit has some un-processed data in it
Finally, push the Tracker Unit at the back of the queue.
Definition at line 237 of file StateTracker.hpp.
|
inline |
This is the main method, the custom deleter of the Tracker Queues.
Wrap the raw pointer into a unique_ptr, a good practise.
If we have reached this point, instance count cannot be 0.
Open the state tracking file.
We need to reset this self-reference pointer so that the
Create a vector to hold the results.
We process each and every State Tracker Unit in the queue.
Grab the Calculation Engine from the tracker unit being processed.
Calculate average stats from the aggregate stats by using
Store the enum class names by using gcc PRETTY_FUNCTION.
Finally, we label the Histogram and write this data into file.
Store the individual enum constant names.
This loop iterates one less than the size of this vector times.
This loop iterates one less than the size of this vector times.
Definition at line 259 of file StateTracker.hpp.