awslabs / damoos
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 52 units with 1,028 lines of code in units (95.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (315 lines of code)
    • 9 simple units (227 lines of code)
    • 36 very simple units (486 lines of code)
0% | 0% | 30% | 22% | 47%
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
py0% | 0% | 30% | 22% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
polyfit_adapter0% | 0% | 33% | 20% | 45%
pso_adapter0% | 0% | 22% | 28% | 49%
simple_rl_adapter0% | 0% | 58% | 0% | 41%
multiD_polyfit_adapter0% | 0% | 0% | 43% | 56%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def collect_data()
in scheme_adapters/pso_adapter/pso_adapter.py
41 15 1
def collect_data()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
39 14 2
def main()
in scheme_adapters/simple_rl_adapter/simple_rl_adapter.py
77 13 0
def parse_json()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
43 12 2
def parse_json()
in scheme_adapters/pso_adapter/pso_adapter.py
40 11 2
def run_best_workload()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
41 11 2
def polynomial_fit()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
34 11 6
def convert_scheme()
in scheme_adapters/pso_adapter/cache.py
18 10 2
def convert_scheme()
in scheme_adapters/polyfit_adapter/cache.py
18 10 1
def generate_json()
in scheme_adapters/multiD_polyfit_adapter/multiD_polyfit_adapter.py
27 9 2
def generate_search_param()
in scheme_adapters/pso_adapter/pso_adapter.py
32 8 1
def run_best_workload()
in scheme_adapters/pso_adapter/pso_adapter.py
32 7 2
def function()
in scheme_adapters/pso_adapter/pso_adapter.py
20 6 2
def run_orig()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
17 6 1
def exploit_best_region()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
30 6 1
def fit()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
33 6 2
def get_metric()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
28 5 3
def generate_search_param()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
24 5 1
def collect_score()
in scheme_adapters/polyfit_adapter/polyfit_adapter.py
15 5 3
def validate_json_list()
in scheme_adapters/pso_adapter/pso_adapter.py
7 4 2