microsoft / pal
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 1,933 units with 33,144 lines of code in units (61.9% of code).
    • 3 very complex units (1,265 lines of code)
    • 17 complex units (2,621 lines of code)
    • 106 medium complex units (7,632 lines of code)
    • 176 simple units (6,416 lines of code)
    • 1,631 very simple units (15,210 lines of code)
3% | 7% | 23% | 19% | 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
cpp4% | 8% | 24% | 19% | 43%
py0% | 6% | 9% | 25% | 58%
h0% | 0% | 4% | 9% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/code/scxsystemlib6% | 11% | 23% | 17% | 41%
source/code/scxcorelib0% | 3% | 21% | 22% | 52%
installer/InstallBuilder/unittests0% | 55% | 0% | 0% | 44%
source/code/util0% | 0% | 40% | 28% | 31%
installer/InstallBuilder0% | 0% | 11% | 29% | 59%
source/code/include0% | 0% | 0% | 9% | 90%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void StaticPhysicalDiskInstance::Update()
in source/code/scxsystemlib/disk/staticphysicaldiskinstance.cpp
454 72 0
void CPUEnumeration::Update()
in source/code/scxsystemlib/cpu/cpuenumeration.cpp
524 64 1
bool ProcessInstance::UpdateParameters()
in source/code/scxsystemlib/process/processinstance.cpp
287 53 1
void FindFiles()
in source/code/scxcorelib/pal/scxdirectoryinfo.cpp
161 48 2
SCXFileSystem::Attributes SCXFileSystem::GetAttributes()
in source/code/scxcorelib/pal/scxfilesystem.cpp
151 48 1
void StaticDiskPartitionEnumeration::Update()
in source/code/scxsystemlib/disk/staticdiskpartitionenumeration.cpp
298 47 1
void NetworkInterfaceInfo::Get_NDD_STAT()
in source/code/scxsystemlib/networkinterface/networkinterface.cpp
185 46 1
std::vector NetworkInterfaceConfigurationEnumeration::FindAll()
in source/code/scxsystemlib/networkinterfaceconfiguration/networkinterfaceconfigurationenumeration.cpp
200 40 0
void SCXOSTypeInfo::Init()
in source/code/scxsystemlib/common/scxostypeinfo.cpp
216 39 0
void DiskDependDefault::RefreshMNTTab()
in source/code/scxsystemlib/disk/diskdepend.cpp
161 39 1
def GetScriptAsString()
in installer/InstallBuilder/unittests/ib_unittests.py
76 33 1
void NetworkInterfaceInfo::ParseIPv6Addr()
in source/code/scxsystemlib/networkinterface/networkinterface.cpp
213 32 1
bool SqInq()
in source/code/scxsystemlib/disk/tools/ioctl_scan.cpp
125 30 8
unsigned short CpuPropertiesInstance::GetFamily()
in source/code/scxsystemlib/cpuproperties/cpupropertiesinstance.cpp
116 29 0
void StaticDiskPartitionInstance::Update_Solaris()
in source/code/scxsystemlib/disk/staticdiskpartitioninstance.cpp
151 29 0
void CpuPropertiesInstance::Update()
in source/code/scxsystemlib/cpuproperties/cpupropertiesinstance.cpp
190 28 0
bool ProcessInstance::GetExecutionState()
in source/code/scxsystemlib/process/processinstance.cpp
58 28 1
void StaticPhysicalDiskEnumeration::FindPhysicalDisks()
in source/code/scxsystemlib/disk/staticphysicaldiskenumeration.cpp
99 26 2
void NetworkInterfaceInfo::ParseEthtool()
in source/code/scxsystemlib/networkinterface/networkinterface.cpp
92 26 2
void InstalledSoftwareInstance::Update()
in source/code/scxsystemlib/software/installedsoftwareinstance.cpp
129 26 0