|
evan 2026.1.4
Evan
|
One accumulated CPU phase, in nanoseconds. More...
#include <headers/evan/FrameStats.hpp>
Public Member Functions | |
| void | add (uint64_t ns) noexcept |
| Records one sample. | |
| void | resetWindow () noexcept |
| Starts a new window. | |
| uint64_t | averageNs () const noexcept |
| Average duration of the window. | |
Public Attributes | |
| uint64_t | lastNs = 0 |
| Most recent sample, in nanoseconds. | |
| uint64_t | totalNs = 0 |
| Sum of the samples of the current window, in nanoseconds. | |
| uint32_t | samples = 0 |
| Number of samples of the current window. | |
One accumulated CPU phase, in nanoseconds.
Samples are added per frame; the report window keeps the most recent value, the sum and the sample count so the average can be computed when the window is reported.
Definition at line 26 of file FrameStats.hpp.
Records one sample.
| ns | Duration of the sample, in nanoseconds. |
Definition at line 47 of file FrameStats.hpp.

|
inlinenoexcept |
Average duration of the window.
Definition at line 72 of file FrameStats.hpp.
|
inlinenoexcept |
Starts a new window.
Keeps lastNs (the most recent value stays readable) and clears the sum and the sample count.
Definition at line 60 of file FrameStats.hpp.
| uint64_t evan::PhaseStats::lastNs = 0 |
Most recent sample, in nanoseconds.
Definition at line 30 of file FrameStats.hpp.
| uint32_t evan::PhaseStats::samples = 0 |
Number of samples of the current window.
Definition at line 40 of file FrameStats.hpp.
| uint64_t evan::PhaseStats::totalNs = 0 |
Sum of the samples of the current window, in nanoseconds.
Definition at line 35 of file FrameStats.hpp.