Application Event Manager profiling tracer
The Application Event Manager profiling tracer sample demonstrates the functionality of profiling Application Event Manager events using the nRF Profiler and the Application Event Manager profiler tracer modules.
The sample supports the following development kits:
The sample application consists of the following modules that communicate using events:
Module A (
Module B (
Module A waits for a configuration event sent by
After receiving this event, Module A starts sending periodic events every second to Module B.
Module A also has a counter that increases before a
one_sec_event is sent.
The counter value is transmitted during the event.
Module B waits for the
one_sec_event events from Module A.
Every time it receives a
one_sec_event, the module checks if the value it transmits is equal to
If it is equal to
5, Module B sends a
five_sec_event to Module A.
When Module A receives a
five_sec_event from Module B, it zeros the counter, sends a series of 50
burst_event, and simulates work for 100 ms by busy waiting.
See Configuring your application for information about how to permanently or temporarily change the configuration.
This sample can be found under
samples/app_event_manager_profiler_tracer in the nRF Connect SDK folder structure.
See Building and programming an application for information about how to build and program the application and Testing and debugging an application for general information about testing and debugging in the nRF Connect SDK.
After programming the sample to your development kit, test it by performing the following steps:
Run the script
real_time_plot.pylocated in the
scripts/nrf_profilerfolder, with the name that is to be used to store the data as argument. For example, run the following command to generate a
test_name.jsonfile using the test_name argument:
The script opens a GUI window that displays events as points on timelines, similar to the following:
Use scroll wheel to zoom into interesting parts on a GUI. See the Backend visualization in the Profiler documentation for more information about how to work with the diagram.
Click the middle mouse button to highlight an event submission or processing for tracking, and to display the event data as on a figure:
On this image, the zoom focuses on actions triggered by the fifth one-second event. The five-second event triggers 50 burst events. One event submission and corresponding processing time is highlighted in green.
Check the results for the generated
See how events are logged with data transmitted by the event.
This sample uses the following nRF Connect SDK subsystems:
In addition, it uses the following Zephyr subsystems: