aws-samples / amazon-chime-sdk-smart-video-sending-demo
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 53 units with 543 lines of code in units (11.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (35 lines of code)
    • 1 simple units (36 lines of code)
    • 51 very simple units (472 lines of code)
0% | 0% | 6% | 6% | 86%
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% | 29% | 0% | 70%
ts0% | 0% | 0% | 12% | 87%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
serverless0% | 0% | 36% | 0% | 63%
src/providers0% | 0% | 0% | 18% | 81%
src/utils0% | 0% | 0% | 0% | 100%
src/hooks0% | 0% | 0% | 0% | 100%
src/components0% | 0% | 0% | 0% | 100%
src/containers0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
serverless/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function parseArgs()
in serverless/deploy.js
35 12 0
async listAndSelectDevices()
in src/providers/MeetingProvider/MeetingManager.ts
36 10 0
export default function useAttendeeRealtimeAudio()
in src/hooks/useAttendeeRealtimeAudio.tsx
39 5 1
function ensureBucket()
in serverless/deploy.js
19 4 0
async initializeMeetingSession()
in src/providers/MeetingProvider/MeetingManager.ts
28 4 1
async updateDeviceLists()
in src/providers/MeetingProvider/MeetingManager.ts
8 4 0
async getAttendeeInfo()
in src/providers/MeetingProvider/MeetingManager.ts
22 4 1
async open()
in src/utils/ReconnectingPromisedWebSocket.ts
39 4 1
function spawnOrFail()
in serverless/deploy.js
15 3 3
async function initAudioInput()
in src/providers/DevicesProvider/AudioInputProvider.tsx
10 3 0
async function initAudioOutput()
in src/providers/DevicesProvider/AudioOutputProvider.tsx
10 3 0
async function initVideoInput()
in src/providers/DevicesProvider/VideoInputProvider.tsx
10 3 0
export function useClickOutside()
in src/components/hooks/useClickOutside.tsx
20 3 2
function uuid()
in serverless/src/handlers.js
6 2 0
function usage()
in serverless/deploy.js
7 2 0
function getArgOrExit()
in serverless/deploy.js
8 2 2
function useVideoSendingService()
in src/providers/VideoSendingProvider.tsx
9 2 0
async joinMeeting()
in src/providers/MeetingProvider/MeetingManager.ts
19 2 3
async endMeeting()
in src/providers/MeetingProvider/MeetingManager.ts
5 2 0
async close()
in src/utils/ReconnectingPromisedWebSocket.ts
9 2 3