microsoft / vs-streamjsonrpc
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 577 units with 7,539 lines of code in units (59.1% of code).
    • 4 very long units (642 lines of code)
    • 9 long units (617 lines of code)
    • 77 medium size units (2,528 lines of code)
    • 112 small units (1,600 lines of code)
    • 375 very small units (2,152 lines of code)
8% | 8% | 33% | 21% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs8% | 8% | 33% | 21% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/StreamJsonRpc11% | 8% | 32% | 19% | 27%
src/StreamJsonRpc/Reflection0% | 9% | 39% | 28% | 21%
src/StreamJsonRpc/Protocol0% | 0% | 52% | 16% | 31%
src/StreamJsonRpc/Exceptions0% | 0% | 0% | 19% | 80%
src/StreamJsonRpc/EventArgs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
internal static TypeInfo Get()
in src/StreamJsonRpc/ProxyGeneration.cs
247 37 1
private async Task HandleRpcAsync()
in src/StreamJsonRpc/JsonRpc.cs
140 26 1
136 29 1
private async Task InvokeCoreAsync()
in src/StreamJsonRpc/JsonRpc.cs
119 19 3
private static()
in src/StreamJsonRpc/MessagePackFormatter.cs
84 16 2
internal IDisposable? AddLocalRpcTarget()
in src/StreamJsonRpc/Reflection/RpcTargetInfo.cs
78 23 4
internal static string GetArgumentsString()
in src/StreamJsonRpc/JsonRpcEventSource.cs
75 11 1
private async ValueTask ReadHeadersAsync()
in src/StreamJsonRpc/HeaderDelimitedMessageHandler.cs
71 16 1
public void Serialize()
in src/StreamJsonRpc/MessagePackFormatter.cs
71 13 3
protected override void Write()
in src/StreamJsonRpc/HeaderDelimitedMessageHandler.cs
63 5 2
public async ValueTask GetNextValuesAsync()
in src/StreamJsonRpc/Reflection/MessageFormatterEnumerableTracker.cs
60 10 1
protected async Task InvokeCoreAsync()
in src/StreamJsonRpc/JsonRpc.cs
59 11 7
private protected async ValueTask DeserializeMessageAsync()
in src/StreamJsonRpc/PipeMessageHandler.cs
56 11 4
public override ArgumentMatchResult TryGetTypedArguments()
in src/StreamJsonRpc/JsonMessageFormatter.cs
49 9 2
49 9 0
public override Exception? ReadJson()
in src/StreamJsonRpc/JsonMessageFormatter.cs
48 9 5
protected override async ValueTask ReadCoreAsync()
in src/StreamJsonRpc/WebSocketMessageHandler.cs
48 5 1
47 9 2
internal TraceParent()
in src/StreamJsonRpc/Protocol/TraceParent.cs
47 3 1
internal static T Deserialize()
in src/StreamJsonRpc/Reflection/ExceptionSerializationHelpers.cs
47 13 3