aws-solutions / multi-region-infrastructure-deployment
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 18 units with 367 lines of code in units (18.1% 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)
    • 3 simple units (125 lines of code)
    • 15 very simple units (242 lines of code)
0% | 0% | 0% | 34% | 65%
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
ts0% | 0% | 0% | 41% | 58%
js0% | 0% | 0% | 20% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/secondary-bucket-creator/source0% | 0% | 0% | 62% | 37%
source/drift-detection0% | 0% | 0% | 89% | 10%
source/uuid-generator/source0% | 0% | 0% | 0% | 100%
source/custom-resource0% | 0% | 0% | 0% | 100%
source/changeset-validator0% | 0% | 0% | 0% | 100%
source/stage-artifact-creator0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 18 most complex units
Unit# linesMcCabe index# params
async function isDrifted()
in source/drift-detection/index.js
26 6 2
async function createBucketInSecondaryRegion()
in source/secondary-bucket-creator/source/index.ts
76 6 4
async function processEvent()
in source/secondary-bucket-creator/source/index.ts
23 6 1
async function processEvent()
in source/uuid-generator/source/index.ts
22 5 1
export async function handleCreate()
in source/secondary-bucket-creator/source/index.ts
25 5 1
async function sendAnonymousUsage()
in source/custom-resource/index.js
30 3 1
async function sendResult()
in source/changeset-validator/index.js
25 2 1
async function handleCreate()
in source/uuid-generator/source/index.ts
13 2 1
async function sendResult()
in source/stage-artifact-creator/index.js
19 2 1
async function sleep()
in source/drift-detection/index.js
3 1 1
TimeStamp: moment()
in source/changeset-validator/metrics.js
4 1 0
async function handleUpdate()
in source/uuid-generator/source/index.ts
6 1 0
async function handleDelete()
in source/uuid-generator/source/index.ts
6 1 0
function withTimeout()
in source/uuid-generator/source/index.ts
15 1 2
function sendResponse()
in source/uuid-generator/source/index.ts
20 1 3
function withTimeout()
in source/secondary-bucket-creator/source/index.ts
15 1 2
function sendResponse()
in source/secondary-bucket-creator/source/index.ts
20 1 3
async function sendResponse()
in source/custom-resource/index.js
19 1 3