aws-samples / aws-saas-factory-eks-reference-architecture
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 600 units with 3,447 lines of code in units (34.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (47 lines of code)
    • 6 simple units (157 lines of code)
    • 593 very simple units (3,243 lines of code)
0% | 0% | 1% | 4% | 94%
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% | 28% | 57%
java0% | 0% | 0% | 2% | 97%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source/CfnCrossRegion0% | 0% | 14% | 28% | 57%
services/shared-services/user-management-service0% | 0% | 0% | 11% | 88%
services/shared-services/tenant-registration-service0% | 0% | 0% | 0% | 100%
services/shared-services/tenant-management-service0% | 0% | 0% | 0% | 100%
services/application-services/product-service0% | 0% | 0% | 0% | 100%
services/application-services/order-service0% | 0% | 0% | 0% | 100%
clients/Application/src0% | 0% | 0% | 0% | 100%
clients/Admin/src0% | 0% | 0% | 0% | 100%
clients/Landing/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def cfn_handler()
in functions/source/CfnCrossRegion/lambda_function.py
47 15 7
def send()
in functions/source/CfnCrossRegion/lambda_function.py
35 9 7
def get_client()
in functions/source/CfnCrossRegion/lambda_function.py
24 9 3
def log_config()
in functions/source/CfnCrossRegion/lambda_function.py
19 8 3
public List getUsers()
in services/shared-services/user-management-service/src/main/java/com/amazonaws/saas/eks/UserManagementService.java
30 7 1
def poll()
in functions/source/CfnCrossRegion/lambda_function.py
16 6 2
public User createUser()
in services/shared-services/user-management-service/src/main/java/com/amazonaws/saas/eks/UserManagementService.java
33 6 2
def remove_poll()
in functions/source/CfnCrossRegion/lambda_function.py
19 5 2
public void updateUser()
in services/shared-services/user-management-service/src/main/java/com/amazonaws/saas/eks/UserManagementController.java
17 5 1
protected TenantDetails createTenant()
in services/shared-services/tenant-management-service/src/main/java/com/amazonaws/saas/eks/TenantManagementService.java
22 5 1
def create()
in functions/source/CfnCrossRegion/lambda_function.py
40 4 2
def update()
in functions/source/CfnCrossRegion/lambda_function.py
24 4 2
public Authentication authenticate()
in services/application-services/product-service/src/main/java/com/amazonaws/saas/eks/auth/TokenProcessor.java
32 4 1
public List getProducts()
in services/application-services/product-service/src/main/java/com/amazonaws/saas/eks/controller/ProductController.java
15 4 1
public Product getProductById()
in services/application-services/product-service/src/main/java/com/amazonaws/saas/eks/controller/ProductController.java
14 4 1
public Product saveProduct()
in services/application-services/product-service/src/main/java/com/amazonaws/saas/eks/controller/ProductController.java
18 4 2
public Product updateProduct()
in services/application-services/product-service/src/main/java/com/amazonaws/saas/eks/controller/ProductController.java
19 4 2
public void deleteProduct()
in services/application-services/product-service/src/main/java/com/amazonaws/saas/eks/controller/ProductController.java
14 4 2
public List unconvert()
in services/application-services/order-service/src/main/java/com/amazonaws/saas/eks/model/OrderProductConverter.java
13 4 1
public Authentication authenticate()
in services/application-services/order-service/src/main/java/com/amazonaws/saas/eks/auth/TokenProcessor.java
32 4 1