awslabs / aws-sdk-kotlin
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 188 units with 2,036 lines of code in units (23.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 6 simple units (56 lines of code)
    • 182 very simple units (1,980 lines of code)
0% | 0% | 0% | 2% | 97%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
kt0% | 0% | 0% | 2% | 97%
kts0% | 0% | 0% | 8% | 91%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
gradle/sdk-plugins0% | 0% | 0% | 31% | 68%
aws-runtime0% | 0% | 0% | 100% | 0%
aws-runtime/protocols0% | 0% | 0% | 2% | 97%
aws-runtime/aws-config0% | 0% | 0% | 6% | 93%
aws-runtime/aws-signing0% | 0% | 0% | 7% | 92%
codegen/smithy-aws-kotlin-codegen0% | 0% | 0% | 0% | 100%
aws-runtime/http-client-engine-crt0% | 0% | 0% | 0% | 100%
codegen/sdk0% | 0% | 0% | 0% | 100%
aws-runtime/aws-http0% | 0% | 0% | 0% | 100%
services/s30% | 0% | 0% | 0% | 100%
services/glacier0% | 0% | 0% | 0% | 100%
aws-runtime/aws-types0% | 0% | 0% | 0% | 100%
services/machinelearning0% | 0% | 0% | 0% | 100%
dokka-aws/src0% | 0% | 0% | 0% | 100%
aws-runtime/aws-endpoint0% | 0% | 0% | 0% | 100%
aws-runtime/crt-util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fun projectNeedsPlatform()
in aws-runtime/build.gradle.kts
9 10 2
override fun equals()
in gradle/sdk-plugins/src/main/kotlin/aws/sdk/kotlin/gradle/codegen/dsl/SmithyKotlinPluginSettings.kt
12 9 1
override fun equals()
in gradle/sdk-plugins/src/main/kotlin/aws/sdk/kotlin/gradle/codegen/dsl/SmithyProjection.kt
11 8 1
override fun equals()
in aws-runtime/protocols/aws-event-stream/common/src/aws/sdk/kotlin/runtime/protocol/eventstream/Message.kt
8 6 1
override fun equals()
in aws-runtime/aws-signing/common/src/aws/sdk/kotlin/runtime/auth/signing/AwsSigning.kt
8 6 1
override fun equals()
in aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/config/imds/Token.kt
8 6 1
override suspend fun calculateHashes()
in services/glacier/common/src/aws/sdk/kotlin/services/glacier/internal/TreeHasher.kt
26 5 1
override fun equals()
in aws-runtime/protocols/aws-event-stream/common/src/aws/sdk/kotlin/runtime/protocol/eventstream/HeaderValue.kt
7 5 1
fun getProperty()
in codegen/sdk/build.gradle.kts
14 4 1
override fun renderSerializeHttpBody()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestJson1.kt
21 4 3
suspend fun deleteBucketAndAllContents()
in services/s3/e2eTest/S3TestUtils.kt
26 4 2
suspend fun deserialize()
in aws-runtime/protocols/aws-xml-protocols/common/src/aws/sdk/kotlin/runtime/protocol/xml/Ec2QueryErrorDeserializer.kt
27 4 1
override suspend fun getRegion()
in aws-runtime/aws-types/common/src/aws/sdk/kotlin/runtime/region/RegionProviderChain.kt
13 4 0
protected fun readAsMuchAsPossible()
in aws-runtime/http-client-engine-crt/common/src/aws/sdk/kotlin/runtime/http/engine/crt/AbstractBufferedReadChannel.kt
15 4 2
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
override fun getFieldDescriptorTraits()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/xml/RestXmlSerdeDescriptorGenerator.kt
14 3 3
override fun writeAdditionalFiles()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/PresignerGenerator.kt
21 3 2
override fun preprocessModel()
in codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/BoxServices.kt
10 3 2
override fun install()
in services/machinelearning/common/src/aws/sdk/kotlin/services/machinelearning/internal/ResolvePredictEndpoint.kt
16 3 1