freertos / FreeRTOS-Plus-TCP
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 1,015 units with 27,359 lines of code in units (69.4% of code).
    • 43 very long units (6,315 lines of code)
    • 104 long units (7,302 lines of code)
    • 235 medium size units (7,843 lines of code)
    • 277 small units (3,920 lines of code)
    • 356 very small units (1,979 lines of code)
23% | 26% | 28% | 14% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c24% | 28% | 30% | 11% | 5%
h0% | 0% | 6% | 55% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT38% | 23% | 25% | 8% | 3%
portable/NetworkInterface/xilinx_ultrascale31% | 34% | 18% | 12% | 3%
portable/NetworkInterface/STM32Hxx14% | 30% | 31% | 16% | 6%
tools/tcp_utilities33% | 27% | 31% | 7% | 0%
portable/NetworkInterface/Common55% | 22% | 16% | 3% | 1%
portable/NetworkInterface/STM32Fxx18% | 35% | 23% | 13% | 8%
portable/NetworkInterface/ATSAM4E10% | 15% | 20% | 33% | 18%
portable/NetworkInterface/ksz8851snl22% | 26% | 27% | 19% | 3%
portable/NetworkInterface/Zynq10% | 49% | 21% | 16% | 1%
portable/NetworkInterface/LPC18xx18% | 25% | 42% | 12% | <1%
portable/NetworkInterface/DriverSAM0% | 28% | 23% | 27% | 20%
portable/NetworkInterface/MPS2_AN3850% | 34% | 34% | 16% | 13%
portable/NetworkInterface/pic32mzef0% | 22% | 52% | 18% | 7%
portable/NetworkInterface/M4870% | 26% | 34% | 21% | 17%
portable/NetworkInterface/RX0% | 27% | 55% | 7% | 9%
portable/NetworkInterface/LPC540180% | 38% | 46% | 9% | 5%
portable/NetworkInterface/WinPCap0% | 26% | 38% | 31% | 2%
portable/NetworkInterface/linux0% | 16% | 77% | 3% | 2%
portable/NetworkInterface/ATSAME5x0% | 27% | 30% | 23% | 18%
portable/BufferManagement0% | 24% | 45% | 5% | 24%
portable/NetworkInterface/LPC17xx0% | 0% | 84% | 15% | 0%
portable/NetworkInterface/esp320% | 0% | 71% | 15% | 12%
portable/NetworkInterface/mw300_rd0% | 0% | 57% | 23% | 18%
portable/NetworkInterface/SH2A0% | 0% | 0% | 63% | 36%
portable/NetworkInterface/board_family0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static void SetUpSLCRDivisors()
in portable/NetworkInterface/xilinx_ultrascale/x_emacpsif_physpeed.c
314 45 2
290 39 3
280 54 5
void vDHCPProcess()
in FreeRTOS_DHCP.c
269 39 2
248 36 3
static void ksz8851snl_update()
in portable/NetworkInterface/ksz8851snl/NetworkInterface.c
220 29 0
198 21 4
161 31 1
BaseType_t FreeRTOS_recv()
in FreeRTOS_Sockets.c
157 33 4
void HAL_ETH_IRQHandler()
in portable/NetworkInterface/STM32Hxx/stm32hxx_hal_eth.c
155 15 1
153 24 1
147 24 3
static void prvIPTask()
in FreeRTOS_IP.c
146 23 1
BaseType_t xPhyStartAutoNegotiation()
in portable/NetworkInterface/Common/phyHandling.c
143 32 2
140 21 3
void vTCPStateChange()
in FreeRTOS_TCP_IP.c
139 24 2
static void ETH_MACDMAConfig()
in portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c
135 4 2
static void vActualDump()
in tools/tcp_utilities/tcp_dump_packets.c
134 22 3
unsigned get_IEEE_phy_speed()
in portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c
129 11 1
XStatus init_dma()
in portable/NetworkInterface/xilinx_ultrascale/x_emacpsif_dma.c
129 12 1