freertos / Lab-Project-FreeRTOS-LoRaWAN
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 3,745 units with 41,594 lines of code in units (42.4% of code).
    • 5 very complex units (1,645 lines of code)
    • 15 complex units (1,880 lines of code)
    • 98 medium complex units (7,445 lines of code)
    • 169 simple units (6,950 lines of code)
    • 3,458 very simple units (23,674 lines of code)
3% | 4% | 17% | 16% | 56%
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
c5% | 6% | 25% | 23% | 39%
h0% | 0% | 0% | <1% | 99%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver5% | 4% | 16% | 13% | 59%
boards/STM32L475_Discovery/BSP2% | 5% | 27% | 24% | 39%
boards/STM32L475_Discovery0% | 12% | 31% | 0% | 56%
boards/STM32L475_Discovery/common_io0% | 0% | 14% | 50% | 34%
boards/Nordic_NRF52/common_io0% | 0% | 16% | 29% | 54%
boards/Nordic_NRF520% | 0% | 17% | 0% | 82%
freertos_osal0% | 0% | 0% | 23% | 76%
boards/STM32L475_Discovery/CMSIS0% | 0% | 0% | 3% | 96%
logging0% | 0% | 0% | 53% | 46%
Most Complex Units
Top 20 most complex 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_pal_range_status()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_core.c
167 52 6
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_FLASH_IRQHandler()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_flash.c
83 40 1
void HAL_QSPI_IRQHandler()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_qspi.c
139 36 1
HAL_StatusTypeDef UART_SetConfig()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_uart.c
148 32 1
HAL_StatusTypeDef HAL_SPI_Receive()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_spi.c
163 32 4
static HAL_StatusTypeDef FLASH_OB_UserConfig()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_flash_ex.c
113 32 2
void HAL_UART_IRQHandler()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_uart.c
100 30 1
VL53L0X_Error VL53L0X_set_vcsel_pulse_period()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_core.c
186 30 3
VL53L0X_Error VL53L0X_perform_ref_spad_management()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api_calibration.c
165 29 3
VL53L0X_Error VL53L0X_StaticInit()
in boards/STM32L475_Discovery/BSP/Components/vl53l0x/vl53l0x_api.c
127 29 1
HAL_StatusTypeDef HAL_SPI_Transmit()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_spi.c
132 28 4
HAL_StatusTypeDef HAL_RCC_ClockConfig()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_rcc.c
115 27 2
HAL_StatusTypeDef FLASH_WaitForLastOperation()
in boards/STM32L475_Discovery/STM32L4xx_HAL_Driver/stm32l4xx_hal_flash.c
34 26 1
void GpioMcuSetInterrupt()
in boards/STM32L475_Discovery/gpio-board.c
91 26 4