microsoft / uf2-samdx1
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 1,443 units with 42,722 lines of code in units (12.1% of code).
    • 3 very complex units (1,207 lines of code)
    • 13 complex units (3,464 lines of code)
    • 90 medium complex units (11,867 lines of code)
    • 164 simple units (11,133 lines of code)
    • 1,173 very simple units (15,051 lines of code)
2% | 8% | 27% | 26% | 35%
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% | 8% | 29% | 27% | 31%
js0% | 0% | 0% | 36% | 63%
cpp0% | 0% | 0% | 22% | 77%
h0% | 0% | 0% | 1% | 98%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/cmsis2% | 8% | 28% | 26% | 33%
src8% | 4% | 17% | 24% | 45%
scripts/clean-ifaces0% | 0% | 0% | 100% | 0%
lib/samd210% | 0% | 0% | 0% | 100%
inc0% | 0% | 0% | 0% | 100%
lib/usb_msc0% | 0% | 0% | 0% | 100%
lib/samd510% | 0% | 0% | 0% | 100%
lib/same540% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static int32_t USART_Control()
in lib/cmsis/CMSIS/Pack/Example/CMSIS_Driver/USART_LPC18xx.c
305 104 3
arm_status arm_conv_partial_fast_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_fast_q15.c
661 61 7
void AT91F_CDC_Enumerate()
in src/cdc_enumerate.c
241 54 0
void arm_conv_fast_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_fast_q15.c
601 47 5
static int32_t SSPx_Control()
in lib/cmsis/CMSIS/Pack/Example/CMSIS_Driver/SSP_LPC18xx.c
175 42 3
static void USART_IRQHandler()
in lib/cmsis/CMSIS/Pack/Example/CMSIS_Driver/USART_LPC18xx.c
98 41 1
arm_status arm_conv_partial_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_q15.c
325 38 7
void sam_ba_monitor_run()
in src/sam_ba_monitor.c
122 38 1
void arm_correlate_fast_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_correlate_fast_q15.c
555 37 5
void arm_conv_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_q15.c
284 30 5
arm_status arm_conv_partial_f32()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_f32.c
258 29 7
arm_status arm_conv_partial_q31()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_q31.c
246 29 7
arm_status arm_conv_partial_q7()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_q7.c
312 29 7
void arm_correlate_q15()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_correlate_q15.c
276 28 5
void SDIO_IRQHandler()
in lib/cmsis/CMSIS/Pack/Example/CMSIS_Driver/MCI_LPC18xx.c
126 28 1
static uint32_t I2Cx_SlaveHandler()
in lib/cmsis/CMSIS/Pack/Example/CMSIS_Driver/I2C_LPC18xx.c
86 26 1
void SetClock()
in lib/cmsis/CMSIS/Pack/Example/Boards/Keil/MCB1800/RTX_Blinky/RTE/Device/LPC1857/system_LPC18xx.c
130 25 1
static int32_t Control()
in lib/cmsis/CMSIS/Pack/Example/CMSIS_Driver/MCI_LPC18xx.c
96 25 2
arm_status arm_conv_partial_fast_q31()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_conv_partial_fast_q31.c
245 24 7
void arm_correlate_f32()
in lib/cmsis/CMSIS/DSP_Lib/Source/FilteringFunctions/arm_correlate_f32.c
254 24 5