aws-samples / amazon-chime-sdk-smart-video-sending-demo
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 53 units with 543 lines of code in units (11.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (221 lines of code)
    • 7 small units (122 lines of code)
    • 39 very small units (200 lines of code)
0% | 0% | 40% | 22% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 45% | 24% | 30%
tsx0% | 0% | 40% | 13% | 45%
js0% | 0% | 29% | 29% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/providers0% | 0% | 43% | 17% | 39%
src/hooks0% | 0% | 100% | 0% | 0%
src/utils0% | 0% | 30% | 25% | 43%
serverless0% | 0% | 36% | 35% | 28%
src/components0% | 0% | 0% | 83% | 16%
src/containers0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
serverless/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async open()
in src/utils/ReconnectingPromisedWebSocket.ts
39 4 1
export default function useAttendeeRealtimeAudio()
in src/hooks/useAttendeeRealtimeAudio.tsx
39 5 1
async listAndSelectDevices()
in src/providers/MeetingProvider/MeetingManager.ts
36 10 0
function parseArgs()
in serverless/deploy.js
35 12 0
async initializeMeetingSession()
in src/providers/MeetingProvider/MeetingManager.ts
28 4 1
async getAttendeeInfo()
in src/providers/MeetingProvider/MeetingManager.ts
22 4 1
export default function useActiveSpeakers()
in src/hooks/useActiveSpeakers.tsx
22 2 0
export function useClickOutside()
in src/components/hooks/useClickOutside.tsx
20 3 2
function ensureBucket()
in serverless/deploy.js
19 4 0
async joinMeeting()
in src/providers/MeetingProvider/MeetingManager.ts
19 2 3
async open()
in src/utils/DefaultPromisedWebSocket.ts
19 1 1
async authenticate()
in src/providers/MeetingProvider/MeetingManager.ts
16 1 3
function spawnOrFail()
in serverless/deploy.js
15 3 3
async close()
in src/utils/DefaultPromisedWebSocket.ts
14 1 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
function useVideoSendingService()
in src/providers/VideoSendingProvider.tsx
9 2 0
async leaveMeeting()
in src/providers/MeetingProvider/MeetingManager.ts
9 1 0
async close()
in src/utils/ReconnectingPromisedWebSocket.ts
9 2 3