freertos / FreeRTOS-Plus-TCP
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,015 units with 27,359 lines of code in units (69.4% of code).
    • 1 very complex units (280 lines of code)
    • 10 complex units (1,975 lines of code)
    • 71 medium complex units (6,840 lines of code)
    • 144 simple units (7,062 lines of code)
    • 789 very simple units (11,202 lines of code)
1% | 7% | 25% | 25% | 40%
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
c1% | 7% | 26% | 27% | 37%
h0% | 0% | 0% | 6% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT2% | 11% | 35% | 24% | 25%
portable/NetworkInterface/xilinx_ultrascale0% | 17% | 26% | 22% | 32%
portable/NetworkInterface/ksz8851snl0% | 22% | 9% | 26% | 42%
portable/NetworkInterface/Common0% | 31% | 24% | 34% | 10%
portable/NetworkInterface/STM32Hxx0% | 2% | 23% | 33% | 40%
portable/NetworkInterface/Zynq0% | 0% | 36% | 27% | 35%
portable/NetworkInterface/ATSAM4E0% | 0% | 18% | 17% | 64%
portable/NetworkInterface/STM32Fxx0% | 0% | 19% | 22% | 57%
portable/NetworkInterface/pic32mzef0% | 0% | 28% | 21% | 49%
tools/tcp_utilities0% | 0% | 27% | 31% | 40%
portable/NetworkInterface/LPC18xx0% | 0% | 33% | 27% | 39%
portable/NetworkInterface/DriverSAM0% | 0% | 9% | 26% | 63%
portable/NetworkInterface/RX0% | 0% | 27% | 0% | 72%
portable/NetworkInterface/MPS2_AN3850% | 0% | 8% | 30% | 61%
portable/NetworkInterface/linux0% | 0% | 0% | 62% | 37%
portable/NetworkInterface/M4870% | 0% | 0% | 26% | 73%
portable/NetworkInterface/LPC540180% | 0% | 0% | 56% | 43%
portable/NetworkInterface/WinPCap0% | 0% | 0% | 26% | 73%
portable/NetworkInterface/ATSAME5x0% | 0% | 0% | 27% | 72%
portable/NetworkInterface/LPC17xx0% | 0% | 0% | 36% | 63%
portable/NetworkInterface/esp320% | 0% | 0% | 32% | 67%
portable/NetworkInterface/mw300_rd0% | 0% | 0% | 24% | 75%
portable/BufferManagement0% | 0% | 0% | 0% | 100%
portable/NetworkInterface/SH2A0% | 0% | 0% | 0% | 100%
portable/NetworkInterface/board_family0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
280 54 5
static void SetUpSLCRDivisors()
in portable/NetworkInterface/xilinx_ultrascale/x_emacpsif_physpeed.c
314 45 2
290 39 3
void vDHCPProcess()
in FreeRTOS_DHCP.c
269 39 2
248 36 3
BaseType_t FreeRTOS_recv()
in FreeRTOS_Sockets.c
157 33 4
BaseType_t xPhyStartAutoNegotiation()
in portable/NetworkInterface/Common/phyHandling.c
143 32 2
161 31 1
void vSocketSelect()
in FreeRTOS_Sockets.c
125 30 1
static void ksz8851snl_update()
in portable/NetworkInterface/ksz8851snl/NetworkInterface.c
220 29 0
HAL_StatusTypeDef HAL_ETH_GetMACConfig()
in portable/NetworkInterface/STM32Hxx/stm32hxx_hal_eth.c
48 28 2
117 25 3
void vTCPStateChange()
in FreeRTOS_TCP_IP.c
139 24 2
147 24 3
153 24 1
static void prvIPTask()
in FreeRTOS_IP.c
146 23 1
97 23 2
static void vActualDump()
in tools/tcp_utilities/tcp_dump_packets.c
134 22 3
127 21 2
198 21 4