Holds the data for the runtime statistics.
More...
#include <Imt.Base.Dff.Runtime/RuntimeStatistics.h>
|
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...
|
|
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.
◆ 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
-
timersAvailable | Remaining timers available. |
◆ onExecute()
Function which has to be called after an executable has been executed (to calculate the average cycle time).
- Parameters
-
handleId | Executable handle. |
durationSystemClockTicks | Time 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
-
eventsAvailable | Remaining 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
-
eventsAvailableSmall | Remaining 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
-
eventsAvailable | Remaining 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
-
eventsAvailableSmall | Remaining 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
-
calibratedIdleCountPerSecond | Idle count per second with no cpu load. |
◆ 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: