microsoft / mu_plus
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 104 units with 2,065 lines of code in units (1.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (228 lines of code)
    • 6 medium complex units (312 lines of code)
    • 16 simple units (589 lines of code)
    • 80 very simple units (936 lines of code)
0% | 11% | 15% | 28% | 45%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
c0% | 11% | 16% | 25% | 46%
py0% | 10% | 13% | 32% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
HidPkg0% | 100% | 0% | 0% | 0%
UefiTestingPkg0% | 15% | 12% | 32% | 39%
PcBdsPkg0% | 0% | 57% | 14% | 28%
AdvLoggerPkg0% | 0% | 15% | 33% | 50%
XmlSupportPkg0% | 0% | 83% | 0% | 16%
MsGraphicsPkg0% | 0% | 0% | 31% | 68%
DfciPkg0% | 0% | 0% | 85% | 14%
MsCorePkg0% | 0% | 0% | 0% | 100%
MfciPkg0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def Parse()
in UefiTestingPkg/AuditTests/PagingAudit/Windows/PagingReportGenerator.py
97 38 1
VOID ProcessKeyStroke()
in HidPkg/HidKeyboardDxe/HidKeyboard.c
131 28 3
BOOLEAN RtlRawXmlTokenizer_IsValidPubIdCharacter()
in XmlSupportPkg/Library/XmlTreeLib/fasterxml/xml_fasterxml.c
41 25 2
def _GetNextFormattedLine()
in AdvLoggerPkg/Application/DecodeUefiLog/DecodeUefiLog.py
48 15 3
BOOLEAN CompareDevicePathAgtB()
in PcBdsPkg/MsBootPolicy/MsBootPolicy.c
70 15 2
def sameAttributes()
in UefiTestingPkg/AuditTests/PagingAudit/Windows/MemoryRangeObjects.py
26 15 2
def main()
in UefiTestingPkg/AuditTests/UefiVarLockAudit/Windows/UefiVarAudit.py
53 14 0
EFI_STATUS SelectAndBootDevice()
in PcBdsPkg/MsBootPolicy/MsBootPolicy.c
74 12 2
def OutputHtmlReport()
in UefiTestingPkg/AuditTests/PagingAudit/Windows/PagingReportGenerator.py
28 10 3
OUT UINT8()
in DfciPkg/IdentityAndAuthManager/CertSupport.c
46 9 1
def __init__()
in UefiTestingPkg/AuditTests/PagingAudit/Windows/MemoryRangeObjects.py
27 9 4
def toDictionary()
in UefiTestingPkg/AuditTests/PagingAudit/Windows/MemoryRangeObjects.py
25 9 1
def _InitializeLoggerInfo()
in AdvLoggerPkg/Application/DecodeUefiLog/DecodeUefiLog.py
76 8 3
EFIAPI TimerTick()
in DfciPkg/Application/DfciMenu/DfciRequest.c
58 8 2
VOID Ctor()
in MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c
100 8 11
def main()
in UefiTestingPkg/AuditTests/PagingAudit/Windows/PagingReportGenerator.py
34 8 0
VOID SortHandles()
in PcBdsPkg/MsBootPolicy/MsBootPolicy.c
35 7 2
def CheckExemptListCount()
in UefiTestingPkg/AuditTests/DMAProtectionAudit/Windows/IVRSTableAudit.py
15 7 3
def SetUefiVar()
in AdvLoggerPkg/Application/DecodeUefiLog/UefiVariablesSupportLib.py
24 6 5
VOID Dtor()
in MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c
24 6 1