[INFO] Latency measurement methodology

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 13008
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 742 times
Been thanked: 620 times
Contact:

[INFO] Latency measurement methodology

Postby Giovanni » Thu Mar 19, 2020 12:22 pm

Hi,

Just FYI, I added a latency measurement demo under /demos/various/RT-TEST-Latency. It measures the ISR latency and the thread flyback time.

Output is like this:

Code: Select all

*** Compiled:      Mar 19 2020 - 12:30:31
*** Platform:      STM32G4 Hi-resolution Line
*** Test Board:    STMicroelectronics STM32 Nucleo64-G474RE
*** Architecture:  ARMv7E-M
*** Core Variant:  Cortex-M4 @ 170MHz
*** Compiler:      GCC 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]

ISR activation time latency

Iterations:        1000
Last measurement:  75
Best measurement:  75
Worst measurement: 77
Cumulative time:   75002

Thread fly-back latency

Iterations:        1000
Last measurement:  296
Best measurement:  296
Worst measurement: 296
Cumulative time:   296000


It means that under optimal conditions (highest IRQ priority in the system, no critical sections in background threads, the thread fly-back time is well below 400nS for that platform.

I am thinking to add "noisy threads" to the measurement to assess impact of RTOS activity to those figures. The best approach is to add that measurement to YOUR application and see how much jitter you have in your system.

Giovanni

Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 2 guests