aws-samples / aws-ecs-anywhere-workshop-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 35 units with 552 lines of code in units (75.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (91 lines of code)
    • 4 simple units (136 lines of code)
    • 30 very simple units (325 lines of code)
0% | 0% | 16% | 24% | 58%
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
go0% | 0% | 16% | 24% | 58%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
s3-trigger-ecs-task/s3-file-processor/utils0% | 0% | 21% | 22% | 55%
s3-trigger-ecs-task/s3-file-processor0% | 0% | 0% | 43% | 56%
s3-trigger-ecs-task/sam-lambda-s3-dynamodb0% | 0% | 0% | 0% | 100%
ssm-secrets-manager0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func BatchWriteItem()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go
91 11 1
func DeleteItems()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go
41 9 1
func main()
in workload-management/s3-trigger-ecs-task/s3-file-processor/main.go
40 9 0
func DeleteProcessedData()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
28 6 0
func pollForTableDeletion()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go
27 6 0
func pollForTableCreation()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go
24 5 0
func initialize()
in workload-management/s3-trigger-ecs-task/s3-file-processor/main.go
22 5 0
func GetOutputFile()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
18 4 1
func RecreateTable()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go
15 4 0
func deleteTable()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go
18 4 0
func createTable()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go
30 4 0
func AppendFile()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
11 3 2
func Exists()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
8 3 1
func processRecords()
in workload-management/s3-trigger-ecs-task/s3-file-processor/main.go
10 3 2
func GetFile()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
8 2 1
func TruncateFile()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
9 2 1
func DeleteFile()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
5 2 1
func mkDirs()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
6 2 1
func DeleteOutputFolder()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
6 2 0
func DeleteInputFile()
in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/FileHelper.go
6 2 0