aws-samples / aws-marketplace-metered-container-product
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 36 units with 296 lines of code in units (42.7% 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)
    • 2 simple units (40 lines of code)
    • 34 very simple units (256 lines of code)
0% | 0% | 0% | 13% | 86%
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% | 13% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
app0% | 0% | 0% | 13% | 86%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def meter_usages()
in app/marketplace.py
15 7 2
def _meter_usage()
in app/marketplace.py
25 6 3
def _init_dimensions_table()
in app/marketplace.py
17 5 2
def _json_serial()
in app/marketplace.py
19 5 1
def run()
in app/marketplace.py
12 4 1
def update_type()
in app/marketplace.py
12 4 2
def discard_dimension_errors()
in app/marketplace.py
6 4 2
def get()
in app/api.py
19 3 1
def __init__()
in app/marketplace.py
27 2 6
def _create_dimensions_table()
in app/marketplace.py
21 2 1
def get_dimensions()
in app/marketplace.py
8 2 1
def _get_dimensions_name()
in app/marketplace.py
6 2 1
def max_timestamp()
in app/marketplace.py
5 2 1
def __init__()
in app/marketplace.py
7 2 4
def __init__()
in app/marketplace.py
12 2 5
def get()
in app/api.py
5 1 1
def get()
in app/api.py
2 1 1
def get_consumption()
in app/marketplace.py
5 1 1
def get_state()
in app/marketplace.py
2 1 1
def get_status()
in app/marketplace.py
6 1 1