awslabs / amazon-ecr-data-replication-hub-plugin
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 10 units with 669 lines of code in units (76.6% of code).
    • 1 very long units (604 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 1 small units (16 lines of code)
    • 8 very small units (49 lines of code)
90% | 0% | 0% | 2% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts90% | 0% | 0% | 2% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lib97% | 0% | 0% | 0% | 2%
source/lambda0% | 0% | 0% | 32% | 67%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
constructor()
in source/lib/aws-data-replication-component-ecr-stack.ts
604 5 3
async function getSSMParameter()
in source/lambda/index.ts
16 2 3
async function splitSelectedImages()
in source/lambda/index.ts
10 2 1
for await()
in source/lambda/index.ts
8 3 2
for await()
in source/lambda/index.ts
7 2 2
private addToParamGroups()
in source/lib/aws-data-replication-component-ecr-stack.ts
6 1 2
export function addCfnNagSuppressRules()
in source/lib/aws-data-replication-component-ecr-stack.ts
5 1 2
private addToParamLabels()
in source/lib/aws-data-replication-component-ecr-stack.ts
5 1 2
async function getECRRepositories()
in source/lambda/index.ts
4 1 1
async function getECRImageTags()
in source/lambda/index.ts
4 1 2