microsoft / vswhere
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 172 units with 2,298 lines of code in units (52.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (156 lines of code)
    • 7 medium complex units (494 lines of code)
    • 9 simple units (304 lines of code)
    • 155 very simple units (1,344 lines of code)
0% | 6% | 21% | 13% | 58%
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
cpp0% | 7% | 24% | 14% | 53%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/vswhere.lib0% | 7% | 18% | 12% | 61%
src/vswhere0% | 0% | 61% | 17% | 20%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void CommandArgs::Parse()
in src/vswhere.lib/CommandArgs.cpp
156 37 1
STDMETHODIMP VersionRange::ParseVersionRange()
in src/vswhere.lib/VersionRange.cpp
119 24 3
void Formatter::WriteInternal()
in src/vswhere.lib/Formatter.cpp
66 21 1
vector InstanceSelector::Select()
in src/vswhere.lib/InstanceSelector.cpp
59 16 1
bool Formatter::WriteProperties()
in src/vswhere.lib/Formatter.cpp
54 14 2
int wmain()
in src/vswhere/Program.cpp
97 14 2
void Formatter::WritePackage()
in src/vswhere.lib/Formatter.cpp
42 13 1
HRESULT VersionRange::ParseVersionString()
in src/vswhere.lib/VersionRange.cpp
57 11 3
void Formatter::WriteProperty()
in src/vswhere.lib/Formatter.cpp
21 10 2
bool InstanceSelector::Less()
in src/vswhere.lib/InstanceSelector.cpp
52 10 2
bool InstanceSelector::IsMatch()
in src/vswhere.lib/InstanceSelector.cpp
35 9 1
vector CommandParser::Parse()
in src/vswhere.lib/CommandParser.cpp
26 7 2
wstring Formatter::FormatDate()
in src/vswhere.lib/Formatter.cpp
40 7 1
bool InstanceSelector::IsWorkloadMatch()
in src/vswhere.lib/InstanceSelector.cpp
42 7 1
bool LegacyProvider::TryGetLegacyInstance()
in src/vswhere.lib/LegacyProvider.cpp
33 7 2
void GetEnumerator()
in src/vswhere/Program.cpp
28 7 3
bool InstanceSelector::IsProductMatch()
in src/vswhere.lib/InstanceSelector.cpp
27 6 1
static void ParseArgumentArray()
in src/vswhere.lib/CommandArgs.cpp
20 5 4
void Formatter::WritePackages()
in src/vswhere.lib/Formatter.cpp
21 5 1
HRESULT Formatter::GetProductId()
in src/vswhere.lib/Formatter.cpp
21 5 2