microsoft / Microsoft.Shared.Dna.Json
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 151 units with 1,976 lines of code in units (65.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (221 lines of code)
    • 12 simple units (403 lines of code)
    • 135 very simple units (1,352 lines of code)
0% | 0% | 11% | 20% | 68%
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% | 11% | 20% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Microsoft.Shared.Dna.Json0% | 0% | 12% | 26% | 60%
Microsoft.Shared.Dna.Json.Profile0% | 0% | 12% | 7% | 80%
Microsoft.Shared.Dna.Json/Microsoft.Shared.Dna0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static bool ConfirmReader()
in Microsoft.Shared.Dna.Json.Profile/JsonDna.cs
48 19 2
private unsafe void ReadNumber()
in Microsoft.Shared.Dna.Json/JsonParser.cs
41 12 1
private unsafe bool TryParseTokenUnsafe()
in Microsoft.Shared.Dna.Json/JsonParser.cs
66 12 1
private unsafe bool TryParseTokenUnsafe()
in Microsoft.Shared.Dna.Json/JsonParser.cs
66 12 2
private void Truncate()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
39 9 0
private unsafe void ReadToken()
in Microsoft.Shared.Dna.Json/JsonParser.cs
37 9 1
private unsafe bool TryEncode()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
38 8 3
private unsafe int EndOfHexDigits()
in Microsoft.Shared.Dna.Json/JsonParser.cs
17 8 2
private unsafe void PrepareForClose()
in Microsoft.Shared.Dna.Json/JsonParser.cs
44 8 2
private unsafe bool TryParseTokenUnsafe()
in Microsoft.Shared.Dna.Json/JsonParser.cs
58 8 1
private bool PrepareContainer()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
24 7 2
private bool PrepareValue()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
24 7 2
private unsafe void NextUnsafe()
in Microsoft.Shared.Dna.Json/JsonParser.cs
36 7 0
private static void ExecutePartial()
in Microsoft.Shared.Dna.Json.Profile/Profiler.cs
30 6 1
public void CloseToken()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
23 6 0
public bool TryParseToken()
in Microsoft.Shared.Dna.Json/JsonParser.cs
33 6 1
private static bool ExecuteGeneric()
in Microsoft.Shared.Dna.Json.Profile/Profiler.cs
32 5 2
private unsafe int EndOfString()
in Microsoft.Shared.Dna.Json/JsonParser.cs
27 5 1
private unsafe void ReadFraction()
in Microsoft.Shared.Dna.Json/JsonParser.cs
17 5 2
public static void Main()
in Microsoft.Shared.Dna.Json.Profile/Program.cs
48 4 1