aws-samples / amazon-sagemaker-entrypoint-utilities
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 82 units with 1,383 lines of code in units (84.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (462 lines of code)
    • 21 simple units (469 lines of code)
    • 52 very simple units (452 lines of code)
0% | 0% | 33% | 33% | 32%
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% | 33% | 33% | 32%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 41% | 31% | 27%
src/smepu0% | 0% | 20% | 38% | 41%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_versions()
in versioneer.py
57 22 1
def git_versions_from_keywords()
in src/smepu/_version.py
41 17 3
41 17 3
def git_pieces_from_vcs()
in src/smepu/_version.py
50 16 4
50 16 4
def decode()
in src/smepu/_gluonts_core_serde.py
18 15 1
def get_cmdclass()
in versioneer.py
110 14 0
def do_setup()
in versioneer.py
64 14 0
def do_vcs_install()
in versioneer.py
31 11 3
def run_command()
in src/smepu/_version.py
31 10 6
def render()
in src/smepu/_version.py
32 10 2
def run_command()
in versioneer.py
31 10 6
def run_command()
in versioneer.py
35 10 6
def render()
in versioneer.py
27 10 2
def render()
in versioneer.py
32 10 2
def scan_setup_py()
in versioneer.py
34 9 0
def _round_1()
in src/smepu/argparse.py
18 8 1
def get_root()
in versioneer.py
26 8 0
def infer_dtype()
in src/smepu/argparse.py
19 7 1
def reduce_oir()
in src/smepu/argparse.py
11 7 1