Measurement class
#include <Magnum/DebugTools/FrameProfiler.h>
Measurement.
Describes a single measurement passed to FrameProfiler::
Constructors, destructors, conversion operators
-
Measurement(Containers::
StringView name, Units units, void(*)(void*) begin, UnsignedLong(*)(void*) end, void* state) explicit - Construct an immediate measurement.
-
Measurement(Containers::
StringView name, Units units, UnsignedInt delay, void(*)(void*, UnsignedInt) begin, void(*)(void*, UnsignedInt) end, UnsignedLong(*)(void*, UnsignedInt, UnsignedInt) query, void* state) explicit - Construct a delayed measurement.
Function documentation
Magnum:: DebugTools:: FrameProfiler:: Measurement:: Measurement(Containers:: StringView name,
Units units,
void(*)(void*) begin,
UnsignedLong(*)(void*) end,
void* state) explicit
Construct an immediate measurement.
| Parameters | |
|---|---|
| name | Measurement name, used in FrameProfiler:: |
| units | Measurement units, used in FrameProfiler:: |
| begin | Function to call at the beginning of a frame |
| end | Function to call at the end of a frame, returning the measured value |
| state | State pointer passed to both begin and end as a first argument |
If name is Containers::
Magnum:: DebugTools:: FrameProfiler:: Measurement:: Measurement(Containers:: StringView name,
Units units,
UnsignedInt delay,
void(*)(void*, UnsignedInt) begin,
void(*)(void*, UnsignedInt) end,
UnsignedLong(*)(void*, UnsignedInt, UnsignedInt) query,
void* state) explicit
Construct a delayed measurement.
| Parameters | |
|---|---|
| name | Measurement name, used in FrameProfiler:: |
| units | Measurement units, used in FrameProfiler:: |
| delay | How many FrameProfiler::query. Has to be at least 1, delay of 1 is equal in behavior to immediate measurements. |
| begin | Function to call at the beginning of a frame. Second argument is a current index that's guaranteed to be less than delay and always different in each consecutive call. |
| end | Function to call at the end of a frame. Second argument is a current index that's guaranteed to be less than delay and always different in each consecutive call. |
| query | Function to call to get the measured value. Called after delay frames. First argument is a previous index that is the same as the current argument passed to a corresponding begin / end function of the measurement to query the value of. Second argument is a current index that corresponds to current frame. |
| state | State pointer passed to both begin and end as a first argument |
If name is Containers::