microsoft / Microsoft.Shared.Dna.Json
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 151 units with 1,976 lines of code in units (65.3% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (190 lines of code)
    • 19 medium size units (621 lines of code)
    • 48 small units (675 lines of code)
    • 81 very small units (490 lines of code)
0% | 9% | 31% | 34% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 9% | 31% | 34% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Microsoft.Shared.Dna.Json0% | 13% | 29% | 39% | 17%
Microsoft.Shared.Dna.Json.Profile0% | 0% | 46% | 8% | 44%
Microsoft.Shared.Dna.Json/Microsoft.Shared.Dna0% | 0% | 11% | 52% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
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 unsafe bool TryParseTokenUnsafe()
in Microsoft.Shared.Dna.Json/JsonParser.cs
58 8 1
private static bool ConfirmReader()
in Microsoft.Shared.Dna.Json.Profile/JsonDna.cs
48 19 2
public static void Main()
in Microsoft.Shared.Dna.Json.Profile/Program.cs
48 4 1
private unsafe void PrepareForClose()
in Microsoft.Shared.Dna.Json/JsonParser.cs
44 8 2
private unsafe void ReadNumber()
in Microsoft.Shared.Dna.Json/JsonParser.cs
41 12 1
private void Truncate()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
39 9 0
private unsafe bool TryEncode()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
38 8 3
private unsafe void ReadToken()
in Microsoft.Shared.Dna.Json/JsonParser.cs
37 9 1
private unsafe void NextUnsafe()
in Microsoft.Shared.Dna.Json/JsonParser.cs
36 7 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 static void ExecutePartial()
in Microsoft.Shared.Dna.Json.Profile/Profiler.cs
30 6 1
private static void RecursiveObject()
in Microsoft.Shared.Dna.Json.Profile/JsonDna.cs
29 3 3
private unsafe int EndOfString()
in Microsoft.Shared.Dna.Json/JsonParser.cs
27 5 1
private static unsafe bool TryParseHex()
in Microsoft.Shared.Dna.Json/JsonParser.cs
26 4 4
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
public void CloseToken()
in Microsoft.Shared.Dna.Json/JsonBuilder.cs
23 6 0