aws / aws-xray-dotnet-agent
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 226 units with 1,936 lines of code in units (64.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 23 medium size units (618 lines of code)
    • 30 small units (427 lines of code)
    • 172 very small units (839 lines of code)
0% | 2% | 31% | 22% | 43%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 3% | 38% | 26% | 31%
cpp0% | 0% | 18% | 8% | 72%
h0% | 0% | 0% | 59% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sdk/Utils0% | 7% | 39% | 24% | 27%
profiler/src0% | 0% | 17% | 11% | 70%
sdk/Sql0% | 0% | 60% | 34% | 5%
sdk/Http0% | 0% | 54% | 45% | 0%
sdk/EntityFramework0% | 0% | 30% | 0% | 69%
sdk/AspNetCore0% | 0% | 49% | 0% | 50%
sdk/Initialization0% | 0% | 54% | 45% | 0%
sdk/Configuration0% | 0% | 0% | 38% | 61%
sdk/Diagnostic0% | 0% | 0% | 29% | 70%
sdk/AspNet0% | 0% | 0% | 0% | 100%
sdk0% | 0% | 0% | 0% | 100%
sdk/AwsSdk0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
internal static void ProcessRequest()
in src/sdk/Utils/AspNetCoreRequestUtil.cs
52 9 1
protected override void OnEvent()
in src/sdk/Sql/SqlDiagnosticListener.cs
43 8 1
void ILWriter::FixSEHSections()
in src/profiler/src/ILWriter.cpp
41 8 2
33 5 0
private static string BuildSubsegmentName()
in src/sdk/Utils/SqlRequestUtil.cs
29 6 1
public static string GetDataBaseType()
in src/sdk/Utils/AgentUtil.cs
28 8 1
private static void ProcessRequest()
in src/sdk/Utils/HttpRequestUtil.cs
28 4 3
protected override void OnEvent()
in src/sdk/EntityFramework/EntityFrameworkCoreDiagnosticListener.cs
28 5 1
protected override void OnEvent()
in src/sdk/Http/HttpOutDiagnosticListenerNetframework.cs
28 5 1
protected override void OnEvent()
in src/sdk/Http/HttpOutDiagnosticListenerNetstandard.cs
28 5 1
protected override void OnEvent()
in src/sdk/AspNetCore/AspNetCoreDiagnosticListener.cs
28 5 1
protected override void OnEventWritten()
in src/sdk/Sql/SqlEventListener.cs
27 5 1
internal static void ProcessHTTPResponse()
in src/sdk/Utils/AspNetRequestUtil.cs
26 7 2
private static Dictionary PopulateRequestAttributes()
in src/sdk/Utils/AspNetCoreRequestUtil.cs
24 4 1
internal static void Initialize()
in src/sdk/Initialization/AspNetCoreTracingHandlers.cs
24 5 0
private void OnEventStart()
in src/sdk/Sql/SqlEventListener.cs
24 5 1
23 11 3
private static string GetUrl()
in src/sdk/Utils/AspNetCoreRequestUtil.cs
23 2 1
internal static void ProcessEventData()
in src/sdk/Utils/SqlRequestUtil.cs
23 5 1
private void OnEventStart()
in src/sdk/Http/HttpOutDiagnosticListenerNetframework.cs
23 5 1