awslabs / aws-mobile-appsync-sdk-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 542 units with 5,807 lines of code in units (25.0% of code).
    • 1 very long units (284 lines of code)
    • 11 long units (668 lines of code)
    • 49 medium size units (1,545 lines of code)
    • 99 small units (1,442 lines of code)
    • 382 very small units (1,868 lines of code)
4% | 11% | 26% | 24% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift4% | 11% | 26% | 24% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AWSAppSyncIntegrationTests18% | 31% | 23% | 13% | 13%
ApolloTests0% | 3% | 30% | 35% | 29%
AWSAppSyncTestCommon0% | 34% | 0% | 7% | 57%
AWSAppSyncClient/Internal0% | 0% | 32% | 26% | 41%
AWSAppSyncClient0% | 0% | 38% | 10% | 50%
AWSAppSyncTestApp0% | 0% | 47% | 24% | 28%
AWSAppSyncTestCommon/MockConnectionProvider0% | 0% | 41% | 37% | 20%
AWSAppSyncIntegrationTests/Helpers0% | 0% | 84% | 0% | 16%
AWSAppSyncClient/Apollo0% | 0% | 0% | 6% | 93%
AWSAppSyncTestCommon/MockAuthProvider0% | 0% | 0% | 0% | 100%
AWSAppSyncTestCommon/MockSubscriptionFactory0% | 0% | 0% | 0% | 100%
AWSAppSyncTestHostApp0% | 0% | 0% | 0% | 100%
AWSAppSyncTestAppUITests0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func testSyncOperationAtSetupAndReconnect()
in AWSAppSyncIntegrationTests/AWSAppSyncAPIKeyAuthTests.swift
284 25 0
func testProtectedReadWithCachingSegregation()
in AWSAppSyncIntegrationTests/AWSAppSyncMultiAuthClientsTests.swift
77 1 0
func doSubscriptionResultHandlerTesting()
in AWSAppSyncIntegrationTests/SubscriptionTests.swift
68 4 1
func testSubscriptionIsInvokedOnProvidedQueue()
in AWSAppSyncIntegrationTests/SubscriptionTests.swift
66 2 0
func testOptimisticWriteWithQueryParameter()
in AWSAppSyncIntegrationTests/AWSAppSyncAPIKeyAuthTests.swift
65 2 0
init?()
in AWSAppSyncTestCommon/AppSyncClientTestConfiguration.swift
65 1 1
56 1 0
func testDeltaSyncMetadataClear()
in AWSAppSyncIntegrationTests/AWSAppSyncMultiAuthClientsTests.swift
56 5 0
55 1 0
func testSubscription()
in AWSAppSyncIntegrationTests/SubscriptionTests.swift
54 3 0
func testSubscription()
in AWSAppSyncIntegrationTests/AWSAppSyncLambdaAuthTests.swift
54 3 1
func testMultiClientSubscriptions()
in AWSAppSyncIntegrationTests/AWSAppSyncMultiAuthClientsTests.swift
52 4 0
50 1 0
func testHumanQueryWithDotInFieldArgumentFromCache()
in ApolloTests/CachePersistenceTests.swift
50 1 0
func testS3UploadUsingParameters()
in AWSAppSyncIntegrationTests/AWSAppSyncCognitoAuthTests.swift
46 2 0
func send()
in AWSAppSyncClient/AWSAppSyncClientConflictResolutionExtensions.swift
46 5 4
func testWatchedQueryWithID()
in ApolloTests/WatchQueryTests.swift
45 1 0
func testS3UploadUsingFileInput()
in AWSAppSyncIntegrationTests/AWSAppSyncCognitoAuthTests.swift
45 2 0
func performS3Mutation()
in AWSAppSyncTestApp/ViewController.swift
43 2 0
func testRefetchWatchedQuery()
in ApolloTests/WatchQueryTests.swift
42 1 0