aws / sagemaker-experiments
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 147 units with 976 lines of code in units (59.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (14 lines of code)
    • 8 simple units (164 lines of code)
    • 138 very simple units (798 lines of code)
0% | 0% | 1% | 16% | 81%
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% | 1% | 16% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/smexperiments0% | 0% | 1% | 19% | 79%
scripts0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def to_boto()
in src/smexperiments/_boto_functions.py
14 15 3
def from_boto()
in src/smexperiments/_boto_functions.py
17 10 3
def log_table()
in src/smexperiments/tracker.py
18 9 5
def get_or_create_default_bucket()
in src/smexperiments/_utils.py
23 8 2
def delete_all()
in src/smexperiments/experiment.py
31 7 2
def __init__()
in src/smexperiments/metrics.py
22 7 5
def delete()
in src/smexperiments/trial_component.py
22 7 2
def __init__()
in src/smexperiments/search_expression.py
7 7 5
def delete_all()
in src/smexperiments/trial.py
24 6 2
def _log_graph_artifact()
in src/smexperiments/tracker.py
11 5 5
def add_association()
in src/smexperiments/tracker.py
7 5 2
def parse()
in scripts/version.py
9 5 1
def create()
in src/smexperiments/trial.py
13 4 6
def add_trial_component()
in src/smexperiments/trial.py
12 4 2
def remove_trial_component()
in src/smexperiments/trial.py
12 4 2
def log_metric()
in src/smexperiments/metrics.py
17 4 5
def from_boto()
in src/smexperiments/_base_types.py
6 4 3
def __init__()
in src/smexperiments/tracker.py
9 4 5
def log_output_artifact()
in src/smexperiments/tracker.py
10 4 4
def log_input_artifact()
in src/smexperiments/tracker.py
10 4 4