aws-solutions / amazon-virtual-andon
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 432 units with 9,580 lines of code in units (63.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 16 medium complex units (947 lines of code)
    • 52 simple units (2,192 lines of code)
    • 364 very simple units (6,441 lines of code)
0% | 0% | 9% | 22% | 67%
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
tsx0% | 0% | 10% | 31% | 58%
ts0% | 0% | 10% | 7% | 81%
py0% | 0% | 17% | 0% | 82%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
console/src0% | 0% | 9% | 29% | 60%
solution-helper0% | 0% | 41% | 24% | 33%
appsync-lambda-resolver0% | 0% | 41% | 31% | 27%
external-integrations-handler0% | 0% | 14% | 18% | 66%
glue-job-scripts0% | 0% | 17% | 0% | 82%
solution-utils0% | 0% | 12% | 0% | 87%
cdk-infrastructure/lib0% | 0% | 0% | 0% | 100%
ava-issue-handler0% | 0% | 0% | 0% | 100%
cdk-infrastructure/utils0% | 0% | 0% | 0% | 100%
cognito-trigger0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export async function handler()
in source/solution-helper/index.ts
127 24 2
async configureSubscription()
in source/console/src/views/Client.tsx
104 24 2
export function validateGeneralInput()
in source/console/src/util/CustomUtil.tsx
26 18 4
async function processS3ObjectData()
in source/external-integrations-handler/index.ts
46 15 2
async configureSubscription()
in source/console/src/views/Observer.tsx
42 14 2
export async function handler()
in source/appsync-lambda-resolver/index.ts
66 14 1
toggleUserPermission()
in source/console/src/views/PermissionSetting.tsx
114 13 4
async getDevices()
in source/console/src/views/Client.tsx
37 13 1
async function cleanupPreviousSubscriptions()
in source/appsync-lambda-resolver/index.ts
37 13 4
handleFormInputChange()
in source/console/src/views/AddEditEvent.tsx
50 12 1
export function sortByName()
in source/console/src/util/CustomUtil.tsx
15 12 4
export function validatePayload()
in source/solution-utils/metrics.ts
9 12 1
def main()
in source/glue-job-scripts/etl-cleanup.py
33 11 0
async onPickImageToUpload()
in source/console/src/views/AddEditEvent.tsx
46 11 1
async getProcessesStations()
in source/console/src/views/Client.tsx
47 11 1
render()
in source/console/src/views/Client.tsx
148 11 0
async getFileType()
in source/console/src/views/AddEditEvent.tsx
35 10 1
async getSites()
in source/console/src/views/Client.tsx
29 10 0
async getAreas()
in source/console/src/views/Client.tsx
30 10 1
export async function handleSubscriptionError()
in source/console/src/util/CustomUtil.tsx
13 10 4