microsoft / RoslynClrHeapAllocationAnalyzer
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 66 units with 864 lines of code in units (78.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (231 lines of code)
    • 10 simple units (210 lines of code)
    • 52 very simple units (423 lines of code)
0% | 0% | 26% | 24% | 48%
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
cs0% | 0% | 26% | 24% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ClrHeapAllocationsAnalyzer0% | 0% | 26% | 24% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
protected override void AnalyzeNode()
in ClrHeapAllocationsAnalyzer/EnumeratorAllocationAnalyzer.cs
64 25 1
private static void CheckDelegateCreation()
in ClrHeapAllocationsAnalyzer/TypeConversionAllocationAnalyzer.cs
51 15 8
protected override void AnalyzeNode()
in ClrHeapAllocationsAnalyzer/ExplicitAllocationAnalyzer.cs
62 14 1
protected override void AnalyzeNode()
in ClrHeapAllocationsAnalyzer/TypeConversionAllocationAnalyzer.cs
54 11 1
protected override void AnalyzeNode()
in ClrHeapAllocationsAnalyzer/CallSiteImplicitAllocationAnalyzer.cs
31 8 1
protected override void AnalyzeNode()
in ClrHeapAllocationsAnalyzer/ConcatenationAllocationAnalyzer.cs
33 8 1
private static void BinaryExpressionCheck()
in ClrHeapAllocationsAnalyzer/TypeConversionAllocationAnalyzer.cs
23 7 6
private void TryRegisterCodeFix()
in ClrHeapAllocationsAnalyzer/AvoidAllocationWithArrayEmptyCodeFix.cs
31 6 5
private bool IsCopyConstructor()
in ClrHeapAllocationsAnalyzer/AvoidAllocationWithArrayEmptyCodeFix.cs
15 6 2
private bool IsExpectedParameterReadonlySequence()
in ClrHeapAllocationsAnalyzer/AvoidAllocationWithArrayEmptyCodeFix.cs
19 6 2
private static bool IsTypeReadonlySequence()
in ClrHeapAllocationsAnalyzer/AvoidAllocationWithArrayEmptyCodeFix.cs
18 6 2
private static void CheckTypeConversion()
in ClrHeapAllocationsAnalyzer/ConcatenationAllocationAnalyzer.cs
12 6 5
private static void ClosureCaptureDataFlowAnalysis()
in ClrHeapAllocationsAnalyzer/DisplayClassAllocationAnalyzer.cs
18 6 3
private static bool IsStructInstanceMethod()
in ClrHeapAllocationsAnalyzer/TypeConversionAllocationAnalyzer.cs
10 6 3
private SyntaxNode ReplaceExpression()
in ClrHeapAllocationsAnalyzer/AvoidAllocationWithArrayEmptyCodeFix.cs
15 5 2
protected override void AnalyzeNode()
in ClrHeapAllocationsAnalyzer/DisplayClassAllocationAnalyzer.cs
26 5 1
private bool IsInsidePropertyDeclaration()
in ClrHeapAllocationsAnalyzer/AvoidAllocationWithArrayEmptyCodeFix.cs
8 4 2
private static void CheckNonOverridenMethodOnStruct()
in ClrHeapAllocationsAnalyzer/CallSiteImplicitAllocationAnalyzer.cs
12 4 4
private static void GenericMethodCheck()
in ClrHeapAllocationsAnalyzer/DisplayClassAllocationAnalyzer.cs
11 4 5
private static void CastExpressionCheck()
in ClrHeapAllocationsAnalyzer/TypeConversionAllocationAnalyzer.cs
13 4 5