aws-amplify / aws-appsync-realtime-client-ios
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 91 units with 1,085 lines of code in units (41.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (75 lines of code)
    • 20 medium size units (583 lines of code)
    • 12 small units (158 lines of code)
    • 58 very small units (269 lines of code)
0% | 6% | 53% | 14% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift0% | 6% | 53% | 14% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AppSyncRealTimeClientIntegrationTests0% | 42% | 46% | 10% | 0%
AppSyncRealTimeClientTests/Connection0% | 0% | 100% | 0% | 0%
AppSyncRealTimeClientTests/ConnectionProvider0% | 0% | 100% | 0% | 0%
AppSyncRTCSample0% | 0% | 52% | 19% | 27%
AppSyncRealTimeClient/Connection0% | 0% | 76% | 15% | 7%
AppSyncRealTimeClientTests/Support0% | 0% | 22% | 50% | 27%
AppSyncRealTimeClient/ConnectionProvider0% | 0% | 0% | 21% | 78%
AppSyncRealTimeClientTests/Interceptor0% | 0% | 0% | 34% | 65%
HostApp0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClient/Support0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClient/Interceptor0% | 0% | 0% | 0% | 100%
AppSyncRealTimeClient/Websocket0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func testAllSubscriptionsCancelledShouldDisconnectTheWebsocket2()
in AppSyncRealTimeClientIntegrationTests/AppSyncRealTimeClientIntegrationTests.swift
75 17 0
func testAddRemoveListeners()
in AppSyncRealTimeClientTests/ConnectionProvider/ConnectionProviderTests.swift
42 2 0
func testReceiveValidData()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
35 6 0
func testServiceOverridesStaleConnectionTimeout()
in AppSyncRealTimeClientTests/ConnectionProvider/ConnectionProviderTests.swift
34 1 0
func testServiceOverridesStaleConnectionTimeout()
in AppSyncRealTimeClientTests/ConnectionProvider/ConnectionProviderStaleConnectionTests.swift
34 1 0
func testUnSubscribeConnection()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
32 7 0
func testSubscribeWithSubscriptionConnection()
in AppSyncRealTimeClientIntegrationTests/AppSyncRealTimeClientIntegrationTests.swift
31 7 0
func handleDataEvent()
in AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+DataHandler.swift
31 6 1
func testSuccessfulConnection()
in AppSyncRealTimeClientTests/ConnectionProvider/ConnectionProviderTests.swift
29 1 0
func testConnectionError()
in AppSyncRealTimeClientTests/ConnectionProvider/ConnectionProviderTests.swift
29 1 0
func handleEvent()
in AppSyncRTCSample/AppSyncRTCProvider.swift
29 7 1
func testNotConnectedEventDuringSubscribe()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
27 6 0
func testNilDataInVariables()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
27 6 0
init()
in AppSyncRTCSample/AppSyncRTCProvider.swift
27 1 0
func handleError()
in AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift
27 4 1
func testSubscriptionConnection()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
26 6 0
func testInvalidConnection()
in AppSyncRealTimeClientTests/Connection/AppSyncSubscriptionConnectionTests.swift
26 6 0
func testSubscribeUnsubscribeRepeat()
in AppSyncRealTimeClientIntegrationTests/AppSyncRealTimeClientIntegrationTests.swift
25 3 0
func testMultipleThreadsSubscribeUnsubscribe()
in AppSyncRealTimeClientIntegrationTests/AppSyncRealTimeClientIntegrationTests.swift
25 1 0
func subscribe()
in AppSyncRTCSample/AppSyncRTCProvider.swift
24 2 0