aws-samples / aws-lambda-deploy
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 27 units with 258 lines of code in units (59.3% 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)
    • 0 simple units (0 lines of code)
    • 27 very simple units (258 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/simple0% | 0% | 0% | 0% | 100%
functions/health_check0% | 0% | 0% | 0% | 100%
functions/update_weight0% | 0% | 0% | 0% | 100%
functions/calculate_weights0% | 0% | 0% | 0% | 100%
functions/finalize0% | 0% | 0% | 0% | 100%
functions/rollback0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def health_check_metrics_errors()
in functions/health_check/health_check.py
33 3 3
def generate_weights()
in functions/calculate_weights/calculate_weights.py
6 2 2
def linear()
in functions/calculate_weights/calculate_weights.py
9 2 1
def handler()
in functions/finalize/finalize.py
7 2 2
def health_check()
in functions/health_check/health_check.py
3 2 3
def main()
in functions/simple/simple.py
11 2 0
def handler()
in functions/update_weight/update_weight.py
13 2 2
def handler()
in functions/calculate_weights/calculate_weights.py
4 1 2
def update_weight()
in functions/finalize/finalize.py
9 1 3
def handler()
in functions/health_check/health_check.py
6 1 2
def handler()
in functions/simple/simple.py
26 1 2
def update_weight()
in functions/simple/simple.py
11 1 4
def sleep()
in functions/simple/simple.py
2 1 1
def validate_input()
in functions/simple/simple.py
11 1 1
def do_health_check()
in functions/simple/simple.py
2 1 3
def check_errors_in_cloudwatch()
in functions/simple/simple.py
33 1 3
def rollback()
in functions/simple/simple.py
9 1 2
def finalize()
in functions/simple/simple.py
7 1 3
def generate_weights()
in functions/simple/simple.py
6 1 2
def get_num_points()
in functions/simple/simple.py
2 1 2