aws-samples / serverless-graalvm-demo
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 35 units with 451 lines of code in units (63.2% 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)
    • 1 simple units (49 lines of code)
    • 34 very simple units (402 lines of code)
0% | 0% | 0% | 10% | 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
java0% | 0% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
software/products/src/main/java/software/amazonaws/example/product/entrypoints0% | 0% | 0% | 32% | 67%
infrastructure/src/main/java/software/amazonaws/example/infrastructure0% | 0% | 0% | 0% | 100%
software/products/src/main/java/software/amazonaws/example/product/store/dynamodb0% | 0% | 0% | 0% | 100%
software/products/src/main/java/software/amazonaws/example/product/model0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public APIGatewayV2HTTPResponse handleRequest()
in software/products/src/main/java/software/amazonaws/example/product/entrypoints/ApiGatewayPutProductRequestHandler.java
49 7 2
public APIGatewayV2HTTPResponse handleRequest()
in software/products/src/main/java/software/amazonaws/example/product/entrypoints/ApiGatewayGetProductRequestHandler.java
32 4 2
public APIGatewayV2HTTPResponse handleRequest()
in software/products/src/main/java/software/amazonaws/example/product/entrypoints/ApiGatewayGetAllProductRequestHandler.java
25 3 2
public APIGatewayV2HTTPResponse handleRequest()
in software/products/src/main/java/software/amazonaws/example/product/entrypoints/ApiGatewayDeleteProductRequestHandler.java
26 3 2
public Optional getProduct()
in software/products/src/main/java/software/amazonaws/example/product/store/dynamodb/DynamoDbProductStore.java
11 2 1
public Products getAllProduct()
in software/products/src/main/java/software/amazonaws/example/product/store/dynamodb/DynamoDbProductStore.java
12 2 0
public DashboardStack()
in infrastructure/src/main/java/software/amazonaws/example/infrastructure/DashboardStack.java
60 2 4
public static Product productFromDynamoDB()
in software/products/src/main/java/software/amazonaws/example/product/store/dynamodb/ProductMapper.java
7 1 1
public static Map productToDynamoDb()
in software/products/src/main/java/software/amazonaws/example/product/store/dynamodb/ProductMapper.java
7 1 1
public void putProduct()
in software/products/src/main/java/software/amazonaws/example/product/store/dynamodb/DynamoDbProductStore.java
6 1 1
public void deleteProduct()
in software/products/src/main/java/software/amazonaws/example/product/store/dynamodb/DynamoDbProductStore.java
6 1 1
public Products()
in software/products/src/main/java/software/amazonaws/example/product/model/Products.java
2 1 0
public Products()
in software/products/src/main/java/software/amazonaws/example/product/model/Products.java
3 1 1
public List getProducts()
in software/products/src/main/java/software/amazonaws/example/product/model/Products.java
3 1 0
public void setProducts()
in software/products/src/main/java/software/amazonaws/example/product/model/Products.java
3 1 1
public Product()
in software/products/src/main/java/software/amazonaws/example/product/model/Product.java
2 1 0
public Product()
in software/products/src/main/java/software/amazonaws/example/product/model/Product.java
5 1 3
public String getId()
in software/products/src/main/java/software/amazonaws/example/product/model/Product.java
3 1 0
public void setId()
in software/products/src/main/java/software/amazonaws/example/product/model/Product.java
3 1 1
public String getName()
in software/products/src/main/java/software/amazonaws/example/product/model/Product.java
3 1 0