aws-observability / aws-sigv4-proxy-admission-controller
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 22 units with 428 lines of code in units (84.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (189 lines of code)
    • 12 small units (198 lines of code)
    • 5 very small units (41 lines of code)
0% | 0% | 44% | 46% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 44% | 46% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
controller0% | 0% | 58% | 27% | 13%
ROOT0% | 0% | 75% | 24% | 0%
controller/mocks0% | 0% | 15% | 78% | 6%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in controller/webhook.go
48 6 1
func()
in controller/webhook.go
46 9 1
func()
in controller/webhook.go
36 13 1
func main()
in main.go
34 4 0
func()
in controller/mocks/KubernetesNamespaceClient.go
25 5 1
func addContainers()
in controller/webhook.go
20 3 3
func()
in controller/mocks/KubernetesNamespaceClient.go
18 4 1
func()
in controller/mocks/KubernetesNamespaceClient.go
18 4 1
func()
in controller/mocks/KubernetesNamespaceClient.go
18 4 1
func()
in controller/mocks/KubernetesNamespaceClient.go
18 4 1
func()
in controller/mocks/KubernetesNamespaceClient.go
18 4 1
func()
in controller/mocks/KubernetesNamespaceClient.go
18 4 1
func()
in controller/mocks/KubernetesNamespaceClient.go
18 4 1
func()
in controller/webhook.go
16 4 1
func updateAnnotations()
in controller/webhook.go
14 4 2
func()
in controller/webhook.go
11 3 1
11 3 0
func extractParameters()
in controller/webhook.go
10 3 3
func()
in controller/mocks/KubernetesNamespaceClient.go
10 2 1
func()
in controller/webhook.go
8 2 1