awslabs / smithy-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 544 units with 4,548 lines of code in units (31.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)
    • 8 simple units (265 lines of code)
    • 536 very simple units (4,283 lines of code)
0% | 0% | 0% | 5% | 94%
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% | 5% | 94%
kts0% | 0% | 0% | 100% | 0%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
smithy-kotlin-codegen/src0% | 0% | 0% | 8% | 91%
runtime/serde0% | 0% | 0% | 4% | 95%
runtime/protocol0% | 0% | 0% | 5% | 94%
runtime0% | 0% | 0% | 100% | 0%
runtime/io0% | 0% | 0% | 0% | 100%
runtime/runtime-core0% | 0% | 0% | 0% | 100%
runtime/utils0% | 0% | 0% | 0% | 100%
runtime/testing0% | 0% | 0% | 0% | 100%
runtime/logging0% | 0% | 0% | 0% | 100%
ktlint-rules/src0% | 0% | 0% | 0% | 100%
dokka-smithy/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
override fun hasNextElement()
in runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/XmlDeserializer.kt
29 10 0
fun projectNeedsPlatform()
in runtime/build.gradle.kts
9 10 2
override fun getFieldDescriptorTraits()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/XmlSerdeDescriptorGenerator.kt
65 8 3
fun splitHttpDateHeaderListValues()
in runtime/protocol/http/common/src/aws/smithy/kotlin/runtime/http/util/HeaderLists.kt
23 7 1
fun requiresDocumentDeserializer()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/model/knowledge/SerdeIndex.kt
19 7 1
override fun deserializeStruct()
in runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/XmlDeserializer.kt
23 6 1
protected open fun renderUri()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/protocol/HttpBindingProtocolGenerator.kt
54 6 3
fun render()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/protocol/HttpStringValuesMapSerializer.kt
43 6 1
override fun beginStruct()
in runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/XmlSerializer.kt
14 5 1
override fun nextToken()
in runtime/serde/serde-xml/jvm/src/aws/smithy/kotlin/runtime/serde/xml/XmlStreamReaderXmlPull.kt
8 5 0
override fun read()
in runtime/testing/jvm/src/aws/smithy/kotlin/runtime/testing/RandomInputStream.kt
19 5 3
override fun visit()
in ktlint-rules/src/main/kotlin/software/aws/ktlint/rules/MultilineIfElseBlockRule.kt
10 5 5
fun isValidKotlinIdentifier()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/lang/KotlinTypes.kt
10 5 1
open fun renderPrimitiveShapeSerializer()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGenerator.kt
18 5 2
override fun render()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/AbstractSerdeDescriptorGenerator.kt
37 5 0
protected open fun renderOperationSetup()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/protocol/HttpProtocolClientGenerator.kt
54 5 3
fun writeGradleBuild()
in smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/GradleGenerator.kt
55 5 3
fun parseDom()
in runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/dom/XmlNode.kt
34 4 1
suspend fun dumpRequest()
in runtime/protocol/http/common/src/aws/smithy/kotlin/runtime/http/request/HttpRequestBuilder.kt
30 4 2
override fun equals()
in runtime/protocol/http/common/src/aws/smithy/kotlin/runtime/http/util/CaseInsensitiveMap.kt
4 4 1