blob: 4cfcb1ab6fa904a145958b67d3c87d386873ee9c [file] [log] [blame]
Anton Komlevd7502f82022-06-29 16:52:21 +01001#######################
2SQUAD metrics dashboard
3#######################
4
5:Author: Hugo L'Hostis
6:Organization: Arm Limited
7:Contact: hugo.lhostis@arm.com
8
9******************
10SQUAD Presentation
11******************
12
13Software Quality Dashboard (SQUAD) is a tool used by Trusted Firmware-M (TF-M)
14to keep track of some metrics for the project. It is a Linaro project (see here
15a link to the `SQUAD Documentation`_).
16
17For TF-M the purpose of having such a tool available is to have a history on
18some metrics of the project for different configurations of TF-M.
19
20The TF-M SQUAD is available here : `TFM's SQUAD`_. There are several
21configurations and metrics that can be selected, here is a link with some of
22them already selected :
23`SQUAD parametered for Default, profileS and MinsizeProfileS`_.
24
25**************************
26Metrics and configurations
27**************************
28
29The metrics sent to the dashboard are currently the memory footprint
30measurements from the TFM project calculated by the arm-none-eabi-size
31function for the 2 files bl2.axf and tfm_s.axf :
32
33 - Text section size.
34 - bss section size.
35 - data total size.
36 - Total file size.
37
38Each metric sent to the dashboard can be compared for different configurations
39used. The configurations available currently are the following :
40
41 - Default
42 - CoreIPC
43 - CoreIPCTfmLevel2
44 - DefaultProfileS
45 - DefaultProfileM
46 - DefaultProfileL
47 - MinSizeProfileS (DefaultProfileS with MinsizeRel Cmake type)
48
49For all of the configurations, tests are disabled and the release build type is
Elena Uziunaiteb90a3402023-11-13 16:24:28 +000050used.
Anton Komlevd7502f82022-06-29 16:52:21 +010051More configurations and metrics could be added to the dashboard in the future.
52
53For each metric sent to the SQUAD dashboard, the metric must be linked with the
54state of the TF-M repository at the time of the build. On the dashboard this is
55visible from a string of numbers in the abscissa of the graphs displayed in
56SQUAD. This is the change ID of the latest commit used for the build. This
57means that in the case of 2 consecutive days with no new commit for TF-M, no
58new data points will be created.
59
60**************
61CI integration
62**************
63
64The data is currently sent by the `TFM CI's nightly build`_.
65
66The parameter "SQUAD_CONFIGURATIONS" of the CI build is what will trigger the
67configurations sent to the SQUAD dashboard. It should be set to the
68configurations's names separated by a comma, example :
69
70``SQUAD_CONFIGURATIONS = Default,DefaultProfileS``
71
72In this case, the 2 configurations Default and DefaultProfileS will be enabled
73and the data for those (and only those 2) will be sent to the dashboard.
74This is case insensitive and will ignore any space between the configurations.
75All the files manipulating the data and sending the data is available in the
76`tf-m-ci-scripts repo`_.
77
78The script `memory_footprint.py`_ is launched by the CI nightly build, it
79gathers and sends the data.
80
81*********************
82Adding a new platform
83*********************
84
85Currently, all the data sent is from AN521 builds. To add a new platform to the
86dashboard :
87
881. If the new platform is not already tested by the CI nightly build, it needs
89to be added.
90
912. The ``memory_footprint.py`` file in the `tf-m-ci-scripts repo`_ has to be
92modified to recognise the new platform.
93
943. If ``memory_footprint.py`` detects the new platform with a reference
95configuration, it should send a new metric with a different name to the
96existing ones containing the platform's name.
97
98The data will then be accessible by selecting the correct metrics on the
99dashboard.
100
101
102.. _SQUAD Documentation: https://squad.readthedocs.io/en/latest/index.html
103.. _TFM's SQUAD: https://qa-reports.linaro.org/tf/tf-m/metrics/
104.. _SQUAD parametered for Default, profileS and MinsizeProfileS: https://qa-reports.linaro.org/tf/tf-m/metrics/?environment=Default&environment=DefaultProfileS&environment=MinSizeProfileS&metric=tfms_size&metric=tfms_data&metric=tfms_bss&metric=bl2_size&metric=bl2_data&metric=bl2_bss&range_tfms_size=0,100&range_tfms_data=0,100&range_tfms_bss=0,100&range_bl2_size=0,100&range_bl2_data=0,100&range_bl2_bss=0,100
105.. _TFM CI's nightly build: https://ci.trustedfirmware.org/view/TF-M/job/tf-m-nightly/
106.. _tf-m-ci-scripts repo: https://review.trustedfirmware.org/admin/repos/ci/tf-m-ci-scripts
107.. _memory_footprint.py: https://git.trustedfirmware.org/ci/tf-m-ci-scripts.git/tree/memory_footprint.py?h=refs/heads/master
108
109--------------
110
111*Copyright (c) 2021, Arm Limited. All rights reserved.*