Profiler
The Profiler sample demonstrates the functionality of the Profiler subsystem. It shows how to use the Profiler to log and visualize data about custom events that are not part of the Application Event Manager.
Requirements
The sample supports the following development kits:
Hardware platforms |
PCA |
Board name |
Build target |
---|---|---|---|
PCA10090 |
|
||
PCA10056 |
|
||
PCA10040 |
|
||
PCA10112 |
|
Overview
The sample initializes the Profiler and registers and periodically profiles the occurrences of the following event types:
Event without data (
no data event
) - This event is used to signal the occurrence of an event only. It does not contain additional data.Event with data (
data event
) - There are several numerical values associated with this event. The values are updated periodically.
Configuration
See Configuring your application for information about how to permanently or temporarily change the configuration.
Building and running
This sample can be found under samples/profiler
in the nRF Connect SDK folder structure.
See Building and programming an application for information about how to build and program the application.
Testing
After programming the sample to your development kit, you can test it by performing the following steps:
Go to the
scripts/profiler
folder.Run the script
real_time_plot.py
, with the name that should be used to store the data as the argument. For example:real_time_plot.py test_name
This command generates a
test_name.csv
file and atest_name.json
file. The script opens a GUI window that displays events as dots on timelines, similar to the following diagram.See the Backend visualization section in the Profiler documentation for more information about the GUI.
Connect to the kit with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings.
After you connect, the sample will display messages in the terminal.
Note
If you use SEGGER Embedded Studio, make sure to stop debugging before you run Python scripts. Otherwise, you may observe problems with accessing RTT data by the profiler scripts.
Dependencies
This sample uses the following nRF Connect SDK subsystems: