freertos / lab-iot-reference-stm32u5
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 9,097 units with 155,104 lines of code in units (68.6% of code).
    • 170 very long units (25,646 lines of code)
    • 556 long units (37,760 lines of code)
    • 1,304 medium size units (41,286 lines of code)
    • 1,594 small units (23,062 lines of code)
    • 5,473 very small units (27,350 lines of code)
16% | 24% | 26% | 14% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c19% | 28% | 30% | 14% | 7%
py0% | 24% | 38% | 20% | 16%
h0% | <1% | 2% | 16% | 81%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Drivers/STM32U5xx_HAL21% | 27% | 22% | 8% | 19%
Drivers/BSP10% | 15% | 37% | 26% | 10%
Projects/B-U585I-IOT02A10% | 34% | 33% | 14% | 6%
Drivers/stm32u5_mbedtls_accel2% | 41% | 35% | 12% | 8%
Drivers/CommonIO0% | 21% | 43% | 21% | 13%
tools0% | 24% | 38% | 20% | 16%
Middleware/FreeRTOS0% | 19% | 36% | 25% | 18%
Drivers/CMSIS0% | 0% | 3% | 45% | 51%
Alternative Visuals
Longest Units
Top 20 longest 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
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_rcc_ex.c
407 88 1
int32_t lsm6dso_mode_get()
in Drivers/BSP/Components/lsm6dso/lsm6dso_reg.c
403 93 3
HAL_StatusTypeDef HAL_ADC_Init()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_adc.c
319 44 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
int32_t OV5640_Init()
in Drivers/BSP/Components/ov5640/ov5640.c
308 15 3
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
static HAL_StatusTypeDef CRYP_AESGCM_Process_IT()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_cryp.c
239 30 1
HAL_StatusTypeDef HAL_SD_ConfigSpeedBusOperation()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_sd.c
222 50 2
void HAL_TIM_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_tim.c
221 31 1
HAL_StatusTypeDef HAL_SPI_TransmitReceive()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_spi.c
221 52 5
HAL_StatusTypeDef HAL_OSPIM_Config()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_ospi.c
214 44 3
static HAL_StatusTypeDef CRYP_AESCCM_Process_IT()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_cryp.c
212 36 1
HAL_StatusTypeDef HAL_SAI_Init()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_sai.c
205 35 1
void HAL_ADC_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_adc.c
205 48 1
HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_spi.c
201 37 4
void HAL_UART_IRQHandler()
in Drivers/STM32U5xx_HAL/Src/stm32u5xx_hal_uart.c
194 49 1