aws / aws-cloud-map-mcs-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 155 units with 1,936 lines of code in units (57.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (126 lines of code)
    • 24 medium size units (686 lines of code)
    • 40 small units (599 lines of code)
    • 89 very small units (525 lines of code)
0% | 6% | 35% | 30% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 6% | 35% | 30% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 94% | 0% | 0% | 5%
pkg/controllers0% | 8% | 50% | 25% | 15%
pkg/cloudmap0% | 0% | 32% | 42% | 24%
integration/scenarios0% | 0% | 56% | 36% | 7%
pkg/model0% | 0% | 28% | 37% | 33%
integration/janitor0% | 0% | 29% | 29% | 41%
pkg/api0% | 0% | 0% | 23% | 76%
pkg/common0% | 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
67 9 0
func()
in pkg/controllers/serviceexport_controller.go
59 13 1
func NewExportServiceScenario()
in integration/scenarios/export_service.go
41 4 6
func()
in pkg/controllers/cloudmap_controller.go
39 9 1
func()
in pkg/controllers/cloudmap_controller.go
37 9 1
func()
in pkg/controllers/serviceexport_controller.go
37 9 1
func()
in pkg/controllers/serviceexport_controller.go
36 6 1
func()
in pkg/cloudmap/operation_poller.go
35 9 1
func()
in pkg/controllers/cloudmap_controller.go
34 9 1
func()
in pkg/cloudmap/client.go
32 7 1
func()
in pkg/cloudmap/client.go
32 7 1
func()
in pkg/controllers/endpointslice_plan.go
31 8 1
func()
in pkg/controllers/cloudmap_controller.go
29 9 1
func()
in pkg/cloudmap/client.go
28 5 1
func()
in integration/janitor/janitor.go
27 4 1
func()
in pkg/cloudmap/operation_poller.go
26 1 1
func()
in pkg/controllers/endpointslice_plan.go
25 6 1
func()
in pkg/controllers/endpointslice_plan.go
24 6 1
func()
in pkg/controllers/serviceexport_controller.go
23 6 1
func()
in pkg/model/plan.go
22 6 1