aws-samples / lambda-refarch-imagerecognition
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 23 units with 267 lines of code in units (24.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (163 lines of code)
    • 3 small units (44 lines of code)
    • 14 very small units (60 lines of code)
0% | 0% | 61% | 16% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 61% | 16% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
amplify/backend/function0% | 0% | 61% | 15% | 23%
lambda-functions/store-image-metadata0% | 0% | 88% | 0% | 11%
lambda-functions/thumbnail0% | 0% | 0% | 81% | 18%
lambda-functions/extract-image-metadata0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
updatePhoto()
in lambda-functions/store-image-metadata/index.js
37 1 2
async function processRecord()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
32 3 1
key: fullsizeKey()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
25 3 2
async function processRecord()
in amplify/backend/function/S3Trigger984fb593/src/index.js
25 2 1
async function resize()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
23 1 3
createPhoto()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
21 1 2
async function startSfnExecution()
in amplify/backend/function/S3Trigger984fb593/src/index.js
18 1 3
async function generateThumbnail()
in lambda-functions/thumbnail/index.js
13 2 5
async function storePhotoInfo()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
13 1 1
updatePhoto()
in amplify/backend/function/S3Trigger984fb593/src/index.js
9 1 2
mutation UpdatePhoto()
in lambda-functions/store-image-metadata/index.js
5 1 1
mutation CreatePhoto()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
5 1 1
key: thumbnailKey()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
5 1 2
mutation UpdatePhoto()
in amplify/backend/function/S3Trigger984fb593/src/index.js
5 1 1
function ImageIdentifyError()
in lambda-functions/extract-image-metadata/index.js
4 1 1
Key: fullsizeKey()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
4 1 2
mutation StartSfnExecution()
in amplify/backend/function/S3Trigger984fb593/src/index.js
4 1 1
startSfnExecution()
in amplify/backend/function/S3Trigger984fb593/src/index.js
4 1 1
function thumbnailKey()
in lambda-functions/thumbnail/index.js
3 1 2
function thumbnailKey()
in amplify/backend/function/S3Trigger984fb593/src/reference-index.js
3 1 2