aws-samples / aws-dynamodb-examples
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 637 units with 4,989 lines of code in units (49.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)
    • 15 simple units (299 lines of code)
    • 622 very simple units (4,690 lines of code)
0% | 0% | 0% | 5% | 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
java0% | 0% | 0% | 11% | 88%
js0% | 0% | 0% | 5% | 94%
go0% | 0% | 0% | 0% | 100%
cs0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
DynamoDB-SDK-Examples/java0% | 0% | 0% | 11% | 88%
DynamoDB-SDK-Examples/node.js0% | 0% | 0% | 5% | 94%
DynamoDB-SDK-Examples/golang0% | 0% | 0% | 0% | 100%
DynamoDB-SDK-Examples/dotnet0% | 0% | 0% | 0% | 100%
DynamoDB-SDK-Examples/python0% | 0% | 0% | 0% | 100%
LoadS3toDynamoDB0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/PutItemConditional.java
20 7 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/DeleteItem.java
20 7 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/TransactWriteItem.java
19 7 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/TransactGetItem.java
19 7 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithQueries/QueryWithProjectionExpression.java
20 7 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithQueries/QueryWithFilterExpression.java
20 7 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/GetItem.java
18 6 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/BatchGetItem.java
18 6 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/UpdateItemConditional.java
18 6 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/BatchWriteItem.java
18 6 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/UpdateItem.java
18 6 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithItems/PutItem.java
18 6 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithQueries/QueryConsistentRead.java
18 6 1
private static void handleCommonErrors()
in DynamoDB-SDK-Examples/java/WorkingWithQueries/QueryWithSortKey.java
18 6 1
async function getItems()
in DynamoDB-SDK-Examples/node.js/WorkingWithCustomBackoffRetry/exponential_backoff_retry_get_item.js
37 6 0
def create_threads()
in DynamoDB-SDK-Examples/python/WorkingWithScans/scan_parallel.py
10 5 0
def scan_table()
in DynamoDB-SDK-Examples/python/WorkingWithScans/scan_parallel.py
18 4 2
func main()
in DynamoDB-SDK-Examples/golang/WorkingWithItems/updateItemConditional.go
35 4 0
func main()
in DynamoDB-SDK-Examples/golang/WorkingWithItems/deleteItemConditional.go
36 4 0
func main()
in DynamoDB-SDK-Examples/golang/WorkingWithItems/getItem.go
40 4 0