pytorch / elastic
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 114 units with 1,318 lines of code in units (52.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (71 lines of code)
    • 9 simple units (267 lines of code)
    • 104 very simple units (980 lines of code)
0% | 0% | 5% | 20% | 74%
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% | 11% | 32% | 56%
py0% | 0% | 0% | 9% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
kubernetes/controllers0% | 0% | 14% | 35% | 49%
aws0% | 0% | 0% | 12% | 87%
kubernetes/api0% | 0% | 0% | 29% | 70%
azure0% | 0% | 0% | 6% | 93%
kubernetes0% | 0% | 0% | 0% | 100%
aws/auth0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
torchelastic/distributed0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in kubernetes/controllers/job.go
71 15 1
def get_hostnames()
in aws/autoscaling.py
22 9 3
func onDependentCreateFunc()
in kubernetes/controllers/expectation.go
32 9 1
func onDependentDeleteFunc()
in kubernetes/controllers/expectation.go
32 9 1
func()
in kubernetes/controllers/elasticjob_controller.go
45 9 1
15 7 0
def create_specs_file()
in aws/cloudformation.py
32 7 4
func()
in kubernetes/controllers/elasticjob_controller.go
30 7 1
func()
in kubernetes/api/v1alpha1/zz_generated.deepcopy.go
29 6 1
func SetClusterSpecForPod()
in kubernetes/controllers/pod.go
30 6 2
def run_job()
in aws/petctl.py
43 5 3
def configure()
in aws/petctl.py
15 5 1
func()
in kubernetes/controllers/expectation.go
15 5 1
def run_commands()
in azure/util.py
17 4 1
11 4 0
10 4 0
def get_session()
in aws/auth/session.py
13 4 2
def wait_for()
in aws/util.py
20 4 4
def describe_stack()
in aws/cloudformation.py
14 4 2
def list_hosts()
in aws/petctl.py
19 4 3