awslabs / aws-mobile-appsync-sdk-ios
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 542 units with 5,807 lines of code in units (25.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (284 lines of code)
    • 3 simple units (104 lines of code)
    • 538 very simple units (5,419 lines of code)
0% | 0% | 4% | 1% | 93%
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% | 4% | 1% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
AWSAppSyncIntegrationTests0% | 0% | 18% | 2% | 79%
AWSAppSyncClient/Internal0% | 0% | 0% | 16% | 83%
ApolloTests0% | 0% | 0% | 0% | 100%
AWSAppSyncClient/Apollo0% | 0% | 0% | 0% | 100%
AWSAppSyncClient0% | 0% | 0% | 0% | 100%
AWSAppSyncTestCommon0% | 0% | 0% | 0% | 100%
AWSAppSyncTestApp0% | 0% | 0% | 0% | 100%
AWSAppSyncTestCommon/MockConnectionProvider0% | 0% | 0% | 0% | 100%
AWSAppSyncIntegrationTests/Helpers0% | 0% | 0% | 0% | 100%
AWSAppSyncTestCommon/MockAuthProvider0% | 0% | 0% | 0% | 100%
AWSAppSyncTestCommon/MockSubscriptionFactory0% | 0% | 0% | 0% | 100%
AWSAppSyncTestHostApp0% | 0% | 0% | 0% | 100%
AWSAppSyncTestAppUITests0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func testSyncOperationAtSetupAndReconnect()
in AWSAppSyncIntegrationTests/AWSAppSyncAPIKeyAuthTests.swift
284 25 0
func shouldRetryRequest()
in AWSAppSyncClient/Internal/AWSAppSyncRetryHandler.swift
36 10 1
func getLatestAuthToken()
in AWSAppSyncClient/Internal/SubscriptionFactory/AppSyncRealTimeClientOIDCAuthProvider.swift
35 7 0
func testStartStopStartSubscriptions()
in AWSAppSyncIntegrationTests/SubscriptionTests.swift
33 6 0
func doTestReturnCacheDataAndFetchCacheMiss()
in ApolloTests/FetchQueryTestsComplex.swift
22 5 1
func testDeltaSyncMetadataClear()
in AWSAppSyncIntegrationTests/AWSAppSyncMultiAuthClientsTests.swift
56 5 0
func shouldRetryRequest()
in AWSAppSyncClient/Internal/AWSAppSyncRetryHandler.swift
17 5 1
func send()
in AWSAppSyncClient/AWSAppSyncClientConflictResolutionExtensions.swift
46 5 4
func testMultiClientSubscriptions()
in AWSAppSyncIntegrationTests/AWSAppSyncMultiAuthClientsTests.swift
52 4 0
func doSubscriptionResultHandlerTesting()
in AWSAppSyncIntegrationTests/SubscriptionTests.swift
68 4 1
func interceptMessage()
in AWSAppSyncClient/Internal/AuthInterceptor/LambdaAuthInterceptor.swift
18 4 2
func handleConnectionEvent()
in AWSAppSyncClient/AWSAppSyncSubscriptionWatcher.swift
12 4 1
func write()
in AWSAppSyncTestCommon/MockConnectionProvider/MockConnectionProvider.swift
24 4 1
func testReturnCacheDataAndFetchCacheHit()
in ApolloTests/FetchQueryTestsSimple.swift
19 3 0
func testLoadingHeroNameQueryWithMissingName()
in ApolloTests/LoadQueryFromStoreTests.swift
19 3 0
func testLoadingHeroNameQueryWithNullName()
in ApolloTests/LoadQueryFromStoreTests.swift
19 3 0
func testReturnCacheDataAndFetchCacheHit()
in ApolloTests/FetchQueryTestsComplex.swift
20 3 0
func testGetScalarWithMissingKey()
in ApolloTests/ReadFieldValueTests.swift
12 3 0
func testGetScalarWithNull()
in ApolloTests/ReadFieldValueTests.swift
12 3 0
func testGetScalarWithWrongType()
in ApolloTests/ReadFieldValueTests.swift
13 3 0