Jimmy Brisson | cb545bd | 2021-01-06 13:52:58 -0600 | [diff] [blame] | 1 | Scripts that Generate Graphs |
| 2 | ============================ |
| 3 | |
| 4 | This directory contains scripts that generate graphs. Each script is run with |
| 5 | bash and may require additional tools. All of the scripts require gnuplot. |
| 6 | |
| 7 | All scripts produce a PNG graph on stdout and the data on stderr. |
| 8 | |
| 9 | Test Runs by category |
| 10 | --------------------- |
| 11 | |
| 12 | The script `categorize-tests.bash`, and its associated awk and plot scripts, |
| 13 | generate a stacked bar chart with bars representing groups of tests (l1 l2, |
| 14 | etc.) and segments of the bars representing types. `categorize-tests.bash` |
| 15 | accepts an argument to filter the tests included with grep. |
| 16 | |
| 17 | For 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 Brisson | c7e28f5 | 2021-01-21 16:23:21 -0600 | [diff] [blame^] | 21 | Lines of Code by Module |
| 22 | ----------------------- |
| 23 | |
| 24 | The script `sloc-viz.bash`, and its associated plot script, generate a stacked |
| 25 | bar chart where each bar is a module and the bars' segments represent programming |
| 26 | languages (or documentation languages). This script will produce a graph for |
| 27 | whatever directory it's run within, and has special logic that includes more |
| 28 | detail when run from the Trusted Firmware - A project's root directory. |
| 29 | |
| 30 | This 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 | |
| 35 | For example, when run from the root of TF-A, the following commandline will graph |
| 36 | sloc of TF-A: |
| 37 | |
| 38 | bash ../<this-repo>/script/graph/sloc-viz.bash > sloc.png 2> sloc.tsv |
| 39 | |
Jimmy Brisson | cb545bd | 2021-01-06 13:52:58 -0600 | [diff] [blame] | 40 | *Copyright (c) 2021, Arm Limited. All rights reserved.* |