aws-samples / aws-dynamodb-enterprise-application
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 51 units with 625 lines of code in units (65.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (158 lines of code)
    • 0 simple units (0 lines of code)
    • 48 very simple units (467 lines of code)
0% | 0% | 25% | 0% | 74%
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% | 31% | 0% | 68%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda/src/cloudrack-lambda-core/db0% | 0% | 39% | 0% | 60%
lambda/src/main0% | 0% | 91% | 0% | 8%
cloud-infra-demo/lib0% | 0% | 0% | 0% | 100%
lambda/src/cloudrack-lambda-fn/usecase0% | 0% | 0% | 0% | 100%
lambda/src/cloudrack-lambda-core/config/dbadapter0% | 0% | 0% | 0% | 100%
lambda/src/cloudrack-lambda-core/core0% | 0% | 0% | 0% | 100%
lambda/src/cloudrack-lambda-core/config/model0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func HandleRequest()
in lambda/src/main/main.go
64 19 2
func()
in lambda/src/cloudrack-lambda-core/db/db.go
47 11 1
func()
in lambda/src/cloudrack-lambda-core/db/db.go
47 11 1
func DynamoListToBom()
in lambda/src/cloudrack-lambda-core/config/dbadapter/dbadapter.go
15 5 1
func()
in lambda/src/cloudrack-lambda-core/db/db.go
26 4 1
func SaveHotel()
in lambda/src/cloudrack-lambda-fn/usecase/usercase.go
17 3 2
func()
in lambda/src/cloudrack-lambda-core/db/db.go
17 3 1
func()
in lambda/src/cloudrack-lambda-core/db/db.go
17 3 1
func InterfaceSlice()
in lambda/src/cloudrack-lambda-core/db/db.go
11 3 1
func()
in lambda/src/cloudrack-lambda-core/db/db.go
34 3 1
func()
in lambda/src/cloudrack-lambda-core/db/db.go
27 3 1
func Chunk()
in lambda/src/cloudrack-lambda-core/core/utils.go
11 3 2
constructor()
in cloud-infra-demo/lib/cloud-infra-demo-stack.ts
50 2 3
function buildConfigLambdaIntegration()
in cloud-infra-demo/lib/cloud-infra-demo-stack.ts
11 2 2
func GetHotel()
in lambda/src/cloudrack-lambda-fn/usecase/usercase.go
9 2 2
function methodOptions()
in cloud-infra-demo/lib/cloud-infra-demo-stack.ts
7 1 0
function buildDefaultTpl()
in cloud-infra-demo/lib/cloud-infra-demo-stack.ts
8 1 1
function buildUserInfoTpl()
in cloud-infra-demo/lib/cloud-infra-demo-stack.ts
7 1 0
function buildDeleteRoomTypeTpl()
in cloud-infra-demo/lib/cloud-infra-demo-stack.ts
14 1 1
function addCorsOptions()
in cloud-infra-demo/lib/cloud-infra-demo-stack.ts
27 1 1