awslabs / data-transfer-hub
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 64 units with 2,120 lines of code in units (19.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (231 lines of code)
    • 5 simple units (183 lines of code)
    • 56 very simple units (1,706 lines of code)
0% | 0% | 10% | 8% | 80%
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% | 12% | 2% | 85%
tsx0% | 0% | 17% | 21% | 61%
js0% | 0% | 0% | 23% | 76%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/constructs/lib0% | 0% | 10% | 0% | 89%
source/portal/src/store0% | 0% | 86% | 0% | 13%
source/portal/src/pages0% | 0% | 19% | 14% | 65%
source/custom-resource0% | 0% | 0% | 45% | 54%
source/portal/src0% | 0% | 0% | 36% | 63%
source/portal/src/common0% | 0% | 0% | 88% | 11%
source/custom-resource/lib0% | 0% | 0% | 10% | 89%
source/portal/src/graphql0% | 0% | 0% | 0% | 100%
source/constructs/lambda/api0% | 0% | 0% | 0% | 100%
source/custom-resource/lib/usage-metrics0% | 0% | 0% | 0% | 100%
source/constructs/lambda0% | 0% | 0% | 0% | 100%
source/constructs/lambda/custom-resource0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function fetchNotes()
in source/portal/src/pages/detail/DetailS3.tsx
52 15 1
constructor()
in source/constructs/lib/constructs-stack.ts
113 13 3
export default function reducer()
in source/portal/src/store/Reducer.ts
66 11 2
async function getTaskList()
in source/portal/src/pages/list/TaskList.tsx
39 9 2
_setContentType()
in source/custom-resource/lib/s3-helper.js
19 8 1
function registerValidSW()
in source/portal/src/serviceWorker.ts
33 8 2
Launch: moment()
in source/custom-resource/index.js
69 6 0
async function getSSMParamsList()
in source/portal/src/common/comp/form/DrhCredential.tsx
23 6 0
constructor()
in source/constructs/lib/api-stack.ts
325 5 3
async validateBuckets()
in source/custom-resource/lib/s3-helper.js
20 5 1
export function register()
in source/portal/src/serviceWorker.ts
22 5 1
async function fetchNotes()
in source/portal/src/pages/detail/DetailECR.tsx
26 5 1
def lambda_handler()
in source/constructs/lambda/custom-resource/crete_service_linked_role.py
17 4 2
_downloadManifest()
in source/custom-resource/lib/s3-helper.js
28 4 2
function checkValidServiceWorker()
in source/portal/src/serviceWorker.ts
25 4 2
constructor()
in source/constructs/lib/portal-stack.ts
148 3 3
async function stopTask()
in source/constructs/lambda/api/api-task.ts
41 3 1
copyAssets()
in source/custom-resource/lib/s3-helper.js
31 3 4
_uploadFile()
in source/custom-resource/lib/s3-helper.js
37 3 4
UUID: uuidv4()
in source/custom-resource/index.js
6 3 0