aws-amplify / amplify-android
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 5,027 units with 36,100 lines of code in units (63.0% of code).
    • 3 very long units (419 lines of code)
    • 26 long units (1,616 lines of code)
    • 214 medium size units (6,415 lines of code)
    • 626 small units (8,785 lines of code)
    • 4,158 very small units (18,865 lines of code)
1% | 4% | 17% | 24% | 52%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java<1% | 4% | 17% | 23% | 53%
groovy100% | 0% | 0% | 0% | 0%
kt0% | 11% | 14% | 45% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
amplify-tools100% | 0% | 0% | 0% | 0%
aws-auth-cognito5% | 11% | 28% | 20% | 35%
aws-datastore1% | 7% | 32% | 26% | 31%
aws-api0% | 12% | 32% | 24% | 31%
core0% | 1% | 6% | 15% | 75%
aws-predictions0% | 5% | 42% | 25% | 26%
core-kotlin0% | 11% | 17% | 54% | 16%
aws-analytics-pinpoint0% | 17% | 5% | 25% | 50%
maplibre-adapter0% | 18% | 0% | 19% | 62%
aws-storage-s30% | 0% | 31% | 31% | 37%
aws-api-appsync0% | 0% | 27% | 29% | 43%
aws-predictions-tensorflow0% | 0% | 17% | 29% | 52%
testutils0% | 0% | 7% | 29% | 63%
aws-geo-location0% | 0% | 22% | 40% | 36%
testmodels0% | 0% | <1% | 29% | 69%
rxbindings0% | 0% | 4% | 7% | 88%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void apply()
in amplify-tools/amplify-tools-gradle-plugin/src/main/groovy/com/amplifyframework/tools/gradle/plugin/AmplifyTools.groovy
200 23 1
public void configure()
in aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AWSCognitoAuthPlugin.java
113 18 2
public SqlCommand queryFor()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteCommandFactory.java
106 16 2
public int compare()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/ModelComparator.java
100 23 2
private StringBuilder parsePredicateOperation()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/adapter/SQLPredicate.java
80 14 1
public RequestDecorator forAuthType()
in aws-api/src/main/java/com/amplifyframework/api/aws/auth/ApiRequestDecoratorFactory.java
78 17 1
public Object convertValueFromSource()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteModelFieldTypeConverter.java
76 23 2
public void configure()
in aws-analytics-pinpoint/src/main/java/com/amplifyframework/analytics/pinpoint/AWSPinpointAnalyticsPlugin.java
70 7 2
public void delete()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteStorageAdapter.java
68 7 5
synchronized void requestSubscription()
in aws-api/src/main/java/com/amplifyframework/api/aws/SubscriptionEndpoint.java
68 10 6
private void signInWithWebUIHelper()
in aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AWSCognitoAuthPlugin.java
65 9 5
public static ModelSchema fromModelClass()
in core/src/main/java/com/amplifyframework/core/model/ModelSchema.java
64 17 1
public void updateUserAttributes()
in aws-auth-cognito/src/main/java/com/amplifyframework/auth/cognito/AWSCognitoAuthPlugin.java
62 6 4
suspend fun getUrl()
in core-kotlin/src/main/java/com/amplifyframework/kotlin/storage/Storage.kt
61 2 2
public static Map parseSerializedData()
in core/src/main/java/com/amplifyframework/core/model/SerializedModel.java
60 10 3
public void save()
in aws-datastore/src/main/java/com/amplifyframework/datastore/storage/sqlite/SQLiteStorageAdapter.java
59 9 5
public Orchestrator()
in aws-datastore/src/main/java/com/amplifyframework/datastore/syncengine/Orchestrator.java
58 1 7
private IdentifyDocumentTextResult processTextractBlocks()
in aws-predictions/src/main/java/com/amplifyframework/predictions/aws/service/AWSTextractService.java
58 11 1
static AWSPredictionsPluginConfiguration fromJson()
in aws-predictions/src/main/java/com/amplifyframework/predictions/aws/AWSPredictionsPluginConfiguration.java
58 6 1
public void configure()
in aws-api/src/main/java/com/amplifyframework/api/aws/AWSApiPlugin.java
56 8 2