awslabs / aws-sdk-swift
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 155 units with 1,519 lines of code in units (29.2% 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)
    • 1 simple units (9 lines of code)
    • 154 very simple units (1,510 lines of code)
0% | 0% | 0% | <1% | 99%
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
swift0% | 0% | 0% | 2% | 97%
kt0% | 0% | 0% | 0% | 100%
kts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
AWSClientRuntime/Sources0% | 0% | 0% | 3% | 96%
codegen/smithy-aws-swift-codegen0% | 0% | 0% | 0% | 100%
codegen/sdk-codegen0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
codegen0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
buildSrc/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func toCRTType()
in AWSClientRuntime/Sources/Signing/AWSSignedBodyValue.swift
9 6 0
func toCRTType()
in AWSClientRuntime/Sources/Signing/AWSSignatureType.swift
8 5 0
fun getProperty()
in codegen/sdk-codegen/build.gradle.kts
14 4 1
override fun render()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/httpResponse/AWSXMLHttpResponseTraitWithoutPayload.kt
36 4 0
override fun generateMiddlewareClosure()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/InputTypeGETQueryItemMiddleware.kt
26 4 0
func tryRequest()
in AWSClientRuntime/Sources/Middlewares/RetryerMiddleware.swift
27 4 6
override fun render()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/httpResponse/AWSEc2QueryHttpResponseTraitWithoutPayload.kt
32 3 0
override fun preprocessModel()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/sts/DisabledAuth.kt
11 3 2
override fun preprocessModel()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/BoxServices.kt
10 3 2
override fun customizeMiddleware()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/glacier/GlacierAcccountIdDefault.kt
14 3 3
func resolveEndpoint()
in AWSClientRuntime/Sources/Endpoints/Partition.swift
6 3 1
func endpointDefinitionForRegion()
in AWSClientRuntime/Sources/Endpoints/Partition.swift
9 3 1
func toCRTType()
in AWSClientRuntime/Sources/Signing/AWSSignedBodyHeader.swift
6 3 0
func sanitizeForUserAgentToken()
in AWSClientRuntime/Sources/PrimitiveExtensions/String+Extension.swift
5 3 0
fun generateSmithyBuild()
in codegen/sdk-codegen/build.gradle.kts
42 2 1
override fun addProtocolSpecificMiddleware()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt
8 2 2
override fun compare()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/EndpointResolverGenerator.kt
4 2 2
override fun renderContextAttributes()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpProtocolCustomizations.kt
10 2 4
override fun writeAdditionalFiles()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/PresignerGenerator.kt
18 2 2
override fun render()
in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlStructDecodeXMLGenerator.kt
7 2 0