aws / amazon-braket-containers
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 64 units with 773 lines of code in units (68.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (165 lines of code)
    • 2 medium complex units (108 lines of code)
    • 6 simple units (118 lines of code)
    • 55 very simple units (382 lines of code)
0% | 21% | 13% | 15% | 49%
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% | 21% | 13% | 15% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 21% | 13% | 15% | 49%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def image_builder()
in src/image_builder.py
165 36 1
32 14 1
def build()
in src/image.py
76 14 1
def get_code_setup_parameters()
in src/braket_container.py
23 10 0
25 10 3
29 10 3
def override()
in src/buildspec.py
15 9 2
10 8 2
16 6 3
def add()
in src/context.py
10 5 2
def progress()
in src/output.py
26 5 2
def unpack_code_and_add_to_path()
in src/braket_container.py
12 4 2
def log()
in src/output.py
7 4 3
def table()
in src/output.py
4 4 2
def download_file()
in src/utils.py
18 4 2
def pr_build_setup()
in src/utils.py
18 4 2
def join()
in src/buildspec.py
10 4 3
def create_symlink()
in src/braket_container.py
7 3 0
def run_customer_code()
in src/braket_container.py
10 3 0
def _find_image_object()
in src/image_builder.py
5 3 2