microsoft / diskspd
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 364 units with 8,615 lines of code in units (35.5% of code).
    • 5 very complex units (2,448 lines of code)
    • 5 complex units (799 lines of code)
    • 24 medium complex units (1,839 lines of code)
    • 38 simple units (1,555 lines of code)
    • 292 very simple units (1,974 lines of code)
28% | 9% | 21% | 18% | 22%
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
cpp31% | 10% | 22% | 18% | 17%
h0% | 0% | 9% | 15% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
CmdLineParser63% | 0% | 20% | 1% | 14%
IORequestGenerator38% | 0% | 29% | 14% | 17%
XmlProfileParser24% | 32% | 9% | 21% | 11%
Common13% | 9% | 7% | 21% | 47%
ResultParser0% | 20% | 34% | 36% | 8%
XmlResultParser0% | 0% | 33% | 28% | 38%
CmdRequestCreator0% | 0% | 71% | 0% | 28%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool CmdLineParser::_ReadParametersFromCmdLine()
in CmdLineParser/CmdLineParser.cpp
1004 216 5
HRESULT XmlProfileParser::_ParseTarget()
in XmlProfileParser/XmlProfileParser.cpp
308 98 2
DWORD WINAPI threadFunc()
in IORequestGenerator/IORequestGenerator.cpp
461 92 1
bool Profile::Validate()
in Common/Common.cpp
262 70 2
bool IORequestGenerator::_GenerateRequestsForTimeSpan()
in IORequestGenerator/IORequestGenerator.cpp
413 68 4
bool XmlProfileParser::ParseFile()
in XmlProfileParser/XmlProfileParser.cpp
179 43 4
void ResultParser::_PrintTarget()
in ResultParser/ResultParser.cpp
196 39 4
HRESULT XmlProfileParser::_ParseTimeSpan()
in XmlProfileParser/XmlProfileParser.cpp
121 39 3
HRESULT XmlProfileParser::_ParseEtw()
in XmlProfileParser/XmlProfileParser.cpp
121 36 2
string Target::GetXml()
in Common/Common.cpp
182 32 1
bool CmdLineParser::_ParseAffinity()
in CmdLineParser/CmdLineParser.cpp
110 24 2
bool IORequestGenerator::_CreateFile()
in IORequestGenerator/IORequestGenerator.cpp
117 22 4
string Profile::GetXml()
in Common/Common.cpp
58 21 1
vector IORequestGenerator::_GetFilesToPrecreate()
in IORequestGenerator/IORequestGenerator.cpp
74 20 1
void ResultParser::_PrintSection()
in ResultParser/ResultParser.cpp
119 20 3
static bool issueNextIO()
in IORequestGenerator/IORequestGenerator.cpp
110 18 4
HRESULT XmlProfileParser::_ParseDistribution()
in XmlProfileParser/XmlProfileParser.cpp
74 18 2
static bool doWorkUsingIOCompletionPorts()
in IORequestGenerator/IORequestGenerator.cpp
73 17 2
void XmlResultParser::_PrintLatencyPercentiles()
in XmlResultParser/XmlResultParser.cpp
93 17 1
bool CmdLineParser::_ParseRandomDistribution()
in CmdLineParser/CmdLineParser.cpp
87 16 2