aws-amplify / amplify-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 4,692 units with 73,413 lines of code in units (60.8% of code).
    • 5 very long units (541 lines of code)
    • 169 long units (10,930 lines of code)
    • 1,050 medium size units (31,627 lines of code)
    • 1,014 small units (15,673 lines of code)
    • 2,454 very small units (14,642 lines of code)
<1% | 14% | 43% | 21% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift<1% | 14% | 43% | 21% | 19%
rb0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AmplifyPlugins/DataStore1% | 30% | 41% | 16% | 9%
AmplifyPlugins/Predictions3% | 8% | 35% | 39% | 12%
AmplifyPlugins/API0% | 21% | 51% | 20% | 6%
AmplifyPlugins/Core0% | 3% | 26% | 5% | 63%
AmplifyPlugins/Auth0% | 1% | 72% | 19% | 6%
AmplifyPlugins/Storage0% | 1% | 62% | 24% | 10%
AmplifyTests/CategoryTests0% | 0% | 25% | 64% | 10%
AmplifyTests/CoreTests0% | 0% | 37% | 32% | 30%
AmplifyPlugins/Analytics0% | 0% | 34% | 46% | 19%
AmplifyPlugins/Geo0% | 0% | 17% | 69% | 12%
Amplify/Categories0% | 0% | 10% | 53% | 35%
AmplifyTools/AmplifyXcode0% | 0% | 9% | 22% | 68%
Amplify/Core0% | 0% | 13% | 31% | 54%
Amplify/DefaultPlugins0% | 0% | 25% | 17% | 57%
AmplifyFunctionalTests/Hub0% | 0% | 0% | 100% | 0%
AmplifyFunctionalTests0% | 0% | 0% | 80% | 20%
Amplify/DevMenu0% | 0% | 0% | 12% | 87%
AmplifyTests/DevMenuTests0% | 0% | 0% | 0% | 100%
AmplifyTestApp0% | 0% | 0% | 0% | 100%
build-support0% | 0% | 0% | 0% | 100%
AmplifyTestCommon/Models0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func getLanguageType()
in AmplifyPlugins/Predictions/CoreMLPredictionsPlugin/Dependency/CoreMLNaturalLanguageAdapter.swift
118 57 0
func testSaveThenUpdateAndImmediatelyDelete()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginFlutterIntegrationTests/DataStoreFlutterConsecutiveUpdatesTests.swift
110 14 0
func testSaveThenUpdateAndImmediatelyDelete()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/DataStoreConsecutiveUpdatesTests.swift
107 14 0
func compare()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Sync/Support/Model+Compare.swift
104 32 2
func testOwnerCreatedDataCanBeReadByOtherUsersForReadableModel()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginAuthIntegrationTests/DefaultAuthCognito/AWSDataStoreCategoryPluginAuthIntegrationTests.swift
102 7 0
func testProcessesNewEvents()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginTests/Sync/SubscriptionSync/ModelReconciliationQueueBehaviorTests.swift
99 14 0
func testSaveAndImmediatelyUpdate()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginFlutterIntegrationTests/DataStoreFlutterConsecutiveUpdatesTests.swift
94 11 0
func testSaveAndImmediatelyUpdate()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/DataStoreConsecutiveUpdatesTests.swift
94 11 0
func testSaveThenMultipleUpdate()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/DataStoreConsecutiveUpdatesTests.swift
94 14 0
func testUpdateRegistrationToAnotherAttendee()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/TransformerV2/DataStoreConnectionScenario8V2Tests.swift
93 15 0
func testLastMutationSentWhenNoNetwork()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginTests/Sync/MutationQueue/OutgoingMutationQueueNetworkTests.swift
93 9 0
func testDeleteAttendeeShouldCascadeDeleteRegistration()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/TransformerV2/DataStoreConnectionScenario8V2Tests.swift
91 15 0
func testDeleteMeetingShouldCascadeDeleteRegistration()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/TransformerV2/DataStoreConnectionScenario8V2Tests.swift
91 15 0
func testDeleteRegistration()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/TransformerV2/DataStoreConnectionScenario8V2Tests.swift
90 14 0
func testDeletePostShouldDeleteComments()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginTests/Sync/LocalSubscriptionWithJSONModelTests.swift
89 14 0
func testSaveAndImmediatelyDelete()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginFlutterIntegrationTests/DataStoreFlutterConsecutiveUpdatesTests.swift
88 11 0
func handleBetween()
in AmplifyPlugins/Core/AWSPluginsCoreTests/Query/QueryPredicateEvaluateGenerator.swift
88 10 6
func testGetUserThenFetchPostEditorsToRetrievePosts()
in AmplifyPlugins/API/AWSAPICategoryPluginFunctionalTests/GraphQLModelBased/GraphQLConnectionScenario5Tests.swift
86 10 0
func testSaveAndImmediatelyDelete()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/DataStoreConsecutiveUpdatesTests.swift
85 11 0
func testUpdateProjectWithAnotherTeam()
in AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginFlutterIntegrationTests/Connection/DataStoreConnectionScenario2FlutterTests.swift
84 12 0