freertos / Lab-Project-FreeRTOS-LoRaWAN
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 3,745 units with 41,594 lines of code in units (42.4% of code).
    • 37 very long units (5,738 lines of code)
    • 111 long units (7,524 lines of code)
    • 325 medium size units (10,081 lines of code)
    • 350 small units (5,065 lines of code)
    • 2,922 very small units (13,186 lines of code)
13% | 18% | 24% | 12% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c19% | 25% | 31% | 13% | 9%
h0% | 0% | 6% | 8% | 84%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver15% | 17% | 18% | 7% | 40%
boards/STM32L475_Discovery/BSP19% | 20% | 33% | 15% | 10%
boards/STM32L475_Discovery0% | 43% | 18% | 17% | 20%
boards/STM32L475_Discovery/common_io0% | 24% | 49% | 17% | 9%
boards/Nordic_NRF52/common_io0% | 16% | 51% | 23% | 8%
boards/Nordic_NRF520% | 17% | 20% | 26% | 35%
logging0% | 53% | 20% | 26% | 0%
boards/STM32L475_Discovery/CMSIS0% | 0% | 35% | 37% | 27%
freertos_osal0% | 0% | 32% | 40% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
uint32_t HAL_RCCEx_GetPeriphCLKFreq()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_rcc_ex.c
628 157 1
HAL_StatusTypeDef HAL_RCC_OscConfig()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_rcc.c
333 69 1
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_rcc_ex.c
299 63 1
HAL_StatusTypeDef HAL_SPI_TransmitReceive()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_spi.c
218 56 5
VL53L0X_Error VL53L0X_get_info_from_device()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_core.c
200 18 2
VL53L0X_Error VL53L0X_set_vcsel_pulse_period()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_core.c
186 30 3
void HAL_TIM_IRQHandler()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_tim.c
173 23 1
VL53L0X_Error VL53L0X_get_pal_range_status()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_core.c
167 52 6
VL53L0X_Error VL53L0X_calc_sigma_estimate()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_core.c
165 12 4
VL53L0X_Error VL53L0X_perform_ref_spad_management()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_calibration.c
165 29 3
HAL_StatusTypeDef HAL_SPI_Receive()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_spi.c
163 32 4
HAL_StatusTypeDef UART_SetConfig()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_uart.c
148 32 1
HAL_StatusTypeDef HAL_TIM_RegisterCallback()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_tim.c
144 41 3
HAL_StatusTypeDef HAL_TIM_UnRegisterCallback()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_tim.c
140 40 2
void HAL_QSPI_IRQHandler()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_qspi.c
139 36 1
HAL_StatusTypeDef HAL_SPI_Abort_IT()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_spi.c
137 25 1
HAL_StatusTypeDef HAL_SPI_Transmit()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_spi.c
132 28 4
VL53L0X_Error VL53L0X_StaticInit()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api.c
127 29 1
HAL_StatusTypeDef HAL_RTC_SetAlarm_IT()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_rtc.c
124 11 3
HAL_StatusTypeDef HAL_RTC_SetAlarm()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_rtc.c
120 11 3