awslabs / aws-crt-java
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 1,065 units with 10,615 lines of code in units (67.5% of code).
    • 2 very long units (269 lines of code)
    • 24 long units (1,636 lines of code)
    • 87 medium size units (2,787 lines of code)
    • 152 small units (2,208 lines of code)
    • 800 very small units (3,715 lines of code)
2% | 15% | 26% | 20% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c4% | 18% | 40% | 23% | 13%
java0% | 11% | 11% | 20% | 56%
kt0% | 16% | 8% | 5% | 69%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/native4% | 18% | 40% | 23% | 13%
src/main0% | 11% | 11% | 20% | 56%
smithy-crt/src0% | 16% | 8% | 5% | 69%
android/crt0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
144 32 16
125 15 21
protected void populatePutObjectRequestHeaders()
in src/main/java/s3NativeClient/com/amazonaws/s3/S3NativeClient.java
97 29 2
91 12 9
85 10 13
fun build()
in smithy-crt/src/main/kotlin/software/amazon/smithy/crt/java/JavaElements.kt
84 7 0
public CompletableFuture putObject()
in src/main/java/s3NativeClient/com/amazonaws/s3/S3NativeClient.java
81 8 2
80 11 8
private HttpClientConnectionManager()
in src/main/java/software/amazon/awssdk/crt/http/HttpClientConnectionManager.java
79 25 1
78 7 12
73 9 9
private static void extractAndLoadLibrary()
in src/main/java/software/amazon/awssdk/crt/CRT.java
69 15 1
67 5 10
66 8 10
public CompletableFuture getObject()
in src/main/java/s3NativeClient/com/amazonaws/s3/S3NativeClient.java
63 6 2
61 8 6
static int s_build_signing_config()
in src/native/aws_signing.c
61 6 4
int aws_event_stream_rpc_marshall_message_args_init()
in src/native/event_stream_message.c
60 9 8
override fun accept()
in smithy-crt/src/main/kotlin/software/amazon/smithy/crt/java/ServiceGenerator.kt
60 9 2
58 7 6