freertos / FreeRTOS-Kernel
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 2,820 units with 37,538 lines of code in units (38.7% of code).
    • 18 very long units (2,452 lines of code)
    • 117 long units (8,015 lines of code)
    • 215 medium size units (6,835 lines of code)
    • 593 small units (8,490 lines of code)
    • 1,877 very small units (11,746 lines of code)
6% | 21% | 18% | 22% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c8% | 28% | 23% | 23% | 15%
h0% | 0% | 4% | 20% | 75%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT17% | 33% | 31% | 13% | 3%
portable/GCC5% | 22% | 16% | 25% | 29%
portable/ARMv8M22% | 32% | 14% | 24% | 6%
portable/MPLAB29% | 0% | 5% | 26% | 38%
portable/IAR0% | 13% | 10% | 20% | 55%
portable/RVDS0% | 22% | 26% | 30% | 20%
portable/Renesas0% | 28% | 31% | 24% | 16%
portable/CCS0% | 32% | 18% | 26% | 22%
portable/MSVC-MingW0% | 39% | 23% | 24% | 11%
portable/MikroC0% | 31% | 25% | 27% | 15%
portable/MemMang0% | 13% | 65% | 10% | 9%
portable/oWatcom0% | 0% | 30% | 41% | 27%
portable/BCC0% | 0% | 30% | 41% | 27%
portable/WizC0% | 0% | 34% | 37% | 27%
portable/Common0% | 0% | 0% | 29% | 70%
include0% | 0% | 0% | 100% | 0%
portable/CodeWarrior0% | 0% | 0% | 42% | 57%
portable/Softune0% | 0% | 0% | 46% | 53%
portable/Tasking0% | 0% | 0% | 52% | 47%
portable/SDCC0% | 0% | 0% | 56% | 43%
portable/Paradigm0% | 0% | 0% | 29% | 70%
portable/Rowley0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void PendSV_Handler()
in portable/GCC/ARM_CM23/non_secure/portasm.c
182 1 1
void PendSV_Handler()
in portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c
182 1 1
asm volatile()
in portable/GCC/ATMega323/port.c
171 1 1
void PendSV_Handler()
in portable/GCC/ARM_CM33/non_secure/portasm.c
167 1 1
void PendSV_Handler()
in portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c
167 1 1
150 16 2
150 7 8
141 23 4
asm volatile()
in portable/MPLAB/PIC24_dsPIC/port.c
139 4 1
void PendSV_Handler()
in portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c
122 1 1
void PendSV_Handler()
in portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c
122 1 1
115 17 4
113 13 1
109 12 2
108 13 2
108 13 5
104 14 3
102 14 3
void PendSV_Handler()
in portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c
97 1 1
void PendSV_Handler()
in portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c
97 1 1