awslabs / amazon-ecr-containerd-resolver
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 72 units with 1,410 lines of code in units (80.3% of code).
    • 1 very long units (106 lines of code)
    • 4 long units (271 lines of code)
    • 21 medium size units (654 lines of code)
    • 12 small units (184 lines of code)
    • 34 very small units (195 lines of code)
7% | 19% | 46% | 13% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go7% | 19% | 46% | 13% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
example/ecr-pull41% | 26% | 18% | 0% | 13%
ecr0% | 17% | 44% | 22% | 15%
example/ecr-push0% | 29% | 57% | 0% | 12%
ecr/stream0% | 0% | 100% | 0% | 0%
example/ecr-copy0% | 0% | 82% | 0% | 17%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func showProgress()
in example/ecr-pull/progress.go
106 22 4
func newLayerWriter()
in ecr/layer_writer.go
78 5 4
func()
in ecr/resolver.go
69 12 1
func main()
in example/ecr-pull/main.go
68 12 0
func main()
in example/ecr-push/main.go
56 8 0
func Display()
in example/ecr-pull/progress.go
48 7 3
func display()
in example/ecr-push/progress.go
48 7 3
46 9 1
func()
in ecr/manifest_writer.go
46 7 1
func main()
in example/ecr-copy/main.go
43 8 0
func()
in ecr/layer_writer.go
40 9 1
func()
in ecr/base.go
32 7 1
func()
in ecr/fetcher.go
30 4 1
func()
in example/ecr-push/progress.go
30 5 1
func displayUploadProgress()
in example/ecr-push/main.go
29 7 3
28 8 2
func()
in ecr/fetcher.go
28 4 1
func NewResolver()
in ecr/resolver.go
26 6 1
func()
in ecr/fetcher.go
25 5 1
func()
in ecr/stream/chunked_processor.go
24 8 1