cdklabs / cdk-ecr-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 80 units with 977 lines of code in units (78.7% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (116 lines of code)
    • 12 medium size units (372 lines of code)
    • 16 small units (245 lines of code)
    • 50 very small units (244 lines of code)
0% | 11% | 38% | 25% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 13% | 38% | 24% | 23%
ts0% | 0% | 47% | 33% | 19%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda0% | 27% | 28% | 10% | 33%
lambda/internal/tarfile0% | 9% | 43% | 27% | 19%
src0% | 0% | 47% | 33% | 19%
lambda/s30% | 0% | 30% | 28% | 41%
lambda/internal/iolimits0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func handler()
in lambda/main.go
63 14 2
func()
in lambda/internal/tarfile/src.go
53 13 1
constructor()
in src/index.ts
42 1 3
func()
in lambda/internal/tarfile/src.go
37 7 1
func ParseReference()
in lambda/s3/transport.go
36 10 1
func()
in lambda/utils.go
33 6 1
func()
in lambda/internal/tarfile/reader.go
32 11 1
func()
in lambda/internal/tarfile/src.go
32 7 1
func GetECRLogin()
in lambda/utils.go
31 5 1
func()
in lambda/internal/tarfile/s3file.go
27 6 1
func()
in lambda/internal/tarfile/src.go
27 6 1
func()
in lambda/internal/tarfile/s3file.go
26 6 1
func()
in lambda/internal/tarfile/reader.go
26 8 1
func()
in lambda/internal/tarfile/s3file.go
23 7 1
func()
in lambda/internal/tarfile/s3file.go
19 5 1
func newImageSource()
in lambda/s3/src.go
18 4 3
func NewLRUBlockPool()
in lambda/internal/tarfile/s3file.go
18 1 1
func ParseS3Uri()
in lambda/internal/tarfile/s3file.go
17 3 1
func()
in lambda/internal/tarfile/s3file.go
17 5 1
func NewS3File()
in lambda/internal/tarfile/s3file.go
17 2 2