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

Static Public Attributes

static uint32_t const 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 RuntimeStatisticsCpu const& imt::base::dff::runtime::RuntimeStatistics::getCpuLoad ( )
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 ( int16_t const  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 ( RuntimeCore::CoreHandle const  handleId,
uint32_t const  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 ( )
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 ( )
static

Process timer tick.

Has to be called on runtime timer tick.

◆ onReleaseEvent()

static void imt::base::dff::runtime::RuntimeStatistics::onReleaseEvent ( size_t const  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 ( size_t const  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 ( size_t const  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 ( size_t const  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 ( )
static

Resets the collected statistics.

◆ setCalibratedIdleCountPerSecond()

static void imt::base::dff::runtime::RuntimeStatistics::setCalibratedIdleCountPerSecond ( uint32_t const  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

uint32_t const 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: