microsoft / mu_silicon_arm_tiano
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 134 units with 1,019 lines of code in units (2.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 8 medium size units (249 lines of code)
    • 18 small units (265 lines of code)
    • 107 very small units (449 lines of code)
0% | 5% | 24% | 26% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 7% | 27% | 34% | 31%
c0% | 0% | 17% | 0% | 82%
inc0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ArmPlatformPkg/Scripts0% | 9% | 28% | 34% | 27%
ArmVirtPkg/PlatformCI0% | 0% | 22% | 34% | 43%
ArmPkg/Library0% | 0% | 17% | 0% | 82%
ArmVirtPkg0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def add_cycles_to_function()
in ArmPlatformPkg/Scripts/Ds5/profile.py
56 21 4
def load_current_symbols()
in ArmPlatformPkg/Scripts/Ds5/edk2_debugger.py
44 19 1
RETURN_STATUS ArchVectorConfig()
in ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
37 3 1
def FlashRomImage()
in ArmVirtPkg/PlatformCI/PlatformBuild.py
37 8 1
def __init__()
in ArmPlatformPkg/Scripts/Ds5/edk2_debugger.py
34 16 5
def load_symbol_from_console()
in ArmPlatformPkg/Scripts/Ds5/console_loader.py
29 14 4
def get_debug_info()
in ArmPlatformPkg/Scripts/Ds5/system_table.py
24 7 1
def __init__()
in ArmPlatformPkg/Scripts/Ds5/system_table.py
23 8 4
def get_debug_filepath()
in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py
21 7 1
def load_symbols_at()
in ArmPlatformPkg/Scripts/Ds5/system_table.py
19 9 3
def get_configuration_table()
in ArmPlatformPkg/Scripts/Ds5/system_table.py
19 6 2
def get_debug_filepath()
in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py
18 7 1
def get_debug_filepath()
in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py
18 7 1
def load_symbols_at()
in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py
17 9 3
def FilterPackagesToTest()
in ArmVirtPkg/PlatformCI/PlatformBuild.py
17 6 3
def dump_fv()
in ArmPlatformPkg/Scripts/Ds5/edk2_debugger.py
16 4 3
def GetRequiredSubmodules()
in ArmVirtPkg/PlatformCI/PlatformBuild.py
16 4 1
def load_all_symbols()
in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py
15 7 2
def get_next_section()
in ArmPlatformPkg/Scripts/Ds5/firmware_volume.py
14 5 2
def parse_pcd_report()
in ArmPlatformPkg/Scripts/Ds5/build_report.py
13 5 2