aws-samples / amazon-chime-live-events
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 111 units with 2,324 lines of code in units (14.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (87 lines of code)
    • 8 medium complex units (877 lines of code)
    • 8 simple units (345 lines of code)
    • 94 very simple units (1,015 lines of code)
0% | 3% | 37% | 14% | 43%
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% | 14% | 5% | 25% | 54%
tsx0% | 0% | 48% | 10% | 40%
ts0% | 0% | 48% | 12% | 38%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/backend0% | 23% | 0% | 26% | 50%
src/components0% | 0% | 80% | 12% | 6%
src/providers0% | 0% | 20% | 11% | 67%
transcoding0% | 0% | 26% | 15% | 58%
transcoding/src0% | 0% | 0% | 35% | 64%
src/hooks0% | 0% | 0% | 0% | 100%
src/utils0% | 0% | 0% | 0% | 100%
src/types0% | 0% | 0% | 0% | 100%
src/context0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function parseArgs()
in src/backend/serverless/deploy.js
87 38 0
export default function DeviceSwitcher()
in src/components/DeviceSwitcher.tsx
125 24 0
export function reducer()
in src/providers/LiveEventMessagesProvider/state.ts
149 21 2
export default function Controls()
in src/components/Controls.tsx
144 16 1
function parseArgs()
in transcoding/deploy.js
34 15 0
export default function LiveEventMeetingStatusProvider()
in src/components/Moderator/LiveEventView/MeetingStatusProvider.tsx
106 13 1
export default function MeetingStatusProvider()
in src/components/attendee/MeetingStatusProvider.tsx
101 11 1
export default function OneOnOneMeetingStatusProvider()
in src/components/Moderator/OneOnOneMeeting/MeetingStatusProvider.tsx
129 11 1
export default function MeetingStatusProvider()
in src/components/talent/MeetingStatusProvider.tsx
89 11 1
export default function RosterItem()
in src/components/Moderator/Roster/RosterItem/index.tsx
80 9 6
function getAspectRatio()
in src/components/VideoGrid/index.tsx
28 9 2
ClientRequestToken: uuid()
in src/backend/serverless/src/handlers.js
54 9 0
NotificationsConfiguration: getNotificationsConfig()
in src/backend/serverless/src/handlers.js
47 7 0
exports.handler = function()
in transcoding/src/index.js
32 6 3
function spawnOrFail()
in transcoding/deploy.js
20 6 3
export function makeAVObserver()
in src/providers/AVObserver.ts
38 6 2
export function reducer()
in src/providers/VideoTileProvider/state.tsx
46 6 3
function startRecording()
in transcoding/src/index.js
42 5 5
export function makeReselects()
in src/providers/AVObserver.ts
22 5 1
async setTalentAttendeeId()
in src/providers/TalentMeetingProvider.tsx
29 5 1