aws-samples / aws-serverless-saas-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 2,172 units with 21,427 lines of code in units (21.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 33 medium complex units (1,246 lines of code)
    • 30 simple units (989 lines of code)
    • 2,109 very simple units (19,192 lines of code)
0% | 0% | 5% | 4% | 89%
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% | 8% | 6% | 85%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Solution/Lab60% | 0% | 5% | 6% | 87%
Lab6/server0% | 0% | 7% | 7% | 84%
Solution/Lab50% | 0% | 5% | 5% | 88%
Lab5/server0% | 0% | 8% | 7% | 84%
Solution/Lab40% | 0% | 7% | 2% | 89%
Lab4/server0% | 0% | 11% | 3% | 85%
Solution/Lab30% | 0% | 7% | 2% | 89%
Lab3/server0% | 0% | 7% | 8% | 83%
Solution/Lab20% | 0% | 2% | 4% | 92%
Lab2/server0% | 0% | 3% | 7% | 89%
Lab5/client0% | 0% | 0% | 0% | 100%
Lab6/client0% | 0% | 0% | 0% | 100%
Lab3/client0% | 0% | 0% | 0% | 100%
Lab4/client0% | 0% | 0% | 0% | 100%
Solution/Lab10% | 0% | 0% | 0% | 100%
Lab2/client0% | 0% | 0% | 0% | 100%
Lab1/server0% | 0% | 0% | 0% | 100%
Lab1/client0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in Solution/Lab5/server/Resources/shared_service_authorizer.py
70 14 2
def lambda_handler()
in Solution/Lab4/server/Resources/shared_service_authorizer.py
64 14 2
def lambda_handler()
in Solution/Lab6/server/Resources/shared_service_authorizer.py
74 14 2
def lambda_handler()
in Lab5/server/Resources/shared_service_authorizer.py
70 14 2
def lambda_handler()
in Lab4/server/Resources/shared_service_authorizer.py
64 14 2
def lambda_handler()
in Lab6/server/Resources/shared_service_authorizer.py
74 14 2
def lambda_handler()
in Solution/Lab3/server/Resources/shared_service_authorizer.py
52 13 2
def validateJWT()
in Solution/Lab5/server/Resources/tenant_authorizer.py
27 11 3
def validateJWT()
in Solution/Lab5/server/Resources/shared_service_authorizer.py
27 11 3
def get_users()
in Solution/Lab5/server/TenantManagementService/user-management.py
37 11 2
def validateJWT()
in Solution/Lab3/server/Resources/tenant_authorizer.py
27 11 3
def validateJWT()
in Solution/Lab3/server/Resources/shared_service_authorizer.py
27 11 3
def get_users()
in Solution/Lab3/server/TenantManagementService/user-management.py
36 11 2
def validateJWT()
in Solution/Lab2/server/Resources/shared_service_authorizer.py
27 11 3
def validateJWT()
in Solution/Lab4/server/Resources/tenant_authorizer.py
27 11 3
def validateJWT()
in Solution/Lab4/server/Resources/shared_service_authorizer.py
27 11 3
def get_users()
in Solution/Lab4/server/TenantManagementService/user-management.py
36 11 2
def validateJWT()
in Solution/Lab6/server/Resources/tenant_authorizer.py
27 11 3
def validateJWT()
in Solution/Lab6/server/Resources/shared_service_authorizer.py
27 11 3
def get_users()
in Solution/Lab6/server/TenantManagementService/user-management.py
37 11 2