freertos / lab-iot-reference-stm32u5
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 9,097 units with 155,104 lines of code in units (68.6% of code).
    • 7 very complex units (2,916 lines of code)
    • 58 complex units (9,086 lines of code)
    • 494 medium complex units (38,998 lines of code)
    • 710 simple units (30,961 lines of code)
    • 7,828 very simple units (73,143 lines of code)
1% | 5% | 25% | 19% | 47%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
c2% | 6% | 29% | 23% | 38%
py0% | 0% | 37% | 32% | 30%
h0% | 0% | <1% | <1% | 99%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Drivers/STM32U5xx_HAL2% | 7% | 28% | 19% | 42%
Drivers/BSP2% | 3% | 20% | 20% | 52%
Drivers/stm32u5_mbedtls_accel0% | 3% | 33% | 29% | 33%
Projects/B-U585I-IOT02A0% | 1% | 24% | 28% | 45%
Drivers/CommonIO0% | 0% | 16% | 40% | 42%
tools0% | 0% | 37% | 32% | 30%
Middleware/FreeRTOS0% | 0% | 19% | 0% | 80%
Drivers/CMSIS0% | 0% | 0% | <1% | 99%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
uint32_t HAL_RCCEx_GetPeriphCLKFreq()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_rcc_ex.c
750 185 1
HAL_StatusTypeDef HAL_RCC_OscConfig()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_rcc.c
509 106 1
int32_t lsm6dso_mode_get()
in Drivers/BSP/Components/lsm6dso/lsm6dso_reg.c
403 93 3
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_rcc_ex.c
407 88 1
int32_t lsm6dso_mode_set()
in Drivers/BSP/Components/lsm6dso/lsm6dso_reg.c
316 80 3
HAL_StatusTypeDef HAL_ADC_ConfigChannel()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_adc.c
310 68 2
HAL_StatusTypeDef HAL_SPI_TransmitReceive()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_spi.c
221 52 5
HAL_StatusTypeDef HAL_TIM_RegisterCallback()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_tim.c
172 50 3
HAL_StatusTypeDef HAL_SD_ConfigSpeedBusOperation()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_sd.c
222 50 2
HAL_StatusTypeDef HAL_TIM_UnRegisterCallback()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_tim.c
167 49 2
void HAL_UART_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_uart.c
194 49 1
void HAL_SMARTCARD_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_smartcard.c
192 48 1
void HAL_ADC_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_adc.c
205 48 1
HAL_StatusTypeDef HAL_OSPIM_Config()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_ospi.c
214 44 3
void HAL_USART_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_usart.c
162 44 1
HAL_StatusTypeDef HAL_ADC_Init()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_adc.c
319 44 1
void HAL_PCD_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_pcd.c
297 44 1
HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_adc_ex.c
260 43 2
void HAL_SPI_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_spi.c
179 41 1
void HAL_SD_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_sd.c
176 40 1