Developer Guide

  • 2022.1
  • 09/08/2022
  • Public
Contents

Plot the Data From Log Files

On your host system, use
tcc_rt_communication_demo_plotter.py
to plot the data from
log_e2e.log
and
log-roundtrip.log
.
Prerequisite: Python* release 3.7 or newer, NumPy* and Matplotlib* packages.

Prepare your host system

To prepare your host system for plotting data in the log file:
  1. On the host system, source the environment file to set up environment variables:
    source ~/intel/tcc_tools/latest/env/vars.sh
  2. Go to the script directory:
    cd ${TCC_ROOT}/samples/plot_scripts
  3. Install the required python modules:
    sudo pip3 install -r prerequisites.txt
    or
    sudo python3 -m pip install -r prerequisites.txt

Plot data for local log files

  1. Copy
    tcc_rt_communication_demo_output/log_e2e.log
    and
    tcc_rt_communication_demo_output/log-roundtrip.log
    from the target system to the script directory in the host system.
    The input file can also be accessed on target boards directly. See the Accessing the log files on the target board section below.
  2. Run the script:
    python3 tcc_rt_communication_demo_plotter.py --input log_e2e.log --output e2e.png python3 tcc_rt_communication_demo_plotter.py --input log-roundtrip.log --output roundtrip.png
  3. You can specify multiple log files (optimized and non-optimized profiles, for example) to show all statistics on one diagram:
    python3 tcc_rt_communication_demo_plotter.py --input log_e2e-opt.log log_e2e-noopt.log --output e2e.png

Accessing the log files on the target board

To use the
tcc_rt_communication_demo_plotter.py
script to directly access input files on the target boards, pass the target hostname or IP in the
--address hostname
argument:
python3 tcc_rt_communication_demo_plotter.py --address hostname --user user --input log_e2e-opt.log log_e2e-noopt.log --output e2e.png
When accessing the log data on remote systems, other arguments are also available. For example
--user <username>
and
--base-dir <base directory>
. See the The plot script command-line options section for details.

The plot script command-line options

Option
Description
-i, --input <input files list>
The list of input log files. Relative or absolute paths can be used. When accessing input log files on remote systems, and relative paths are used, the location will be selected in respect to the base directory specified with the
--base-dir
argument. When accessing input log files locally, the relative locations are used in respect to the current directory, the
--base-dir
argument is ignored in this case. An absolute path starting with the leading
/
corresponding to the root directory, can also be used for any input log files.
-o, --output <output filename>
The output filename to save the image. GUI window will be opened if filename not specified.
-h, --help
Optional. Print command-line help.
-a, --address <target hostname or IP>
An optional argument to specify the hostname or IP address for the target where the input files are located. If this argument is not specified, the local input files are used.
-u, --user <target username>
The username for accessing the remote target system. If this argument is not provided, the
root
username will be used. It is not used for accessing local log files.
-b, --base-dir <target base directory>
The base directory for specifying input files on remote target systems,
tcc_rt_communication_demo_output
in the home directory will be used by default. This argument is not used for accessing local log files.
The script prints latency statistics to the console and generates images depending on arguments.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.