aws-samples / amazon-chime-live-events
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 111 units with 2,324 lines of code in units (14.4% of code).
    • 6 very long units (754 lines of code)
    • 4 long units (310 lines of code)
    • 18 medium size units (577 lines of code)
    • 26 small units (375 lines of code)
    • 57 very small units (308 lines of code)
32% | 13% | 24% | 16% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx42% | 11% | 18% | 19% | 7%
ts48% | 0% | 26% | 4% | 19%
js0% | 23% | 39% | 14% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/components70% | 19% | 8% | 2% | 0%
src/providers20% | 0% | 31% | 34% | 13%
src/backend0% | 37% | 25% | 9% | 26%
transcoding/src0% | 0% | 83% | 16% | 0%
transcoding0% | 0% | 47% | 24% | 27%
src/hooks0% | 0% | 53% | 23% | 23%
src/utils0% | 0% | 41% | 0% | 58%
src/types0% | 0% | 0% | 55% | 44%
src/context0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function reducer()
in src/providers/LiveEventMessagesProvider/state.ts
149 21 2
export default function Controls()
in src/components/Controls.tsx
144 16 1
export default function OneOnOneMeetingStatusProvider()
in src/components/Moderator/OneOnOneMeeting/MeetingStatusProvider.tsx
129 11 1
export default function DeviceSwitcher()
in src/components/DeviceSwitcher.tsx
125 24 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 MeetingStatusProvider()
in src/components/talent/MeetingStatusProvider.tsx
89 11 1
function parseArgs()
in src/backend/serverless/deploy.js
87 38 0
export default function RosterItem()
in src/components/Moderator/Roster/RosterItem/index.tsx
80 9 6
ClientRequestToken: uuid()
in src/backend/serverless/src/handlers.js
54 9 0
NotificationsConfiguration: getNotificationsConfig()
in src/backend/serverless/src/handlers.js
47 7 0
export function reducer()
in src/providers/VideoTileProvider/state.tsx
46 6 3
export default function TalentMeetingProvider()
in src/providers/TalentMeetingProvider.tsx
44 4 1
function startRecording()
in transcoding/src/index.js
42 5 5
export default function RemoteVideo()
in src/components/RemoteVideo.tsx
41 4 1
export function makeAVObserver()
in src/providers/AVObserver.ts
38 6 2
function parseArgs()
in transcoding/deploy.js
34 15 0
exports.handler = function()
in transcoding/src/index.js
32 6 3
export default function useDevices()
in src/hooks/useDevices.tsx
30 3 0
async setTalentAttendeeId()
in src/providers/TalentMeetingProvider.tsx
29 5 1