aws-samples / aws-basic-deployment-workshop-sample
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 13 units with 84 lines of code in units (30.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 3 small units (50 lines of code)
    • 10 very small units (34 lines of code)
0% | 0% | 0% | 59% | 40%
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% | 0% | 59% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 0% | 94% | 5%
src/s30% | 0% | 0% | 66% | 33%
src/rds0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
async fileUploadToS3()
in src/s3/s3.service.ts
18 2 1
18 2 0
async createTypeOrmOptions()
in src/typeorm.service.ts
14 1 0
async createSample()
in src/rds/rds.service.ts
6 1 0
async uploadFile()
in src/s3/s3.controller.ts
4 1 1
async createSampleData()
in src/rds/rds.controller.ts
4 1 1
async readSample()
in src/rds/rds.controller.ts
4 1 1
async createSampleData()
in src/rds/rds.service.ts
4 1 0
get s3Bucket()
in src/s3/s3.service.ts
3 1 0
async readSample()
in src/rds/rds.service.ts
3 1 0
constructor()
in src/s3/s3.controller.ts
2 1 1
constructor()
in src/rds/rds.controller.ts
2 1 1
constructor()
in src/typeorm.service.ts
2 1 0