Skip to content

Commit 9f36cb0

Browse files
MarekPietakapi-no
authored andcommitted
samples: app_event_manager_profiler_tracer: Stats calculating demo
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: Pekka Niskanen <[email protected]>
1 parent ef50e4e commit 9f36cb0

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,11 @@ Other samples
477477
* Added a new testing step demonstrating how to calculate event propagation statistics.
478478
Also added the related test preset for the :file:`calc_stats.py` script (:file:`nrf/scripts/nrf_profiler/stats_nordic_presets/nrf_profiler.json`).
479479

480+
* :ref:`app_event_manager_profiling_tracer_sample` sample:
481+
482+
* Added a new testing step demonstrating how to calculate event propagation statistics.
483+
Also added the related test preset for the :file:`calc_stats.py` script (:file:`nrf/scripts/nrf_profiler/stats_nordic_presets/app_event_manager_profiler_tracer.json`).
484+
480485
Drivers
481486
=======
482487

samples/app_event_manager_profiler_tracer/README.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,9 @@ After programming the sample to your development kit, test it by performing the
7676
1. Run the script :file:`real_time_plot.py` located in the :file:`scripts/nrf_profiler` folder, with the name that is to be used to store the data as argument.
7777
For example, run the following command to generate a :file:`test_name.csv` and a :file:`test_name.json` file using the *test_name* argument:
7878

79-
.. parsed-literal::
80-
:class: highlight
79+
.. code-block:: console
8180
82-
real_time_plot.py *test_name*
81+
python3 real_time_plot.py *test_name*
8382
8483
The script opens a GUI window that displays events as points on timelines, similar to the following:
8584

@@ -102,6 +101,14 @@ After programming the sample to your development kit, test it by performing the
102101
One event submission and corresponding processing time is highlighted in green.
103102
#. Check the results for the generated :file:`test_name.csv` and :file:`test_name.json` files.
104103
#. See how events are logged with data transmitted by the event.
104+
#. Calculate the nRF Profiler event propagation statistics (statistics for time intervals between nRF Profiler events) from the previously collected dataset using the following command:
105+
106+
.. code-block:: console
107+
108+
python3 calc_stats.py *test_name* stats_nordic_presets/app_event_manager_profiler_tracer.json
109+
110+
The :file:`stats_nordic_presets/app_event_manager_profiler_tracer.json` file specifies the nRF Profiler events used for the calculations.
111+
The file refers to the events used by the sample.
105112

106113
Dependencies
107114
************
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[
2+
{
3+
"name": "Time between one_sec_event",
4+
"start_event": {
5+
"name": "one_sec_event"
6+
},
7+
"end_event": {
8+
"name": "one_sec_event"
9+
}
10+
},
11+
{
12+
"name": "Processing time of five_sec_event",
13+
"start_event": {
14+
"name": "five_sec_event",
15+
"state": "processing_start"
16+
},
17+
"end_event": {
18+
"name": "five_sec_event",
19+
"state": "processing_end"
20+
}
21+
},
22+
{
23+
"name": "burst_event processing start delay",
24+
"start_event": {
25+
"name": "burst_event",
26+
"state": "submit"
27+
},
28+
"end_event": {
29+
"name": "burst_event",
30+
"state": "processing_start"
31+
}
32+
}
33+
]

0 commit comments

Comments
 (0)