Holds the data for the runtime statistics.
More...
#include <Imt.Base.Dff.Runtime/RuntimeStatistics.h>
|
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).
|
|
static void | onSendEvent (const int32_t eventsAvailable) |
| Function which has to be called when a new event is created (to calculate the event statistics). More...
|
|
static void | onSendSmallEvent (const int32_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 int32_t eventsAvailable) |
| Function which has to be called when an event is released (to calculate the event statistics). More...
|
|
static void | onReleaseSmallEvent (const int32_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 handle, 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 RuntimeStatisticsCpu & | getCpuLoad (void) |
| Get the CPU load statistics, update rate is STATISTICS_AVERAGE_UPDATE_RATE_MS. More...
|
|
static const RuntimeStatisticsEvents & | getEventStatistics (void) |
| Get the event statistics, update rate is STATISTICS_AVERAGE_UPDATE_RATE_MS. More...
|
|
static void | reset (void) |
| Resets the collected statistics.
|
|
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.
◆ getCpuLoad()
Get the CPU load statistics, update rate is STATISTICS_AVERAGE_UPDATE_RATE_MS.
- Returns
- Reference to the CPU load statistics.
◆ getEventStatistics()
Get the event statistics, update rate is STATISTICS_AVERAGE_UPDATE_RATE_MS.
- Returns
- Reference to the event 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
-
timersAvailable | Remaining timers available. |
◆ onExecute()
static void imt::base::dff::runtime::RuntimeStatistics::onExecute |
( |
const RuntimeCore::CoreHandle |
handle, |
|
|
const uint32_t |
durationSystemClockTicks |
|
) |
| |
|
static |
Function which has to be called after an executable has been executed (to calculate the average cycle time).
- Parameters
-
handle | Executable handle. |
durationSystemClockTicks | Time in ticks it takes to execute the executable. |
◆ 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 int32_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
-
eventsAvailable | Remaining events available. |
◆ onReleaseSmallEvent()
static void imt::base::dff::runtime::RuntimeStatistics::onReleaseSmallEvent |
( |
const int32_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
-
eventsAvailableSmall | Remaining small events available. |
◆ onSendEvent()
static void imt::base::dff::runtime::RuntimeStatistics::onSendEvent |
( |
const int32_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
-
eventsAvailable | Remaining events available. |
◆ onSendSmallEvent()
static void imt::base::dff::runtime::RuntimeStatistics::onSendSmallEvent |
( |
const int32_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
-
eventsAvailableSmall | Remaining small events available. |
◆ 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
-
calibratedIdleCountPerSecond | Idle count per second with no cpu load. |
The documentation for this class was generated from the following file:
- D:/_Work/10/s/Imt.Base/Imt.Base.Dff.Runtime/RuntimeStatistics.h