aws-samples / amazon-eventbridge-resource-policy-samples
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 76 units with 491 lines of code in units (20.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (71 lines of code)
    • 3 simple units (69 lines of code)
    • 70 very simple units (351 lines of code)
0% | 0% | 14% | 14% | 71%
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% | 14% | 14% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
blog/account-c-invoice-processing/invoice_processing0% | 0% | 23% | 22% | 54%
patterns/single-bus-multi-account-pattern/purple-service-account0% | 0% | 0% | 0% | 100%
patterns/multi-bus-multi-account-pattern/purple-service-account0% | 0% | 0% | 0% | 100%
blog/account-a-web-store/order_function0% | 0% | 0% | 0% | 100%
patterns/single-bus-multi-account-pattern/orange-service-account0% | 0% | 0% | 0% | 100%
patterns/single-bus-multi-account-pattern/blue-service-account0% | 0% | 0% | 0% | 100%
patterns/multi-bus-multi-account-pattern/orange-service-account0% | 0% | 0% | 0% | 100%
patterns/multi-bus-multi-account-pattern/blue-service-account0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __unmarshall_model()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/marshaller.py
24 15 3
def marshall()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/marshaller.py
21 12 2
def unmarshall()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/marshaller.py
26 12 3
def to_dict()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/NewOrderCreated.py
23 9 1
def to_dict()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/NewOrderCreatedItem.py
23 9 1
def to_dict()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/AWSEvent.py
23 9 1
def __unmarshall_primitive()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/marshaller.py
7 3 3
def lambda_handler()
in patterns/single-bus-multi-account-pattern/orange-service-account/orange-service-app/orange_p_e3/app.py
22 2 2
def lambda_handler()
in patterns/single-bus-multi-account-pattern/purple-service-account/purple-service-app/purple_p_e2/app.py
22 2 2
def lambda_handler()
in patterns/single-bus-multi-account-pattern/blue-service-account/blue-service-app/blue_p_e1/app.py
22 2 2
def lambda_handler()
in patterns/multi-bus-multi-account-pattern/orange-service-account/orange-service-app/orange_p_e3/app.py
22 2 2
def lambda_handler()
in patterns/multi-bus-multi-account-pattern/purple-service-account/purple-service-app/purple_p_e2/app.py
22 2 2
def lambda_handler()
in patterns/multi-bus-multi-account-pattern/blue-service-account/blue-service-app/blue_p_e1/app.py
22 2 2
def lambda_handler()
in blog/account-c-invoice-processing/invoice_processing/invoice_processing_function/app.py
6 2 2
def __eq__()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/NewOrderCreated.py
4 2 2
def __eq__()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/NewOrderCreatedItem.py
4 2 2
def __eq__()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/AWSEvent.py
4 2 2
def __unmarshall_date()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/marshaller.py
6 2 2
def __unmarshall_datatime()
in blog/account-c-invoice-processing/invoice_processing/schema/com_examplecorp_webstore/newordercreated/marshaller.py
6 2 2
def lambda_handler()
in blog/account-a-web-store/order_function/app.py
28 2 2