aws / aws-xray-sdk-dotnet
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 510 units with 5,584 lines of code in units (67.1% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (435 lines of code)
    • 57 medium size units (1,625 lines of code)
    • 122 small units (1,859 lines of code)
    • 324 very small units (1,665 lines of code)
0% | 7% | 29% | 33% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 7% | 29% | 33% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sdk/src/Handlers/AwsSdk0% | 29% | 20% | 31% | 18%
sdk/src/Core/Internal0% | 9% | 31% | 25% | 34%
sdk/src/Core/Strategies0% | 26% | 9% | 32% | 30%
sdk/src/Handlers/AspNetCore0% | 26% | 22% | 28% | 23%
sdk/src/Core0% | 0% | 44% | 40% | 15%
sdk/src/Core/Sampling0% | 0% | 26% | 43% | 30%
sdk/src/Handlers/System.Net0% | 0% | 69% | 13% | 17%
sdk/src/Handlers/EntityFramework0% | 0% | 27% | 11% | 61%
sdk/src/Handlers/AspNet0% | 0% | 24% | 49% | 25%
sdk/src/Core/Plugins0% | 0% | 21% | 78% | 0%
sdk/src/Handlers/SqlServer0% | 0% | 0% | 22% | 77%
sdk/src/Core/Exceptions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private static void WriteEntityFields()
in sdk/src/Core/Internal/Emitters/JsonSegmentMarshaller.cs
71 13 2
private bool UpdateCache()
in sdk/src/Core/Internal/Utils/HostEndPoint.cs
67 10 0
private void ProcessEndRequest()
in sdk/src/Handlers/AwsSdk/Internal/XRayPipelineHandler.cs
63 10 1
public List DescribeException()
in sdk/src/Core/Strategies/DefaultExceptionSerializationStrategy.cs
62 13 2
private void AddRequestSpecificInformation()
in sdk/src/Handlers/AwsSdk/Internal/XRayPipelineHandler.cs
60 17 4
private void AddResponseSpecificInformation()
in sdk/src/Handlers/AwsSdk/Internal/XRayPipelineHandler.cs
60 17 4
private void ProcessHTTPRequest()
in sdk/src/Handlers/AspNetCore/Internal/AWSXRayMiddleware.cs
52 9 1
public static bool WildcardMatch()
in sdk/src/Core/Internal/Utils/StringExtension.cs
48 19 3
public static bool TryParse()
in sdk/src/Core/Internal/Entities/TraceHeader.cs
48 10 2
private static void ExceptionDescriptorExporter()
in sdk/src/Core/Internal/Emitters/JsonSegmentMarshaller.cs
47 6 2
public static bool IsIdValid()
in sdk/src/Core/Internal/Entities/TraceId.cs
42 10 1
private void Init()
in sdk/src/Core/Sampling/Local/LocalizedSamplingStrategy.cs
41 7 1
public void AddAnnotation()
in sdk/src/Core/Internal/Entities/Entity.cs
38 8 2
public static TraceHeader FromString()
in sdk/src/Core/Internal/Entities/TraceHeader.cs
37 10 1
private void PopulateRecorder()
in sdk/src/Core/AwsXrayRecorderBuilder.cs
37 9 1
public static bool TryParse()
in sdk/src/Core/Internal/Utils/IPEndPointExtension.cs
34 5 2
public void EndSegment()
in sdk/src/Core/AWSXRayRecorderImpl.cs
34 6 1
public void LoadRules()
in sdk/src/Core/Sampling/RuleCache.cs
33 3 1
private SamplingResponse ProcessMatchedRule()
in sdk/src/Core/Sampling/DefaultSamplingStrategy.cs
33 5 2
public override void BeginSubsegment()
in sdk/src/Core/AWSXRayRecorder.cs
33 5 2