microsoft / ShaderConductor
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 48 units with 1,375 lines of code in units (56.6% of code).
    • 1 very complex units (225 lines of code)
    • 1 complex units (176 lines of code)
    • 4 medium complex units (384 lines of code)
    • 3 simple units (100 lines of code)
    • 39 very simple units (490 lines of code)
16% | 12% | 27% | 7% | 35%
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
cpp19% | 15% | 25% | 8% | 29%
py0% | 0% | 51% | 0% | 48%
cs0% | 0% | 0% | 0% | 100%
hpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Source/Core25% | 0% | 32% | 11% | 30%
Source/Tools0% | 100% | 0% | 0% | 0%
ROOT0% | 0% | 51% | 0% | 48%
Source/Wrapper0% | 0% | 0% | 0% | 100%
Include/ShaderConductor0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Compiler::ResultDesc CrossCompile()
in Source/Core/ShaderConductor.cpp
225 56 4
int main()
in Source/Tools/ShaderConductorCmd.cpp
176 26 2
Compiler::ResultDesc CompileToBinary()
in Source/Core/ShaderConductor.cpp
145 24 4
void ShaderReflection()
in Source/Core/ShaderConductor.cpp
79 16 2
void Compiler::Compile()
in Source/Core/ShaderConductor.cpp
66 13 5
def Build()
in BuildAll.py
94 11 8
Compiler::ResultDesc ConvertBinary()
in Source/Core/ShaderConductor.cpp
33 10 4
std::wstring ShaderProfileName()
in Source/Core/ShaderConductor.cpp
32 7 2
void ConvertDxcResult()
in Source/Core/ShaderConductor.cpp
35 6 4
HRESULT STDMETHODCALLTYPE LoadSource()
in Source/Core/ShaderConductor.cpp
24 5 2
Compiler::ResultDesc Compiler::Disassemble()
in Source/Core/ShaderConductor.cpp
47 5 1
void Compile()
in Source/Wrapper/Native.cpp
44 4 4
static void Main()
in Source/Wrapper/Program.cs
55 4 1
HRESULT STDMETHODCALLTYPE QueryInterface()
in Source/Core/ShaderConductor.cpp
19 3 2
void AppendError()
in Source/Core/ShaderConductor.cpp
15 3 2
void Blob::Reset()
in Source/Core/ShaderConductor.cpp
8 3 2
BOOL WINAPI DllMain()
in Source/Core/ShaderConductor.cpp
18 3 3
void Disassemble()
in Source/Wrapper/Native.cpp
19 3 2
def Execute()
in BuildAll.py
16 2 1
void Destroy()
in Source/Core/ShaderConductor.cpp
16 2 0