freertos / Lab-Project-FreeRTOS-FAT
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 548 units with 22,125 lines of code in units (74.2% of code).
    • 51 very long units (7,253 lines of code)
    • 92 long units (6,576 lines of code)
    • 167 medium size units (5,736 lines of code)
    • 115 small units (1,725 lines of code)
    • 123 very small units (835 lines of code)
32% | 29% | 25% | 7% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c33% | 29% | 26% | 7% | 3%
h0% | 0% | 0% | 51% | 48%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT40% | 24% | 25% | 6% | 2%
portable/Zynq.2019.339% | 31% | 21% | 6% | 1%
portable/Zynq31% | 36% | 25% | 5% | 1%
portable/STM32F4xx25% | 40% | 23% | 5% | 4%
portable/STM32F7xx25% | 39% | 23% | 6% | 5%
portable/common0% | 49% | 34% | 13% | 2%
portable/ATSAM4E0% | 15% | 54% | 24% | 5%
portable/lpc18xx0% | 0% | 60% | 29% | 10%
portable/avr32_uc30% | 0% | 52% | 33% | 14%
include0% | 0% | 0% | 31% | 68%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
s32 XSdPs_CardInitialize()
in portable/Zynq.2019.3/xsdps.c
377 91 1
296 51 6
s32 XSdPs_CardInitialize()
in portable/Zynq/xsdps.c
234 45 1
s32 XSdPs_SdCardInitialize()
in portable/Zynq.2019.3/xsdps.c
207 29 1
181 31 4
180 24 2
int32_t FF_Write()
in ff_file.c
175 30 4
170 24 2
int32_t FF_Read()
in ff_file.c
165 27 4
164 27 4
159 22 2
HAL_SD_ErrorTypedef HAL_SD_WriteBlocks()
in portable/STM32F4xx/stm32f4xx_hal_sd.c
158 26 5
153 16 5
s32 XSdPs_SdCardInitialize()
in portable/Zynq/xsdps.c
153 20 1
HAL_SD_ErrorTypedef HAL_SD_WriteBlocks()
in portable/STM32F7xx/stm32f7xx_hal_sd.c
152 25 5
151 14 3
u32 XSdPs_FrameCmd()
in portable/Zynq.2019.3/xsdps.c
151 11 2
146 32 2
int ff_findnext()
in ff_stdio.c
139 22 1
133 24 2