aws / amazon-chime-sdk-component-library-react
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 119 units with 1,534 lines of code in units (9.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (95 lines of code)
    • 1 medium complex units (69 lines of code)
    • 7 simple units (310 lines of code)
    • 110 very simple units (1,060 lines of code)
0% | 6% | 4% | 20% | 69%
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% | 11% | 0% | 26% | 62%
ts0% | 0% | 16% | 12% | 70%
js0% | 0% | 0% | 14% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/hooks0% | 20% | 0% | 28% | 50%
src/providers0% | 0% | 15% | 28% | 56%
integration/utils0% | 0% | 0% | 54% | 45%
integration/pages0% | 0% | 0% | 0% | 100%
src/components0% | 0% | 0% | 0% | 100%
src/theme0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
integration/app0% | 0% | 0% | 0% | 100%
src/utils0% | 0% | 0% | 0% | 100%
src/versioning0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function useAttendeeStatus()
in src/hooks/sdk/useAttendeeStatus.tsx
95 27 1
async listAndSelectDevices()
in src/providers/MeetingProvider/MeetingManager.ts
69 21 1
export function useMediaStreamMetrics()
in src/hooks/sdk/useMediaStreamMetrics.tsx
66 9 0
function analyserNodeCallback()
in src/hooks/sdk/useLocalAudioInputActivity.tsx
26 8 0
async initializeMeetingSession()
in src/providers/MeetingProvider/MeetingManager.ts
52 7 2
configure()
in integration/utils/DriverFactory.js
45 7 1
audioInputsChanged: async()
in src/providers/DevicesProvider/AudioInputProvider.tsx
28 6 1
export function reducer()
in src/providers/RemoteVideoTileProvider/state.tsx
50 6 3
export function useBandwidthMetrics()
in src/hooks/sdk/useBandwidthMetrics.tsx
43 6 0
constructor()
in src/providers/MeetingProvider/MeetingManager.ts
28 5 1
export function useSelectVideoQuality()
in src/hooks/sdk/useSelectVideoQuality.tsx
26 5 0
async function createVoiceFocusDeviceTransformer()
in src/providers/VoiceFocusProvider/index.tsx
27 4 3
async leave()
in src/providers/MeetingProvider/MeetingManager.ts
23 4 0
async updateDeviceLists()
in src/providers/MeetingProvider/MeetingManager.ts
8 4 0
export function isPrevNextEmpty()
in src/utils/device-utils.ts
5 4 2
async function onVFCheckboxChange()
in src/components/sdk/MeetingControls/AudioInputVFControl.tsx
19 4 0
export function useClickOutside()
in src/hooks/useClickOutside/index.tsx
22 4 2
export function useTabOutside()
in src/hooks/useTabOutside/index.tsx
23 4 2
function initializePreview()
in src/hooks/sdk/useLocalAudioInputActivity.tsx
11 4 0
export function useToggleLocalMute()
in src/hooks/sdk/useToggleLocalMute.tsx
26 4 0