Skip to content

Commit ef50e4e

Browse files
MarekPietakapi-no
authored andcommitted
samples: nrf_profiler: Demonstrate calculating statistics
Change adds a new testing step demonstrating calculating statistics. Change also adds related test preset for the nRF Profiler host tools. Jira: NCSDK-35261 Signed-off-by: Marek Pieta <[email protected]> Signed-off-by: Uma Praseeda <[email protected]> Signed-off-by: Pekka Niskanen <[email protected]>
1 parent d3ee996 commit ef50e4e

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,10 @@ Wi-Fi samples
472472
Other samples
473473
-------------
474474

475-
|no_changes_yet_note|
475+
* :ref:`nrf_profiler_sample` sample:
476+
477+
* Added a new testing step demonstrating how to calculate event propagation statistics.
478+
Also added the related test preset for the :file:`calc_stats.py` script (:file:`nrf/scripts/nrf_profiler/stats_nordic_presets/nrf_profiler.json`).
476479

477480
Drivers
478481
=======

samples/nrf_profiler/README.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ After programming the sample to your development kit, you can test it by perform
4949
#. Run the script :file:`real_time_plot.py`, with the name that should be used to store the data as the argument.
5050
For example:
5151

52-
.. parsed-literal::
53-
:class: highlight
52+
.. code-block:: console
5453
55-
real_time_plot.py *test_name*
54+
python3 real_time_plot.py *test_name*
5655
5756
This command generates a :file:`test_name.csv` file and a :file:`test_name.json` file.
5857
The script opens a GUI window that displays events as dots on timelines, similar to the following diagram.
@@ -64,8 +63,15 @@ After programming the sample to your development kit, you can test it by perform
6463
See the :ref:`nrf_profiler_backends_custom_visualization` section in the nRF Profiler documentation for more information about the GUI.
6564

6665
#. |connect_terminal|
66+
After you connect, the sample will display messages in the terminal.
67+
#. Calculate the nRF Profiler event propagation statistics (statistics for time intervals between nRF Profiler events) from the previously collected dataset using the following command:
6768

68-
After you connect, the sample will display messages in the terminal.
69+
.. code-block:: console
70+
71+
python3 calc_stats.py *test_name* stats_nordic_presets/nrf_profiler.json
72+
73+
The :file:`stats_nordic_presets/nrf_profiler.json` file specifies the nRF Profiler events used for the calculations.
74+
The file refers to the events used by the sample.
6975

7076
Dependencies
7177
************
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{
3+
"name": "Time between no data events",
4+
"start_event": {
5+
"name": "no data event"
6+
},
7+
"end_event": {
8+
"name": "no data event"
9+
}
10+
},
11+
{
12+
"name": "Time from no data event to data event",
13+
"start_event": {
14+
"name": "no data event"
15+
},
16+
"end_event": {
17+
"name": "data event"
18+
}
19+
}
20+
]

0 commit comments

Comments
 (0)