microsoft / WinDbg-Samples
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 848 units with 13,139 lines of code in units (63.5% of code).
    • 1 very complex units (283 lines of code)
    • 0 complex units (0 lines of code)
    • 37 medium complex units (2,442 lines of code)
    • 78 simple units (2,916 lines of code)
    • 732 very simple units (7,498 lines of code)
2% | 0% | 18% | 22% | 57%
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
cpp3% | 0% | 21% | 17% | 57%
h0% | 0% | 10% | 27% | 61%
js0% | 0% | 12% | 45% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Exdi/exdigdbsrv3% | 0% | 22% | 18% | 54%
TTDQueries/app-sample0% | 0% | 15% | 22% | 62%
SyntheticTypes0% | 0% | 25% | 46% | 27%
ImageInfo0% | 0% | 0% | 44% | 55%
CodeFlow0% | 0% | 0% | 59% | 40%
DataModelHelloWorld/Cpp0% | 0% | 0% | 40% | 59%
DataModelHelloWorld/RawCOM0% | 0% | 0% | 0% | 100%
FileSystem0% | 0% | 0% | 0% | 100%
DataModelHelloWorld/JavaScript0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
HRESULT XmlDataHelpers::HandleTagAttributeList()
in Exdi/exdigdbsrv/GdbSrvControllerLib/XmlDataHelpers.cpp
283 65 2
function __evaluateStack()
in SyntheticTypes/SynTypes.js
93 25 2
HRESULT MainWindow::OnCreate()
in TTDQueries/app-sample/MainWindow.cpp
108 22 0
bool XmlDataSystemRegister::HandleMapSystemRegAccessCode()
in Exdi/exdigdbsrv/GdbSrvControllerLib/XmlDataHelpers.cpp
108 21 2
HRESULT STDMETHODCALLTYPE CLiveExdiGdbSrvServer::Ioctl()
in Exdi/exdigdbsrv/ExdiGdbSrv/LiveExdiGdbSrvServer.cpp
104 19 3
SimpleCharBuffer GdbSrvControllerImpl::ExecuteExdiGdbSrvMonitor()
in Exdi/exdigdbsrv/GdbSrvControllerLib/GdbSrvControllerLib.cpp
91 19 2
LRESULT MainWindow::OnReceiveMessage()
in TTDQueries/app-sample/MainWindow.cpp
70 19 3
SimpleCharBuffer GdbSrvControllerImpl::ReadMemory()
in Exdi/exdigdbsrv/GdbSrvControllerLib/GdbSrvControllerLib.cpp
77 18 3
HRESULT ConfigExdiGdbServerHelperImpl::ReadStream()
in Exdi/exdigdbsrv/GdbSrvControllerLib/cfgExdiGdbSrvHelper.cpp
76 18 0
inline HRESULT CreateRGBVideoType()
in TTDQueries/app-sample/dshowutil.h
78 18 5
ADDRESS_TYPE CLiveExdiGdbSrvServer::ParseAsynchronousCommandResult()
in Exdi/exdigdbsrv/ExdiGdbSrv/LiveExdiGdbSrvServer.cpp
97 17 2
inline HRESULT IsRenderer()
in TTDQueries/app-sample/dshowutil.h
84 17 2
bool GdbSrvControllerImpl::HandleAsynchronousCommandResponse()
in Exdi/exdigdbsrv/GdbSrvControllerLib/GdbSrvControllerLib.cpp
80 16 2
bool GdbSrvRspClient::GetRspSessionStatus()
in Exdi/exdigdbsrv/GdbSrvControllerLib/GdbSrvRspClient.cpp
78 16 2
bool XmlDataGdbServerRegisterFile::HandleTargetFileTags()
in Exdi/exdigdbsrv/GdbSrvControllerLib/XmlDataHelpers.cpp
60 16 2
bool GdbSrvRspClient::ConfigRspSession()
in Exdi/exdigdbsrv/GdbSrvControllerLib/GdbSrvRspClient.cpp
65 15 2
LRESULT CALLBACK Slider_WndProc()
in TTDQueries/app-sample/slider.cpp
40 15 4
HRESULT STDMETHODCALLTYPE CLiveExdiGdbSrvServer::PerformKeepaliveChecks()
in Exdi/exdigdbsrv/ExdiGdbSrv/LiveExdiGdbSrvServer.cpp
38 14 1
std::string GdbSrvControllerImpl::ExecuteCommandOnMultiProcessors()
in Exdi/exdigdbsrv/GdbSrvControllerLib/GdbSrvControllerLib.cpp
58 14 3
bool XmlDataGdbServerRegisterFile::SetRegistersByTargetFile()
in Exdi/exdigdbsrv/GdbSrvControllerLib/XmlDataHelpers.cpp
78 14 2