PicoScenes API Docs
 
Loading...
Searching...
No Matches
DSPRateTracker Class Reference

Class for tracking and measuring DSP processing rates. More...

#include <DSPRateTracker.hxx>

Public Member Functions

 DSPRateTracker ()=delete
 Default constructor (deleted)
 
void reset ()
 Reset tracker statistics.
 
void tick (double numSignals)
 Start timing for a processing operation.
 
void tock ()
 End timing for a processing operation.
 
double getProcessingRate () const
 Get current processing rate.
 
std::string getDisplayString () const
 Get formatted string describing processing rate.
 

Static Public Member Functions

static std::shared_ptr< DSPRateTrackergetInstance (const std::string &trackerName)
 Get instance of rate tracker for specific name.
 

Detailed Description

Class for tracking and measuring DSP processing rates.

This class implements a singleton pattern for tracking processing rates of digital signal processing operations. It provides functionality to measure processing time and calculate processing rates in signals per second.

Definition at line 18 of file DSPRateTracker.hxx.

Constructor & Destructor Documentation

◆ DSPRateTracker()

DSPRateTracker::DSPRateTracker ( )
delete

Default constructor (deleted)

Prevents direct instantiation to enforce singleton pattern

Member Function Documentation

◆ getDisplayString()

std::string DSPRateTracker::getDisplayString ( ) const

Get formatted string describing processing rate.

Returns
String containing tracker name and rate in MSPS (Mega Samples Per Second)

◆ getInstance()

static std::shared_ptr< DSPRateTracker > DSPRateTracker::getInstance ( const std::string &  trackerName)
static

Get instance of rate tracker for specific name.

Implements singleton pattern with named instances. Creates new instance if one doesn't exist for the given name.

Parameters
trackerNameName identifier for the tracker instance
Returns
Shared pointer to DSPRateTracker instance

◆ getProcessingRate()

double DSPRateTracker::getProcessingRate ( ) const

Get current processing rate.

Returns
Processing rate in signals per second

◆ reset()

void DSPRateTracker::reset ( )

Reset tracker statistics.

Resets signal count, processing time, and rate to zero

◆ tick()

void DSPRateTracker::tick ( double  numSignals)

Start timing for a processing operation.

Records start time and adds to signal count

Parameters
numSignalsNumber of signals being processed

◆ tock()

void DSPRateTracker::tock ( )

End timing for a processing operation.

Calculates elapsed time and updates processing rate


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