aws-samples / asynchronous-messaging-workshop
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 29 units with 276 lines of code in units (4.6% 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)
    • 29 very simple units (276 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
code/lab-4/payment_charge0% | 0% | 0% | 0% | 100%
code/lab-1/unicorn-management-service0% | 0% | 0% | 0% | 100%
code/lab-2/unicorn-management-service0% | 0% | 0% | 0% | 100%
code/lab-3/request-for-quotes-service0% | 0% | 0% | 0% | 100%
code/lab-3/query-for-quotes-service0% | 0% | 0% | 0% | 100%
code/lab-4/payment_refund0% | 0% | 0% | 0% | 100%
code/lab-3/generic-unicorn-management-service0% | 0% | 0% | 0% | 100%
code/lab-2/generic-backend-microservice0% | 0% | 0% | 0% | 100%
code/lab-1/customer_notification_service0% | 0% | 0% | 0% | 100%
code/lab-1/extraordinary_rides_service0% | 0% | 0% | 0% | 100%
code/lab-1/customer_accounting_service0% | 0% | 0% | 0% | 100%
code/lab-4/account_credit0% | 0% | 0% | 0% | 100%
code/lab-3/quotes-response-service0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in code/lab-3/generic-unicorn-management-service/app.py
17 5 2
def lambda_handler()
in code/lab-4/payment_charge/charge.py
17 4 2
def lambda_handler()
in code/lab-1/customer_notification_service/app.py
13 3 2
def lambda_handler()
in code/lab-1/extraordinary_rides_service/app.py
13 3 2
def lambda_handler()
in code/lab-1/customer_accounting_service/app.py
13 3 2
def __init__()
in code/lab-4/account_credit/credit.py
4 3 3
def lambda_handler()
in code/lab-4/account_credit/credit.py
6 3 2
def __init__()
in code/lab-4/payment_charge/charge.py
4 3 3
def __init__()
in code/lab-4/payment_charge/charge.py
4 3 3
def __init__()
in code/lab-4/payment_refund/refund.py
4 3 3
def lambda_handler()
in code/lab-4/payment_refund/refund.py
12 3 2
def assemble()
in code/lab-3/query-for-quotes-service/app.py
16 3 1
def lambda_handler()
in code/lab-1/unicorn-management-service/app.py
30 2 2
def lambda_handler()
in code/lab-2/unicorn-management-service/app.py
30 2 2
def process()
in code/lab-2/generic-backend-microservice/app.py
11 2 1
def is_credit_request_valid()
in code/lab-4/account_credit/credit.py
2 2 1
def is_charge_request_valid()
in code/lab-4/payment_charge/charge.py
2 2 1
def is_refund_request_valid()
in code/lab-4/payment_refund/refund.py
2 2 1
def lambda_handler()
in code/lab-3/quotes-response-service/app.py
12 2 2
def lambda_handler()
in code/lab-3/request-for-quotes-service/app.py
30 2 2