17 #ifndef DEBUGMETRICSMONITOR_H
18 #define DEBUGMETRICSMONITOR_H
85 float getFps()
const {
return mFps; }
167 void updateMemoryUsage();
170 int mFpsAverageWindowSizeMs = 1000;
171 int mFpsRefreshIntervalMs = 100;
172 float mInstantFps = 0.0f;
173 QTime mFpsRefreshTime;
174 int mFpsCounterCount = 0;
175 QTime mFpsCounterTimer;
176 QTime mInstantFpsCounterTimer;
178 long mMemoryUsage = 0;
179 int mMemoryUsageRefreshIntervalMs = 1000;
180 QTime mMemoryUsageRefreshTime;
182 bool mLoggingMetrics =
true;
185 #endif // DEBUGMETRICSMONITOR_H
int getFpsRefreshIntervalMs() const
Returns fpsRefreshIntervalMs.
Definition: DebugMetricsMonitor.h:98
void fpsRefreshIntervalMsChanged()
Emitted when fpsRefreshIntervalMs changes.
void memoryUsageRefreshIntervalMsChanged()
Emitted when memoryUsageRefreshIntervalMs changes.
float instantFps
The most immediate, non-averaged measurement of the number of frames rendered per second that is upda...
Definition: DebugMetricsMonitor.h:54
float fps
Average number of frames rendered per second, averaged over fpsAverageWindowSizeMs milliseconds and u...
Definition: DebugMetricsMonitor.h:39
Tracks and provides mechanisms for reporting various debug metrics.
Definition: DebugMetricsMonitor.h:32
void setFpsRefreshIntervalMs(int value)
Sets fpsRefreshIntervalMs.
int getFpsAverageWindowSizeMs() const
Returns fpsAverageWindowSizeMs.
Definition: DebugMetricsMonitor.h:89
void setMemoryUsageRefreshIntervalMs(int value)
Sets memoryUsageRefreshIntervalMs.
void fpsChanged()
Emitted when fps changes.
void setFpsAverageWindowSizeMs(int value)
Sets fpsAverageWindowSizeMs.
int fpsAverageWindowSizeMs
Size of window, in milliseconds, over which to average fps.
Definition: DebugMetricsMonitor.h:44
long getMemoryUsage() const
Returns memoryUsage.
Definition: DebugMetricsMonitor.h:111
int getMemoryUsageRefreshIntervalMs() const
Returns memoryUsageRefreshIntervalMs.
Definition: DebugMetricsMonitor.h:115
DebugMetricsMonitor(QObject *parent=0)
Constructs a DebugMetricsMonitor.
long int memoryUsage
Amount of memory, in bytes, used by the application.
Definition: DebugMetricsMonitor.h:59
void memoryUsageChanged()
Emitted when memoryUsage changes.
bool isLoggingMetrics() const
Returns loggingMetrics.
Definition: DebugMetricsMonitor.h:124
float getInstantFps() const
Returns instantFps.
Definition: DebugMetricsMonitor.h:107
void loggingMetricsChanged()
Emitted when loggingMetrics changes.
int memoryUsageRefreshIntervalMs
Length of interval, in milliseconds, after which to refresh the memoryUsage metric.
Definition: DebugMetricsMonitor.h:67
void fpsAverageWindowSizeMsChanged()
Emitted when fpsAverageWindowSizeMs changes.
int fpsRefreshIntervalMs
Length of interval, in milliseconds, after which to refresh the fps metric.
Definition: DebugMetricsMonitor.h:49
bool loggingMetrics
Whether or not DebugMetricsMonitor logs debug information to qDebug.
Definition: DebugMetricsMonitor.h:73
float getFps() const
Returns fps.
Definition: DebugMetricsMonitor.h:85
void setLoggingMetrics(bool value)
Sets loggingMetrics.
void update()
Updates the DebugMetricsMonitor metrics if more than their refresh interval times have passed since t...