microsoft / DirectXMesh
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 215 units with 9,642 lines of code in units (51.4% of code).
    • 9 very complex units (2,789 lines of code)
    • 13 complex units (1,898 lines of code)
    • 48 medium complex units (2,898 lines of code)
    • 36 simple units (870 lines of code)
    • 109 very simple units (1,187 lines of code)
28% | 19% | 30% | 9% | 12%
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
cpp29% | 18% | 30% | 8% | 12%
h23% | 25% | 28% | 13% | 10%
inl0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Meshconvert51% | 8% | 25% | 7% | 6%
DirectXMesh19% | 22% | 31% | 9% | 16%
Utilities26% | 28% | 31% | 7% | 5%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int __cdecl wmain()
in Meshconvert/Meshconvert.cpp
494 121 2
HRESULT VBWriter::Impl::Write()
in DirectXMesh/DirectXMeshVBWriter.cpp
333 101 5
HRESULT VBReader::Impl::Read()
in DirectXMesh/DirectXMeshVBReader.cpp
303 97 5
HRESULT Mesh::ExportToSDKMESH()
in Meshconvert/Mesh.cpp
542 97 8
HRESULT CleanImpl()
in DirectXMesh/DirectXMeshClean.cpp
300 85 1
HRESULT Mesh::ExportToCMO()
in Meshconvert/Mesh.cpp
291 69 3
inline uint32_t ComputeFVF()
in Utilities/FlexibleVertexFormat.h
195 66 1
HRESULT ValidateIndices()
in DirectXMesh/DirectXMeshValidate.cpp
173 58 1
inline uint32_t ComputeFVF()
in Utilities/FlexibleVertexFormat.h
158 54 1
HRESULT Load()
in Utilities/WaveFrontReader.h
259 50 2
HRESULT OptimizeFacesImpl()
in DirectXMesh/DirectXMeshOptimizeLRU.cpp
238 49 1
size_t DirectX::BytesPerElement()
in DirectXMesh/DirectXMeshUtil.cpp
63 49 1
HRESULT ConvertPointRepsToAdjacencyImpl()
in DirectXMesh/DirectXMeshAdjacency.cpp
212 46 1
HRESULT DirectX::FinalizeVBAndPointReps()
in DirectXMesh/DirectXMeshRemap.cpp
103 37 9
HRESULT GeneratePointReps()
in DirectXMesh/DirectXMeshAdjacency.cpp
152 36 1
HRESULT Mesh::Optimize()
in Meshconvert/Mesh.cpp
112 35 1
HRESULT VertexCacheStripReorderImpl()
in DirectXMesh/DirectXMeshOptimizeTVC.cpp
144 34 1
HRESULT initialize()
in DirectXMesh/DirectXMeshOptimizeTVC.cpp
103 33 1
HRESULT Mesh::Clean()
in Meshconvert/Mesh.cpp
118 31 0
HRESULT ComputeTangentFrameImpl()
in DirectXMesh/DirectXMeshTangentFrame.cpp
128 30 1