blob: f9db4a11732ead75947dcd8e738eb9d7931c644f [file] [log] [blame]
Jimmy Brissoncb545bd2021-01-06 13:52:58 -06001Scripts that Generate Graphs
2============================
3
4This directory contains scripts that generate graphs. Each script is run with
5bash and may require additional tools. All of the scripts require gnuplot.
6
7All scripts produce a PNG graph on stdout and the data on stderr.
8
9Test Runs by category
10---------------------
11
12The script `categorize-tests.bash`, and its associated awk and plot scripts,
13generate a stacked bar chart with bars representing groups of tests (l1 l2,
14etc.) and segments of the bars representing types. `categorize-tests.bash`
15accepts an argument to filter the tests included with grep.
16
17For example, the following will produce a graph of the juno-specific tests:
18
19 bash categorize-tests.bash juno > juno-tests.png 2> juno-tests.txt
20
Jimmy Brissonc7e28f52021-01-21 16:23:21 -060021Lines of Code by Module
22-----------------------
23
24The script `sloc-viz.bash`, and its associated plot script, generate a stacked
25bar chart where each bar is a module and the bars' segments represent programming
26languages (or documentation languages). This script will produce a graph for
27whatever directory it's run within, and has special logic that includes more
28detail when run from the Trusted Firmware - A project's root directory.
29
30This script has additional requirements:
31* ``tokei`` - a quick source lines of code counting tool
32* ``jq`` - a JSON query language for the command line, version 1.6 or later
33 as the ``--jsonargs`` option is required
34
35For example, when run from the root of TF-A, the following commandline will graph
36sloc of TF-A:
37
38 bash ../<this-repo>/script/graph/sloc-viz.bash > sloc.png 2> sloc.tsv
39
Jimmy Brissoncb545bd2021-01-06 13:52:58 -060040*Copyright (c) 2021, Arm Limited. All rights reserved.*