aws-samples / talk-dev-to-me-twitch
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 44 units with 732 lines of code in units (27.9% 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 (59 lines of code)
    • 43 very simple units (673 lines of code)
0% | 0% | 0% | 8% | 91%
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
js0% | 0% | 0% | 9% | 90%
ts0% | 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
event-driven-developers-tale/functions0% | 0% | 0% | 43% | 56%
event-driven-developers-tale/src0% | 0% | 0% | 0% | 100%
event-driven-developers-tale/infrastructure0% | 0% | 0% | 0% | 100%
lambda-powertools-feature-flags/app-config-store0% | 0% | 0% | 0% | 100%
lambda-powertools-feature-flags/app0% | 0% | 0% | 0% | 100%
hexagonal-architectures/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
updateVacationRequest: async()
in event-driven-developers-tale/functions/updateVacationRequest/app.js
59 6 1
function Vacations()
in event-driven-developers-tale/src/pages/Vacations.js
36 5 2
def add_discount()
in lambda-powertools-feature-flags/app/products/app.py
11 4 1
submitVacationRequest: async()
in event-driven-developers-tale/functions/createVacationRequest/app.js
32 3 1
async function executeMutation()
in event-driven-developers-tale/functions/vacationRequestValidation/app.js
16 3 2
constructor()
in hexagonal-architectures/src/store/dynamodb/dynamodb-store.ts
7 2 1
function onSelectAllClick()
in event-driven-developers-tale/src/components/CustomTable.js
12 2 1
function subscribeNotifications()
in event-driven-developers-tale/src/components/ProfileLink.js
25 2 0
function NavBar()
in event-driven-developers-tale/src/components/NavBar.js
39 2 1
async function checkUserRole()
in event-driven-developers-tale/src/components/NavBar.js
5 2 0
function checkIsApprover()
in event-driven-developers-tale/src/pages/Vacations.js
7 2 0
async function getVacations()
in event-driven-developers-tale/src/pages/Vacations.js
15 2 0
def get_products()
in lambda-powertools-feature-flags/app/products/app.py
7 2 1
def lambda_handler()
in lambda-powertools-feature-flags/app/products/app.py
6 2 2
subscription OnVacationRequestNotification()
in event-driven-developers-tale/src/graphql/subscriptions.js
2 1 1
onVacationRequestNotification()
in event-driven-developers-tale/src/graphql/subscriptions.js
13 1 1
mutation SubmitVacationRequest()
in event-driven-developers-tale/src/graphql/mutations.js
2 1 1
submitVacationRequest()
in event-driven-developers-tale/src/graphql/mutations.js
13 1 1
mutation UpdateVacationRequest()
in event-driven-developers-tale/src/graphql/mutations.js
2 1 1
updateVacationRequest()
in event-driven-developers-tale/src/graphql/mutations.js
13 1 1