FpsMetrics.ixx File
Module defining the FpsMetrics class for frame rate analysis and monitoring. More...
Included Headers
#include <deque>
#include <numeric>
#include <cstddef>
#include <helios.engine.tooling.FrameStats>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | tooling |
Classes Index
| class | FpsMetrics |
|
Aggregates and analyzes frame timing data over a rolling window. More... | |
Description
Module defining the FpsMetrics class for frame rate analysis and monitoring.
File Listing
The file content with the documentation metadata removed is:
15export namespace helios::engine::tooling {
41 class FpsMetrics {
144 const auto& stats = history_.back();
146 lastWorkTime_ = stats.workTime * 1000.0f;
147 lastWaitTime_ = stats.waitTime * 1000.0f;
149 float sumMs = 0.0f;
150 for (const auto& s : history_) {
154 avgFrameTime_ = sumMs / static_cast<float>(history_.size());
182 void addFrame(const helios::engine::tooling::FrameStats& stats) {
185 history_.push_back(stats);
204 void setHistorySize(size_t size) {
217 [[nodiscard]] size_t getHistorySize() const noexcept {
241 [[nodiscard]] float getFrameTimeMs() noexcept {
253 [[nodiscard]] float getWorkTimeMs() noexcept {
265 [[nodiscard]] float getIdleTimeMs() noexcept {
275 [[nodiscard]] unsigned long long getFrameCount() const noexcept {
287 [[nodiscard]] float getFrameTimeSeconds() noexcept {
300 [[nodiscard]] float getWorkTimeSeconds() noexcept {
313 [[nodiscard]] float getIdleTimeSeconds() noexcept {
327 [[nodiscard]] const std::deque<helios::engine::tooling::FrameStats>& getHistory() const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.