microsoft / DbgShell
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 4,403 units with 61,502 lines of code in units (41.8% of code).
    • 2 very complex units (494 lines of code)
    • 22 complex units (2,312 lines of code)
    • 126 medium complex units (8,356 lines of code)
    • 332 simple units (11,480 lines of code)
    • 3,921 very simple units (38,860 lines of code)
<1% | 3% | 13% | 18% | 63%
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
cs<1% | 4% | 14% | 20% | 60%
h0% | 0% | 24% | 0% | 75%
cpp0% | 0% | 2% | 5% | 92%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
DbgShell5% | 4% | 21% | 26% | 41%
ClrMemDiag/Desktop2% | 15% | 17% | 20% | 43%
DbgProvider/public0% | 2% | 16% | 18% | 62%
DbgProvider/internal0% | 4% | 6% | 22% | 66%
ClrMemDiag/Utilities0% | 3% | 17% | 17% | 61%
DbgShellExt0% | 0% | 37% | 15% | 46%
ClrMemDiag0% | 0% | 4% | 21% | 73%
ClrMemDiag/Native0% | 0% | 8% | 15% | 75%
DbgEngWrapper0% | 0% | 0% | 3% | 96%
ClrMemDiag/ICorDebug0% | 0% | 0% | 3% | 96%
ClrMemDiag/Debugger0% | 0% | 0% | 0% | 100%
DbgProvider0% | 0% | 0% | 0% | 100%
DbgNativeUtil0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private void ParseHelper()
in DbgShell/CommandLineParameterParser.cs
336 69 1
private void SetThreadWaiters()
in ClrMemDiag/Desktop/lockinspection.cs
158 68 0
154 50 1
public DesktopInstanceField()
in ClrMemDiag/Desktop/fields.cs
100 43 6
private static int LengthInBufferCellsFE()
in DbgShell/ConsoleControl.cs
96 40 5
internal static int FixGenericsWorker()
in ClrMemDiag/Desktop/types.cs
117 39 4
public static object Transform()
in DbgProvider/public/Commands/TransformationAttributes.cs
147 39 7
public bool TryConvertToPrimitive()
in DbgProvider/public/Debugger/TypeInfo/DbgBaseTypeInfo.cs
113 38 3
internal object GetValueAtAddress()
in ClrMemDiag/Desktop/heap.cs
119 37 2
public bool SkipExactlyOne()
in ClrMemDiag/Utilities/sigparser.cs
78 36 0
public override IEnumerable EnumerateMemoryRegions()
in ClrMemDiag/Desktop/runtimebase.cs
116 35 0
public static string IndentAndWrap()
in DbgProvider/internal/CaStringUtil.cs
221 33 5
public static unsafe object SymGetTypeInfo()
in DbgProvider/internal/Native/DbgHelp.cs
138 32 4
private static unsafe string _GetExceptionFriendlyName()
in DbgProvider/public/Debugger/DbgEventArgs.cs
38 32 1
private static string _GetNameForException()
in DbgProvider/public/Debugger/DbgExceptionEventFilter.cs
69 32 1
private bool PeekElemTypeSize()
in ClrMemDiag/Utilities/sigparser.cs
58 31 1
87 30 0
80 28 2
private static DbgNamedTypeInfo _GetTypeInfoForDbgNativeType()
in DbgProvider/public/Debugger/TypeInfo/DbgTypeInfo.cs
65 28 4
internal ClrElementType GetElementType()
in ClrMemDiag/Desktop/heap.cs
71 27 2