aws-samples / amazon-chime-sdk-classroom-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 46 units with 1,302 lines of code in units (21.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (340 lines of code)
    • 4 simple units (169 lines of code)
    • 38 very simple units (793 lines of code)
0% | 0% | 26% | 12% | 60%
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% | 44% | 18% | 37%
js0% | 0% | 12% | 13% | 74%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
app/components0% | 0% | 59% | 19% | 21%
script0% | 0% | 13% | 14% | 72%
app/hooks0% | 0% | 0% | 24% | 75%
app0% | 0% | 0% | 0% | 100%
app/providers0% | 0% | 0% | 0% | 100%
internals/scripts0% | 0% | 0% | 0% | 100%
app/context0% | 0% | 0% | 0% | 100%
serverless/src0% | 0% | 0% | 0% | 100%
app/chime0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export default function RemoteVideoGroup()
in app/components/RemoteVideoGroup.tsx
125 19 1
function parseArgs()
in script/deploy.js
39 16 0
export default function DeviceSwitcher()
in app/components/DeviceSwitcher.tsx
78 13 0
export default function Roster()
in app/components/Roster.tsx
98 13 0
export default function ContentVideo()
in app/components/ContentVideo.tsx
53 8 1
function ensureBucket()
in script/deploy.js
41 7 2
export default function CPUUsage()
in app/components/CPUUsage.tsx
46 7 0
export default function useAttendee()
in app/hooks/useAttendee.tsx
29 7 1
export default function LocalVideo()
in app/components/LocalVideo.tsx
33 5 0
function main()
in script/deploy.js
151 4 0
export default function MeetingStatusProvider()
in app/providers/MeetingStatusProvider.tsx
57 4 1
buildMenu()
in app/menu.ts
15 4 0
export default function useRaisedHandAttendees()
in app/hooks/useRaisedHandAttendees.tsx
27 4 0
function spawnOrFail()
in script/deploy.js
22 3 3
export default function Chat()
in app/components/Chat.tsx
66 3 0
buildDarwinTemplate()
in app/menu.ts
145 3 0
80 3 0
export default function useFocusMode()
in app/hooks/useFocusMode.tsx
24 3 0
export default function CheckNodeEnv()
in internals/scripts/CheckNodeEnv.js
13 3 1
function uuid()
in serverless/src/handlers.js
6 2 0