aws-samples / cdk-graviton2-gh-sh-runner
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 56 units with 370 lines of code in units (62.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (8 lines of code)
    • 55 very simple units (362 lines of code)
0% | 0% | 0% | 2% | 97%
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% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
example_app/graviton2_gh_runner_flask_app/helpers0% | 0% | 0% | 100% | 0%
example_app/graviton2_gh_runner_flask_app/resources0% | 0% | 0% | 0% | 100%
example_app/graviton2_gh_runner_flask_app/models0% | 0% | 0% | 0% | 100%
example_app/graviton2_gh_runner_flask_app/controllers0% | 0% | 0% | 0% | 100%
example_app0% | 0% | 0% | 0% | 100%
example_app/graviton2_gh_runner_flask_app0% | 0% | 0% | 0% | 100%
cdk_graviton2_gh_sh_runner0% | 0% | 0% | 0% | 100%
example_app/graviton2_gh_runner_flask_app/dynamodb0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def convert_decimal()
in example_app/graviton2_gh_runner_flask_app/helpers/helpers.py
8 8 1
def __init__()
in cdk_graviton2_gh_sh_runner/ec2_stack.py
26 3 5
def default()
in example_app/graviton2_gh_runner_flask_app/models/helpers.py
7 3 2
def post()
in example_app/graviton2_gh_runner_flask_app/resources/books.py
13 3 1
def create_cart_data()
in example_app/load_local_data.py
12 3 3
def load_order_data()
in example_app/load_local_data.py
26 3 3
def __init__()
in example_app/graviton2_gh_runner_flask_app/controllers/books_controller.py
6 2 3
def __init__()
in example_app/graviton2_gh_runner_flask_app/controllers/orders_controller.py
6 2 3
def __init__()
in example_app/graviton2_gh_runner_flask_app/controllers/cart_controller.py
6 2 3
def create_app()
in example_app/graviton2_gh_runner_flask_app/__init__.py
39 2 1
def record()
in example_app/graviton2_gh_runner_flask_app/models/orders_model.py
8 2 1
def get()
in example_app/graviton2_gh_runner_flask_app/resources/books.py
8 2 1
def get()
in example_app/graviton2_gh_runner_flask_app/resources/books.py
8 2 2
def get()
in example_app/graviton2_gh_runner_flask_app/resources/orders.py
8 2 2
def get()
in example_app/graviton2_gh_runner_flask_app/resources/orders.py
8 2 3
def get()
in example_app/graviton2_gh_runner_flask_app/resources/cart.py
8 2 2
def get()
in example_app/graviton2_gh_runner_flask_app/resources/cart.py
8 2 2
def __init__()
in example_app/graviton2_gh_runner_flask_app/dynamodb/context_manager.py
12 2 2
def load_book_data()
in example_app/load_local_data.py
17 2 2
def __init__()
in cdk_graviton2_gh_sh_runner/vpc_stack.py
9 1 5