Dataflow Runtime API  3.1.1.0
Static Public Member Functions | Static Public Attributes | List of all members
imt::base::dff::runtime::RuntimeStatistics Class Reference

Holds the data for the runtime statistics. More...

#include <Imt.Base.Dff.Runtime/RuntimeStatistics.h>

Static Public Member Functions

static void setCalibratedIdleCountPerSecond (const uint32_t calibratedIdleCountPerSecond)
 Set the reference idle counter value for 100% idle (platform specific) More...
 
static void onIdle (void)
 Function which has to be called within the idle loop (to calculate the average CPU load). More...
 
static void onSendEvent (const size_t eventsAvailable)
 Function which has to be called when a new event is created (to calculate the event statistics). More...
 
static void onSendSmallEvent (const size_t eventsAvailableSmall)
 Function which has to be called when a new small event is created (to calculate the event statistics). More...
 
static void onReleaseEvent (const size_t eventsAvailable)
 Function which has to be called when an event is released (to calculate the event statistics). More...
 
static void onReleaseSmallEvent (const size_t eventsAvailableSmall)
 Function which has to be called when a small event is released (to calculate the event statistics). More...
 
static void onExecute (const RuntimeCore::CoreHandle handleId, const uint32_t durationSystemClockTicks)
 Function which has to be called after an executable has been executed (to calculate the average cycle time). More...
 
static void onProcessTimerTick (void)
 Process timer tick. More...
 
static void onCreateTimer (const int16_t timersAvailable)
 Function which has to be called when a new timer is created (to calculate the event statistics). More...
 
static const RuntimeStatisticsCpugetCpuLoad (void)
 Get the CPU load statistics, update rate is STATISTICS_AVERAGE_UPDATE_RATE_MS. More...
 
static void reset (void)
 Resets the collected statistics. More...
 

Static Public Attributes

static const uint32_t STATISTICS_AVERAGE_UPDATE_RATE_MS = 1000U
 Update rate in milliseconds for the average calculation of cpu load and events. More...
 

Detailed Description

Holds the data for the runtime statistics.

Note
RUNTIME_STATISTICS has to be defined in RuntimeConfigApp and callbacks need to be implemented for each platform. In order to measure the duration the FreeRunningTimer is used, which has to be initialized by the application.

Member Function Documentation

◆ getCpuLoad()

static const RuntimeStatisticsCpu& imt::base::dff::runtime::RuntimeStatistics::getCpuLoad ( void  )
static

Get the CPU load statistics, update rate is STATISTICS_AVERAGE_UPDATE_RATE_MS.

Returns
Reference to the CPU load statistics.

◆ onCreateTimer()

static void imt::base::dff::runtime::RuntimeStatistics::onCreateTimer ( const int16_t  timersAvailable)
static

Function which has to be called when a new timer is created (to calculate the event statistics).

Parameters
timersAvailableRemaining timers available.

◆ onExecute()

static void imt::base::dff::runtime::RuntimeStatistics::onExecute ( const RuntimeCore::CoreHandle  handleId,
const uint32_t  durationSystemClockTicks 
)
static

Function which has to be called after an executable has been executed (to calculate the average cycle time).

Parameters
handleIdExecutable handle.
durationSystemClockTicksTime in ticks it takes to execute the executable.

◆ onIdle()

static void imt::base::dff::runtime::RuntimeStatistics::onIdle ( void  )
static

Function which has to be called within the idle loop (to calculate the average CPU load).

◆ onProcessTimerTick()

static void imt::base::dff::runtime::RuntimeStatistics::onProcessTimerTick ( void  )
static

Process timer tick.

Has to be called on runtime timer tick.

◆ onReleaseEvent()

static void imt::base::dff::runtime::RuntimeStatistics::onReleaseEvent ( const size_t  eventsAvailable)
static

Function which has to be called when an event is released (to calculate the event statistics).

Note
Has to be called with interrupts disabled.
Parameters
eventsAvailableRemaining events available.

◆ onReleaseSmallEvent()

static void imt::base::dff::runtime::RuntimeStatistics::onReleaseSmallEvent ( const size_t  eventsAvailableSmall)
static

Function which has to be called when a small event is released (to calculate the event statistics).

Note
Has to be called with interrupts disabled.
Parameters
eventsAvailableSmallRemaining small events available.

◆ onSendEvent()

static void imt::base::dff::runtime::RuntimeStatistics::onSendEvent ( const size_t  eventsAvailable)
static

Function which has to be called when a new event is created (to calculate the event statistics).

Note
Has to be called with interrupts disabled.
Parameters
eventsAvailableRemaining events available.

◆ onSendSmallEvent()

static void imt::base::dff::runtime::RuntimeStatistics::onSendSmallEvent ( const size_t  eventsAvailableSmall)
static

Function which has to be called when a new small event is created (to calculate the event statistics).

Note
Has to be called with interrupts disabled.
Parameters
eventsAvailableSmallRemaining small events available.

◆ reset()

static void imt::base::dff::runtime::RuntimeStatistics::reset ( void  )
static

Resets the collected statistics.

◆ setCalibratedIdleCountPerSecond()

static void imt::base::dff::runtime::RuntimeStatistics::setCalibratedIdleCountPerSecond ( const uint32_t  calibratedIdleCountPerSecond)
static

Set the reference idle counter value for 100% idle (platform specific)

Note
Does not work when the idle callback sets the CPU to "WFI"
Parameters
calibratedIdleCountPerSecondIdle count per second with no cpu load.

Member Data Documentation

◆ STATISTICS_AVERAGE_UPDATE_RATE_MS

const uint32_t imt::base::dff::runtime::RuntimeStatistics::STATISTICS_AVERAGE_UPDATE_RATE_MS = 1000U
static

Update rate in milliseconds for the average calculation of cpu load and events.


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