aws-amplify / amplify-cli-export-construct
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 22 units with 355 lines of code in units (33.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (199 lines of code)
    • 7 small units (104 lines of code)
    • 9 very small units (52 lines of code)
0% | 0% | 56% | 29% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 56% | 29% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/export-backend-asset-handler0% | 0% | 75% | 19% | 4%
src0% | 0% | 26% | 48% | 24%
src/include-nested-stacks0% | 0% | 0% | 0% | 100%
src/include-nested-stacks/api-rest0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private uploadInteractionsLexZip()
in src/export-backend-asset-handler/index.ts
35 3 1
private uploadLambdaZip()
in src/export-backend-asset-handler/index.ts
35 3 1
private uploadAppSyncFiles()
in src/export-backend-asset-handler/index.ts
35 5 1
private updatePropsToIncludeEnv()
in src/base-exported-backend.ts
34 7 1
private uploadAuthTriggerFiles()
in src/export-backend-asset-handler/index.ts
31 3 1
private uploadLambdaLayerZips()
in src/export-backend-asset-handler/index.ts
29 3 1
private createAuxiliaryFileAsset()
in src/export-backend-asset-handler/index.ts
19 2 0
protected transformTemplateFile()
in src/base-exported-backend.ts
18 5 2
protected findResourceForNestedStack()
in src/base-exported-backend.ts
16 5 3
protected filterCategory()
in src/base-exported-backend.ts
16 6 3
private referenceDeploymentBucket()
in src/export-backend-asset-handler/index.ts
13 2 0
private validateFilesAndReturnPath()
in src/export-backend-asset-handler/index.ts
11 3 1
private validatePath()
in src/base-exported-backend.ts
11 3 1
constructor()
in src/export-backend-asset-handler/index.ts
10 1 3
private modifyEnv()
in src/base-exported-backend.ts
9 2 1
private getCategoryNestedStack()
in src/export-backend.ts
7 1 1
protected getExportedDataFromFile()
in src/base-exported-backend.ts
7 2 1
private applyTags()
in src/export-backend.ts
5 1 2
constructor()
in src/include-nested-stacks/api-rest/api-rest-include-stack.ts
4 1 2
constructor()
in src/include-nested-stacks/base-included-stack.ts
4 1 1