awslabs / aws-sdk-kotlin
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 188 units with 2,036 lines of code in units (23.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (71 lines of code)
    • 21 medium size units (620 lines of code)
    • 44 small units (636 lines of code)
    • 122 very small units (709 lines of code)
0% | 3% | 30% | 31% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
kt0% | 3% | 30% | 30% | 35%
kts0% | 0% | 30% | 41% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
codegen/smithy-aws-kotlin-codegen0% | 7% | 28% | 30% | 34%
aws-runtime/protocols0% | 0% | 46% | 28% | 24%
aws-runtime/aws-signing0% | 0% | 75% | 0% | 24%
aws-runtime/aws-config0% | 0% | 38% | 0% | 61%
codegen/sdk0% | 0% | 36% | 50% | 12%
services/s30% | 0% | 52% | 32% | 16%
services/glacier0% | 0% | 57% | 28% | 13%
aws-runtime/http-client-engine-crt0% | 0% | 0% | 54% | 45%
gradle/sdk-plugins0% | 0% | 0% | 47% | 52%
aws-runtime/aws-http0% | 0% | 0% | 28% | 71%
services/machinelearning0% | 0% | 0% | 100% | 0%
dokka-aws/src0% | 0% | 0% | 100% | 0%
aws-runtime/aws-types0% | 0% | 0% | 56% | 43%
aws-runtime0% | 0% | 0% | 0% | 100%
aws-runtime/aws-endpoint0% | 0% | 0% | 0% | 100%
aws-runtime/crt-util0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
override fun renderThrowOperationError()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3Generator.kt
71 2 3
override fun renderThrowOperationError()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt
47 2 3
public suspend fun createPresignedRequest()
in aws-runtime/aws-signing/common/src/aws/sdk/kotlin/runtime/auth/signing/Presigner.kt
44 3 2
override fun getDeserializerDescriptorGenerator()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/AwsQuery.kt
42 1 4
override fun getSerializerDescriptorGenerator()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/AwsQuery.kt
35 1 4
override fun generateProtocolUnitTests()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt
34 1 1
override suspend fun modifyRequest()
in aws-runtime/aws-signing/common/src/aws/sdk/kotlin/runtime/auth/signing/AwsSigV4SigningMiddleware.kt
34 2 1
public fun decode()
in aws-runtime/protocols/aws-event-stream/common/src/aws/sdk/kotlin/runtime/protocol/eventstream/HeaderValue.kt
33 2 1
fun awsServiceProjections()
in codegen/sdk/build.gradle.kts
32 2 0
public fun decode()
in aws-runtime/protocols/aws-event-stream/common/src/aws/sdk/kotlin/runtime/protocol/eventstream/Message.kt
29 2 1
override fun unwrapOperationResponseBody()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/AwsQuery.kt
28 1 2
suspend fun deserialize()
in aws-runtime/protocols/aws-xml-protocols/common/src/aws/sdk/kotlin/runtime/protocol/xml/Ec2QueryErrorDeserializer.kt
27 4 1
suspend fun deleteBucketAndAllContents()
in services/s3/e2eTest/S3TestUtils.kt
26 4 2
override suspend fun calculateHashes()
in services/glacier/common/src/aws/sdk/kotlin/services/glacier/internal/TreeHasher.kt
26 5 1
override suspend fun getCredentials()
in aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/auth/credentials/ImdsCredentialsProvider.kt
26 3 0
override fun renderSerializeOperationBody()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestXml.kt
25 3 3
override fun renderDeserializeOperationBody()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestXml.kt
24 3 3
public suspend fun deserialize()
in aws-runtime/protocols/aws-json-protocols/common/src/aws/sdk/kotlin/runtime/protocol/json/RestJsonErrorDeserializer.kt
24 3 2
override fun renderSerializeHttpBody()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestJson1.kt
21 4 3
override fun writeAdditionalFiles()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/PresignerGenerator.kt
21 3 2