awslabs / aws-crt-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 248 units with 2,685 lines of code in units (58.1% of code).
    • 1 very long units (133 lines of code)
    • 5 long units (281 lines of code)
    • 21 medium size units (658 lines of code)
    • 39 small units (580 lines of code)
    • 182 very small units (1,033 lines of code)
4% | 10% | 24% | 21% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs6% | 6% | 20% | 22% | 43%
c0% | 20% | 35% | 19% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/Elasticurl39% | 16% | 17% | 19% | 7%
native/src0% | 20% | 35% | 19% | 25%
aws-crt-auth0% | 24% | 25% | 37% | 12%
aws-crt0% | 0% | 18% | 9% | 72%
aws-crt-http0% | 0% | 25% | 32% | 42%
aws-crt/IO0% | 0% | 12% | 43% | 44%
aws-crt-cal0% | 0% | 41% | 0% | 58%
aws-crt-checksums0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static void ParseArgs()
in tools/Elasticurl/Elasticurl.cs
133 41 1
68 1 5
static TlsConnectionOptions InitTls()
in tools/Elasticurl/Elasticurl.cs
55 12 0
54 8 6
53 7 7
51 7 8
46 7 3
42 6 4
public PlatformBinding()
in aws-crt/CRT.cs
40 11 0
40 4 5
39 4 2
internal HttpClientStream()
in aws-crt-http/HttpConnection.cs
38 2 3
bool s_tls_args_to_options()
in native/src/tls_ctx_options.c
38 8 11
internal delegate void OnIncomingHeadersNative()
in aws-crt-http/HttpConnection.cs
37 1 2
36 3 1
static void Main()
in tools/Elasticurl/Elasticurl.cs
33 4 1
29 1 2
public void Complete()
in aws-crt/CrtResult.cs
27 4 1
27 4 1
27 3 5