5#ifndef PICOSCENES_PLATFORM_DSPRATETRACKER_HXX
6#define PICOSCENES_PLATFORM_DSPRATETRACKER_HXX
29 static std::shared_ptr<DSPRateTracker>
getInstance(
const std::string &trackerName);
52 [[maybe_unused]]
void tick(
double numSignals);
59 [[maybe_unused]]
void tock();
78 std::string trackerName;
79 double signalCount = 0;
80 std::chrono::system_clock::time_point tickTime;
81 double processingTime = 0;
82 double processingRate = 0;
Class for tracking and measuring DSP processing rates.
static std::shared_ptr< DSPRateTracker > getInstance(const std::string &trackerName)
Get instance of rate tracker for specific name.
double getProcessingRate() const
Get current processing rate.
std::string getDisplayString() const
Get formatted string describing processing rate.
void tick(double numSignals)
Start timing for a processing operation.
DSPRateTracker()=delete
Default constructor (deleted)
void tock()
End timing for a processing operation.
void reset()
Reset tracker statistics.