| 1 |
.. SPDX-License-Identifier: BSD-2-Clause |
| 2 |
.. |
| 3 |
.. Copyright (C) 2024 Linutronix GmbH |
| 4 |
.. Author Kurt Kanzenbach <[email protected]> |
| 5 |
.. |
| 6 |
.. Testbench documentation histogram file. |
| 7 |
.. |
| 8 |
|
| 9 |
Histograms |
| 10 |
========== |
| 11 |
|
| 12 |
Motivation |
| 13 |
---------- |
| 14 |
|
| 15 |
The Linux RealTime Communication Testbench keeps track of the round-trip times of each frame. Currently the minimum, |
| 16 |
maximum and average values are displayed in the log files over the whole application run |
| 17 |
time. However, it does not show the distribution of the round-trip times. For example, the |
| 18 |
distribution is of interest to see the relation of outliers in contrast to regular case. |
| 19 |
|
| 20 |
Therefore, the Linux RealTime Communication Testbench also includes the possibility to generate a histogram file after |
| 21 |
a successful run. The histogram itself is a text file which can be easily plotted e.g., with |
| 22 |
``gnuplot``. |
| 23 |
|
| 24 |
The histogram functionality is disabled by default. To enable it, apply the following options the |
| 25 |
configuration file of the ``reference`` application. |
| 26 |
|
| 27 |
Configuration parameters |
| 28 |
------------------------- |
| 29 |
|
| 30 |
The parameters which affect the histogram integration are presented in the table below: |
| 31 |
|
| 32 |
.. list-table:: Features & configure options |
| 33 |
:widths: 50 100 |
| 34 |
:header-rows: 1 |
| 35 |
|
| 36 |
* - Option |
| 37 |
- Description |
| 38 |
|
| 39 |
* - StatsHistogramEnabled |
| 40 |
- Decides whether a histogram is written after successful run or not |
| 41 |
|
| 42 |
* - StatsHistogramMinimumNS |
| 43 |
- Lower boundary of RTT which is recorded in histogram e.g., 1ms |
| 44 |
|
| 45 |
* - StatsHistogramMaximumNS |
| 46 |
- Upper boundary of RTT which is recorded in histogram e.g., 10ms |
| 47 |
|
| 48 |
* - StatsHistogramFile |
| 49 |
- Path to file where to store the histogram after run |
| 50 |
|
| 51 |
Example |
| 52 |
------- |
| 53 |
|
| 54 |
The example below shows a histogram of ``tests/profinet``. It is plotted using |
| 55 |
``scripts/plot_histogram.pl`` which requires ``gnuplot`` to be installed. |
| 56 |
|
| 57 |
.. image:: images/histogram.png |
| 58 |
:width: 600 |
| 59 |
:alt: Histogram of tests/profinet |