Mark3 Realtime Kernel
Mark3::ProfileTimer Class Reference

Profiling timer. This class is used to perform high-performance profiling of code to see how int32_t certain operations take. useful in instrumenting the performance of key algorithms and time-critical operations to ensure real-timer behavior. More...

#include <profile.h>

Public Member Functions

void Init ()
 Init Initialize the profiling timer prior to use. Can also be used to reset a timer that's been used previously. More...
 
void Start ()
 Start Start a profiling session, if the timer is not already active. Has no effect if the timer is already active. More...
 
void Stop ()
 Stop Stop the current profiling session, adding to the cumulative time for this timer, and the total iteration count. More...
 
uint32_t GetAverage ()
 GetAverage Get the average time associated with this operation. More...
 
uint32_t GetCurrent ()
 GetCurrent Return the current tick count held by the profiler. Valid for both active and stopped timers. More...
 

Private Attributes

uint32_t m_u32StartTicks
 Cumulative tick-count for this timer. More...
 
uint32_t m_u32CurrentIteration
 Tick count for current iteration. More...
 
uint32_t m_u32Cumulative
 Cumulative ticks tracked. More...
 
uint16_t m_u16Iterations
 Number of iterations executed for this profiling timer. More...
 
bool m_bActive
 Wheter or not the timer is active or stopped. More...
 

Detailed Description

Profiling timer. This class is used to perform high-performance profiling of code to see how int32_t certain operations take. useful in instrumenting the performance of key algorithms and time-critical operations to ensure real-timer behavior.

Definition at line 67 of file profile.h.

Member Function Documentation

◆ GetAverage()

uint32_t Mark3::ProfileTimer::GetAverage ( )

GetAverage Get the average time associated with this operation.

Returns
Average tick count normalized over all iterations

Definition at line 63 of file profile.cpp.

◆ GetCurrent()

uint32_t Mark3::ProfileTimer::GetCurrent ( )

GetCurrent Return the current tick count held by the profiler. Valid for both active and stopped timers.

Returns
The currently held tick count.

Definition at line 72 of file profile.cpp.

◆ Init()

void Mark3::ProfileTimer::Init ( void  )

Init Initialize the profiling timer prior to use. Can also be used to reset a timer that's been used previously.

Definition at line 25 of file profile.cpp.

◆ Start()

void Mark3::ProfileTimer::Start ( void  )

Start Start a profiling session, if the timer is not already active. Has no effect if the timer is already active.

Definition at line 34 of file profile.cpp.

◆ Stop()

void Mark3::ProfileTimer::Stop ( void  )

Stop Stop the current profiling session, adding to the cumulative time for this timer, and the total iteration count.

Definition at line 46 of file profile.cpp.

Member Data Documentation

◆ m_bActive

bool Mark3::ProfileTimer::m_bActive
private

Wheter or not the timer is active or stopped.

Definition at line 113 of file profile.h.

◆ m_u16Iterations

uint16_t Mark3::ProfileTimer::m_u16Iterations
private

Number of iterations executed for this profiling timer.

Definition at line 112 of file profile.h.

◆ m_u32Cumulative

uint32_t Mark3::ProfileTimer::m_u32Cumulative
private

Cumulative ticks tracked.

Definition at line 111 of file profile.h.

◆ m_u32CurrentIteration

uint32_t Mark3::ProfileTimer::m_u32CurrentIteration
private

Tick count for current iteration.

Definition at line 110 of file profile.h.

◆ m_u32StartTicks

uint32_t Mark3::ProfileTimer::m_u32StartTicks
private

Cumulative tick-count for this timer.

Definition at line 109 of file profile.h.


The documentation for this class was generated from the following files: