aws-samples / data-transfer-hub-cli
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 62 units with 1,327 lines of code in units (83.6% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (214 lines of code)
    • 24 medium size units (698 lines of code)
    • 20 small units (310 lines of code)
    • 15 very small units (105 lines of code)
0% | 16% | 52% | 23% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 16% | 52% | 23% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dth0% | 10% | 57% | 25% | 7%
cmd0% | 87% | 0% | 0% | 13%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func initConfig()
in cmd/root.go
87 3 0
func()
in dth/job.go
65 12 1
func()
in dth/job.go
62 10 1
func()
in dth/job.go
43 9 1
func()
in dth/job.go
42 6 1
func()
in dth/job.go
42 6 1
func()
in dth/job.go
41 6 1
func NewS3Client()
in dth/client.go
36 8 8
func()
in dth/job.go
34 5 1
func()
in dth/client.go
33 5 1
func()
in dth/job.go
32 8 1
func()
in dth/client.go
31 4 1
func()
in dth/client.go
29 5 1
func()
in dth/client.go
26 6 1
func()
in dth/service.go
26 4 1
func()
in dth/service.go
26 3 1
func()
in dth/client.go
25 4 1
25 5 4
func()
in dth/client.go
24 3 1
func()
in dth/job.go
24 5 1