aws-amplify / aws-appsync-realtime-client-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 91 units with 1,085 lines of code in units (41.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (75 lines of code)
    • 9 simple units (264 lines of code)
    • 81 very simple units (746 lines of code)
0% | 0% | 6% | 24% | 68%
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% | 6% | 24% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
AppSyncRealTimeClientIntegrationTests0% | 0% | 42% | 17% | 39%
AppSyncRealTimeClientTests/Connection0% | 0% | 0% | 100% | 0%
AppSyncRealTimeClient/Connection0% | 0% | 0% | 40% | 59%
AppSyncRTCSample0% | 0% | 0% | 19% | 80%
AppSyncRealTimeClientTests/ConnectionProvider0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClient/ConnectionProvider0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClientTests/Support0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClientTests/Interceptor0% | 0% | 0% | 0% | 100%
HostApp0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClient/Support0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClient/Interceptor0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClient/Websocket0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func testAllSubscriptionsCancelledShouldDisconnectTheWebsocket2()
in AppSyncRealTimeClientIntegrationTests/AppSyncRealTimeClientIntegrationTests.swift
75 17 0
func testUnSubscribeConnection()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
32 7 0
func testSubscribeWithSubscriptionConnection()
in AppSyncRealTimeClientIntegrationTests/AppSyncRealTimeClientIntegrationTests.swift
31 7 0
func handleEvent()
in AppSyncRTCSample/AppSyncRTCProvider.swift
29 7 1
func testSubscriptionConnection()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
26 6 0
func testInvalidConnection()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
26 6 0
func testNotConnectedEventDuringSubscribe()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
27 6 0
func testReceiveValidData()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
35 6 0
func testNilDataInVariables()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
27 6 0
func handleDataEvent()
in AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+DataHandler.swift
31 6 1
func handleError()
in AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift
27 4 1
func handleConnectionEvent()
in AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+Connection.swift
12 4 1
func getValue()
in AppSyncRealTimeClient/ConnectionProvider/AppSyncMessage.swift
10 4 0
func toAppSyncResponseType()
in AppSyncRealTimeClient/ConnectionProvider/AppsyncRealtimeConnection/RealtimeConnectionProvider+Websocket.swift
12 4 0
func testSubscribeUnsubscribeRepeat()
in AppSyncRealTimeClientIntegrationTests/AppSyncRealTimeClientIntegrationTests.swift
25 3 0
func scene()
in HostApp/SceneDelegate.swift
9 2 3
func testAddRemoveListeners()
in AppSyncRealTimeClientTests/ConnectionProvider/ConnectionProviderTests.swift
42 2 0
func subscribe()
in AppSyncRTCSample/AppSyncRTCProvider.swift
24 2 0
func scene()
in AppSyncRTCSample/SceneDelegate.swift
13 2 3
func startStaleConnectionTimer()
in AppSyncRealTimeClient/ConnectionProvider/AppsyncRealtimeConnection/RealtimeConnectionProvider+StaleConnection.swift
9 2 0