freertos / Lab-Project-FreeRTOS-FAT
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 548 units with 22,125 lines of code in units (74.2% of code).
    • 3 very complex units (785 lines of code)
    • 15 complex units (2,252 lines of code)
    • 90 medium complex units (8,254 lines of code)
    • 92 simple units (4,532 lines of code)
    • 348 very simple units (6,302 lines of code)
3% | 10% | 37% | 20% | 28%
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
c3% | 10% | 37% | 20% | 27%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT4% | 12% | 42% | 16% | 24%
portable/Zynq.2019.311% | 9% | 39% | 22% | 17%
portable/Zynq0% | 14% | 29% | 29% | 26%
portable/STM32F4xx0% | 10% | 36% | 21% | 31%
portable/STM32F7xx0% | 4% | 41% | 20% | 33%
portable/ATSAM4E0% | 0% | 15% | 13% | 70%
portable/common0% | 0% | 0% | 83% | 16%
portable/lpc18xx0% | 0% | 0% | 30% | 69%
portable/avr32_uc30% | 0% | 0% | 9% | 90%
include0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
s32 XSdPs_CardInitialize()
in portable/Zynq.2019.3/xsdps.c
377 91 1
112 52 1
296 51 6
s32 XSdPs_CardInitialize()
in portable/Zynq/xsdps.c
234 45 1
u32 XSdPs_FrameCmd()
in portable/Zynq.2019.3/xsdps.c
105 34 2
u32 XSdPs_FrameCmd()
in portable/Zynq/xsdps.c
93 33 2
146 32 2
181 31 4
129 30 2
int32_t FF_Write()
in ff_file.c
175 30 4
s32 XSdPs_SdCardInitialize()
in portable/Zynq.2019.3/xsdps.c
207 29 1
164 27 4
int32_t FF_Read()
in ff_file.c
165 27 4
131 26 3
133 26 2
static HAL_SD_ErrorTypedef SD_CmdResp1Error()
in portable/STM32F7xx/stm32f7xx_hal_sd.c
115 26 2
HAL_SD_ErrorTypedef HAL_SD_WriteBlocks()
in portable/STM32F4xx/stm32f4xx_hal_sd.c
158 26 5
static HAL_SD_ErrorTypedef SD_CmdResp1Error()
in portable/STM32F4xx/stm32f4xx_hal_sd.c
116 26 2
118 25 2
HAL_SD_ErrorTypedef HAL_SD_WriteBlocks()
in portable/STM32F7xx/stm32f7xx_hal_sd.c
152 25 5