aws-samples / cdk-microservices-labs
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 69 units with 1,865 lines of code in units (7.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (207 lines of code)
    • 0 simple units (0 lines of code)
    • 66 very simple units (1,658 lines of code)
0% | 0% | 11% | 0% | 88%
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% | 12% | 0% | 87%
js0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
5-serverless-xray-stack/custom-resource-code0% | 0% | 77% | 0% | 22%
3-serverless-microservice-stack/custom-resource-code0% | 0% | 77% | 0% | 22%
6-serverless-graphql-stack/backend0% | 0% | 18% | 0% | 81%
4-serverless-cicd-stack/customer-service-cicd0% | 0% | 0% | 0% | 100%
4-serverless-cicd-stack/vet-service-cicd0% | 0% | 0% | 0% | 100%
4-serverless-cicd-stack/visit-service-cicd0% | 0% | 0% | 0% | 100%
4-serverless-cicd-stack/static-service-cicd0% | 0% | 0% | 0% | 100%
5-serverless-xray-stack/fagate_serverless0% | 0% | 0% | 0% | 100%
3-serverless-microservice-stack/serverless0% | 0% | 0% | 0% | 100%
2-ecs-microservice-stack/ecs_microservice0% | 0% | 0% | 0% | 100%
5-serverless-xray-stack/spring-petclinic-static0% | 0% | 0% | 0% | 100%
3-serverless-microservice-stack/spring-petclinic-static0% | 0% | 0% | 0% | 100%
1-ecs-monolith-stack/ecs_monolith0% | 0% | 0% | 0% | 100%
2-ecs-microservice-stack/work0% | 0% | 0% | 0% | 100%
6-serverless-graphql-stack0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create()
in 5-serverless-xray-stack/custom-resource-code/init.py
71 16 2
def create()
in 3-serverless-microservice-stack/custom-resource-code/init.py
71 16 2
def create()
in 6-serverless-graphql-stack/backend/custom-resource-code/index.py
65 11 2
def __init__()
in 2-ecs-microservice-stack/ecs_microservice/ecs_microservice_stack.py
82 4 4
def send()
in 6-serverless-graphql-stack/backend/custom-resource-code/cfnresponse.py
25 3 6
def send()
in 4-serverless-cicd-stack/customer-service-cicd/custom-resource-code/cfnresponse.py
25 3 6
def send()
in 4-serverless-cicd-stack/vet-service-cicd/custom-resource-code/cfnresponse.py
25 3 6
def send()
in 4-serverless-cicd-stack/visit-service-cicd/custom-resource-code/cfnresponse.py
25 3 6
self.submit = function()
in 4-serverless-cicd-stack/static-service-cicd/static-resource/scripts/pet-form/pet-form.controller.js
19 3 0
def __init__()
in 5-serverless-xray-stack/fagate_serverless/fagate_serverless_stack.py
129 3 4
self.submit = function()
in 5-serverless-xray-stack/spring-petclinic-static/scripts/pet-form/pet-form.controller.js
19 3 0
def __init__()
in 3-serverless-microservice-stack/serverless/serverless_stack.py
79 3 4
self.submit = function()
in 3-serverless-microservice-stack/spring-petclinic-static/scripts/pet-form/pet-form.controller.js
19 3 0
applyMiddleware()
in 6-serverless-graphql-stack/createGraphQLClient.tsx
7 2 2
def handler()
in 6-serverless-graphql-stack/backend/custom-resource-code/index.py
17 2 2
def handler()
in 4-serverless-cicd-stack/customer-service-cicd/custom-resource-code/index.py
17 2 2
def handler()
in 4-serverless-cicd-stack/vet-service-cicd/custom-resource-code/index.py
17 2 2
def handler()
in 4-serverless-cicd-stack/visit-service-cicd/custom-resource-code/index.py
17 2 2
self.submitOwnerForm = function()
in 4-serverless-cicd-stack/static-service-cicd/static-resource/scripts/owner-form/owner-form.controller.js
14 2 0
def handler()
in 5-serverless-xray-stack/custom-resource-code/init.py
17 2 2