aws / amazon-chime-sdk-component-library-react
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 119 units with 1,534 lines of code in units (9.0% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (372 lines of code)
    • 19 medium size units (543 lines of code)
    • 13 small units (180 lines of code)
    • 82 very small units (439 lines of code)
0% | 24% | 35% | 11% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 51% | 17% | 11% | 20%
tsx0% | 19% | 52% | 6% | 21%
js0% | 0% | 14% | 25% | 59%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/hooks0% | 34% | 53% | 5% | 7%
src/providers0% | 26% | 49% | 4% | 20%
src/theme0% | 84% | 0% | 0% | 15%
integration/utils0% | 0% | 54% | 13% | 32%
src/components0% | 0% | 17% | 24% | 57%
integration/pages0% | 0% | 0% | 22% | 77%
scripts0% | 0% | 0% | 62% | 37%
src/utils0% | 0% | 0% | 58% | 41%
integration/app0% | 0% | 0% | 26% | 73%
src/versioning0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function useAttendeeStatus()
in src/hooks/sdk/useAttendeeStatus.tsx
95 27 1
License: none()
in src/theme/StyledReset.ts
90 1 1
async listAndSelectDevices()
in src/providers/MeetingProvider/MeetingManager.ts
69 21 1
export function useMediaStreamMetrics()
in src/hooks/sdk/useMediaStreamMetrics.tsx
66 9 0
async initializeMeetingSession()
in src/providers/MeetingProvider/MeetingManager.ts
52 7 2
export function reducer()
in src/providers/RemoteVideoTileProvider/state.tsx
50 6 3
configure()
in integration/utils/DriverFactory.js
45 7 1
export function useBandwidthMetrics()
in src/hooks/sdk/useBandwidthMetrics.tsx
43 6 0
export function useAttendeeAudioStatus()
in src/hooks/sdk/useAttendeeAudioStatus.tsx
30 4 1
export function useFocusIn()
in src/hooks/useFocusIn/index.tsx
29 3 2
audioInputsChanged: async()
in src/providers/DevicesProvider/AudioInputProvider.tsx
28 6 1
constructor()
in src/providers/MeetingProvider/MeetingManager.ts
28 5 1
async function createVoiceFocusDeviceTransformer()
in src/providers/VoiceFocusProvider/index.tsx
27 4 3
function analyserNodeCallback()
in src/hooks/sdk/useLocalAudioInputActivity.tsx
26 8 0
export function useToggleLocalMute()
in src/hooks/sdk/useToggleLocalMute.tsx
26 4 0
export function useSelectVideoQuality()
in src/hooks/sdk/useSelectVideoQuality.tsx
26 5 0
async function initializeBackgroundReplacement()
in src/providers/BackgroundReplacementProvider/index.tsx
25 3 0
async function initializeBackgroundBlur()
in src/providers/BackgroundBlurProvider/index.tsx
25 3 0
export function useMouseMove()
in src/hooks/useMouseMove/index.tsx
24 3 2
async leave()
in src/providers/MeetingProvider/MeetingManager.ts
23 4 0