aws-solutions / multi-region-infrastructure-deployment
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 18 units with 367 lines of code in units (18.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (76 lines of code)
    • 6 medium size units (151 lines of code)
    • 7 small units (121 lines of code)
    • 4 very small units (19 lines of code)
0% | 20% | 41% | 32% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 31% | 29% | 34% | 4%
js0% | 0% | 64% | 30% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/secondary-bucket-creator/source0% | 47% | 30% | 22% | 0%
source/custom-resource0% | 0% | 61% | 38% | 0%
source/drift-detection0% | 0% | 89% | 0% | 10%
source/changeset-validator0% | 0% | 86% | 0% | 13%
source/uuid-generator/source0% | 0% | 26% | 58% | 14%
source/stage-artifact-creator0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
async function createBucketInSecondaryRegion()
in source/secondary-bucket-creator/source/index.ts
76 6 4
async function sendAnonymousUsage()
in source/custom-resource/index.js
30 3 1
async function isDrifted()
in source/drift-detection/index.js
26 6 2
async function sendResult()
in source/changeset-validator/index.js
25 2 1
export async function handleCreate()
in source/secondary-bucket-creator/source/index.ts
25 5 1
async function processEvent()
in source/secondary-bucket-creator/source/index.ts
23 6 1
async function processEvent()
in source/uuid-generator/source/index.ts
22 5 1
function sendResponse()
in source/uuid-generator/source/index.ts
20 1 3
function sendResponse()
in source/secondary-bucket-creator/source/index.ts
20 1 3
async function sendResult()
in source/stage-artifact-creator/index.js
19 2 1
async function sendResponse()
in source/custom-resource/index.js
19 1 3
function withTimeout()
in source/uuid-generator/source/index.ts
15 1 2
function withTimeout()
in source/secondary-bucket-creator/source/index.ts
15 1 2
async function handleCreate()
in source/uuid-generator/source/index.ts
13 2 1
async function handleUpdate()
in source/uuid-generator/source/index.ts
6 1 0
async function handleDelete()
in source/uuid-generator/source/index.ts
6 1 0
TimeStamp: moment()
in source/changeset-validator/metrics.js
4 1 0
async function sleep()
in source/drift-detection/index.js
3 1 1