aws / aws-cloud-map-mcs-controller-for-k8s
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 155 units with 1,936 lines of code in units (57.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (59 lines of code)
    • 17 simple units (544 lines of code)
    • 137 very simple units (1,333 lines of code)
0% | 0% | 3% | 28% | 68%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go0% | 0% | 3% | 28% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/controllers0% | 0% | 8% | 47% | 43%
pkg/cloudmap0% | 0% | 0% | 16% | 83%
ROOT0% | 0% | 0% | 94% | 5%
pkg/model0% | 0% | 0% | 14% | 85%
integration/scenarios0% | 0% | 0% | 19% | 80%
pkg/api0% | 0% | 0% | 0% | 100%
integration/janitor0% | 0% | 0% | 0% | 100%
pkg/common0% | 0% | 0% | 0% | 100%
pkg/version0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/controllers/serviceexport_controller.go
59 13 1
func()
in pkg/controllers/cloudmap_controller.go
34 9 1
func()
in pkg/controllers/cloudmap_controller.go
29 9 1
func()
in pkg/controllers/cloudmap_controller.go
37 9 1
func()
in pkg/controllers/cloudmap_controller.go
39 9 1
func()
in pkg/controllers/serviceexport_controller.go
37 9 1
func()
in pkg/cloudmap/operation_poller.go
35 9 1
func main()
in main.go
67 9 0
func()
in pkg/controllers/endpointslice_plan.go
31 8 1
func()
in pkg/cloudmap/client.go
32 7 1
func()
in pkg/cloudmap/client.go
32 7 1
func PortsEqualIgnoreOrder()
in pkg/controllers/utils.go
19 6 2
func()
in pkg/controllers/serviceexport_controller.go
36 6 1
func()
in pkg/controllers/serviceexport_controller.go
23 6 1
func()
in pkg/controllers/endpointslice_plan.go
24 6 1
func()
in pkg/controllers/endpointslice_plan.go
25 6 1
func()
in pkg/model/plan.go
22 6 1
func()
in integration/scenarios/export_service.go
22 6 1
func()
in pkg/api/v1alpha1/zz_generated.deepcopy.go
20 5 1
func()
in pkg/controllers/cloudmap_controller.go
15 5 1