aws / amazon-sagemaker-operator-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 598 units with 8,069 lines of code in units (28.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (275 lines of code)
    • 20 medium complex units (1,223 lines of code)
    • 46 simple units (1,435 lines of code)
    • 529 very simple units (5,136 lines of code)
0% | 3% | 15% | 17% | 63%
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% | 3% | 15% | 17% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
api/v10% | 4% | 16% | 17% | 61%
controllers/trainingjob0% | 37% | 0% | 15% | 47%
controllers/hosting0% | 10% | 7% | 36% | 45%
smlogs-kubectl-plugin/pkg0% | 0% | 46% | 23% | 30%
ROOT0% | 0% | 91% | 0% | 8%
controllers/hostingautoscalingpolicy0% | 0% | 38% | 32% | 29%
controllers/sdkutil0% | 0% | 7% | 14% | 77%
controllers/processingjob0% | 0% | 37% | 16% | 45%
controllers/hyperparametertuningjob0% | 0% | 17% | 35% | 46%
controllers/model0% | 0% | 28% | 20% | 51%
controllers/endpointconfig0% | 0% | 29% | 11% | 59%
controllers/batchtransformjob0% | 0% | 19% | 35% | 45%
controllers0% | 0% | 0% | 21% | 78%
controllers/controllertest0% | 0% | 0% | 0% | 100%
smlogs-kubectl-plugin/cmd0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in controllers/hosting/hostingdeployment_controller.go
76 30 1
func()
in controllers/trainingjob/trainingjob_controller.go
85 29 1
func()
in api/v1/trainingjob/zz_generated.deepcopy.go
114 26 1
func()
in controllers/processingjob/processingjob_controller.go
64 22 1
func()
in controllers/hyperparametertuningjob/hyperparametertuningjob_controller.go
63 22 1
func()
in controllers/hostingautoscalingpolicy/hostingautoscalingpolicy_controller.go
55 20 1
func()
in controllers/model/model_controller.go
54 19 1
func()
in controllers/endpointconfig/endpointconfig_controller.go
54 19 1
func()
in smlogs-kubectl-plugin/pkg/cmd/smlogs.go
72 19 1
func()
in smlogs-kubectl-plugin/pkg/cmd/smlogs.go
72 19 1
func()
in api/v1/processingjob/zz_generated.deepcopy.go
76 18 1
func()
in controllers/hosting/endpointconfig_reconciler.go
57 17 1
func()
in api/v1/common/zz_generated.deepcopy.go
71 16 1
func()
in api/v1/batchtransformjob/zz_generated.deepcopy.go
71 16 1
func()
in api/v1/hostingautoscalingpolicy/zz_generated.deepcopy.go
64 14 1
func()
in api/v1/hostingdeployment/zz_generated.deepcopy.go
56 14 1
func()
in controllers/hostingautoscalingpolicy/hostingautoscalingpolicy_controller.go
52 14 1
func()
in api/v1/common/zz_generated.deepcopy.go
51 12 1
func()
in api/v1/model/zz_generated.deepcopy.go
51 12 1
func CreateModelSpecFromDescription()
in controllers/sdkutil/spec_sdk_converters.go
39 12 1