microsoft / mu_oem_sample
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 9 units with 265 lines of code in units (4.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (94 lines of code)
    • 3 medium size units (115 lines of code)
    • 2 small units (31 lines of code)
    • 3 very small units (25 lines of code)
0% | 35% | 43% | 11% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 35% | 43% | 11% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
OemPkg/BootMenu0% | 83% | 0% | 16% | 0%
OemPkg/FrontPage0% | 0% | 87% | 0% | 12%
OemPkg/Library/MsBootPolicyLib0% | 0% | 0% | 57% | 42%
Alternative Visuals
Longest Units
Top 9 longest units
Unit# linesMcCabe index# params
VOID RebuildOrderList()
in OemPkg/BootMenu/BootMenu.c
94 11 1
EFI_STATUS GetAndDisplayBitmap()
in OemPkg/FrontPage/FrontPage.c
49 4 3
VOID RefreshSecurityForm()
in OemPkg/FrontPage/FrontPageUi.c
40 3 1
VOID RemoveMenuFromList()
in OemPkg/FrontPage/FrontPage.c
26 9 1
BOOLEAN IsDefaultBootOption()
in OemPkg/BootMenu/BootMenu.c
19 3 1
static VOID PrintDevicePath()
in OemPkg/Library/MsBootPolicyLib/MsBootPolicyLib.c
12 3 1
BOOLEAN IsDfciEnabledForDisplay()
in OemPkg/FrontPage/FrontPage.c
10 2 1
VOID GetButtonServiceProtocol()
in OemPkg/Library/MsBootPolicyLib/MsBootPolicyLib.c
9 3 1
BOOLEAN IsHwhEnabledForDisplay()
in OemPkg/FrontPage/FrontPage.c
6 1 1