aws / aws-app-mesh-controller-for-k8s
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 1,104 units with 12,804 lines of code in units (50.3% of code).
    • 2 very long units (298 lines of code)
    • 6 long units (368 lines of code)
    • 116 medium size units (3,520 lines of code)
    • 305 small units (4,485 lines of code)
    • 675 very small units (4,133 lines of code)
2% | 2% | 27% | 35% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go2% | 2% | 27% | 35% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT97% | 0% | 0% | 0% | 2%
pkg/inject9% | 10% | 34% | 25% | 19%
pkg/aws0% | 18% | 39% | 6% | 35%
pkg/cloudmap0% | 4% | 57% | 25% | 12%
pkg/k8s0% | 13% | 35% | 23% | 27%
pkg/conversions0% | 2% | 32% | 49% | 15%
apis/appmesh0% | 0% | 14% | 29% | 55%
pkg/virtualrouter0% | 0% | 45% | 35% | 18%
pkg/mesh0% | 0% | 45% | 43% | 10%
pkg/virtualgateway0% | 0% | 37% | 39% | 23%
pkg/gatewayroute0% | 0% | 36% | 36% | 27%
pkg/virtualnode0% | 0% | 41% | 34% | 23%
pkg/virtualservice0% | 0% | 28% | 42% | 29%
webhooks/appmesh0% | 0% | 7% | 56% | 36%
pkg/webhook0% | 0% | 15% | 65% | 18%
controllers/appmesh0% | 0% | 0% | 53% | 46%
pkg/references0% | 0% | 0% | 54% | 45%
pkg/equality0% | 0% | 0% | 44% | 55%
pkg/runtime0% | 0% | 0% | 33% | 66%
pkg/algorithm0% | 0% | 0% | 100% | 0%
mocks/aws-app-mesh-controller-for-k8s0% | 0% | 0% | 0% | 100%
mocks/apimachinery0% | 0% | 0% | 0% | 100%
webhooks/core0% | 0% | 0% | 0% | 100%
pkg/version0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func main()
in main.go
176 16 0
func()
in pkg/inject/inject.go
122 5 1
80 1 0
func()
in pkg/inject/config.go
72 1 1
func updateEnvMapForEnvoy()
in pkg/inject/sidecar_builder.go
57 14 3
func()
in pkg/cloudmap/instances_health_prober.go
56 12 1
func()
in pkg/k8s/custom_controller.go
52 15 1
func Convert_CRD_VirtualNodeSpec_To_SDK_VirtualNodeSpec()
in pkg/conversions/virtualnode_types_conversion.go
51 13 3
func newInstruments()
in pkg/aws/metrics/instruments.go
50 6 1
func Convert_CRD_Listener_To_SDK_Listener()
in pkg/conversions/virtualnode_types_conversion.go
47 12 3
func()
in apis/appmesh/v1beta2/zz_generated.deepcopy.go
47 11 1
func()
in apis/appmesh/v1beta2/zz_generated.deepcopy.go
45 10 1
func()
in pkg/aws/throttle/config.go
43 10 1
func()
in pkg/cloudmap/resource_manager.go
42 11 1
func()
in pkg/virtualrouter/routes_manager.go
41 11 1
func()
in pkg/virtualrouter/resource_manager.go
41 11 1
func sidecarResources()
in pkg/inject/sidecar_builder.go
40 13 4
func()
in pkg/inject/xray.go
39 9 1
func()
in pkg/inject/inject.go
39 15 1
func()
in pkg/virtualservice/resource_manager.go
39 11 1