aws-samples / amazon-chime-sdk-meetings-breakout-rooms
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 21 units with 468 lines of code in units (16.8% of code).
    • 1 very long units (179 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (166 lines of code)
    • 5 small units (78 lines of code)
    • 10 very small units (45 lines of code)
38% | 0% | 35% | 16% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts49% | 0% | 27% | 17% | 5%
tsx0% | 0% | 62% | 14% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
back-end-resources86% | 0% | 13% | 0% | 0%
front-end-resources0% | 0% | 100% | 0% | 0%
front-end-resources/react-meeting/src/components0% | 0% | 100% | 0% | 0%
front-end-resources/react-meeting/src/containers0% | 0% | 86% | 0% | 13%
front-end-resources/react-meeting/src/utils0% | 0% | 22% | 67% | 9%
front-end-resources/react-meeting/src/hooks0% | 0% | 0% | 61% | 38%
front-end-resources/react-meeting/src/providers0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in back-end-resources/back-end.ts
179 1 2
constructor()
in front-end-resources/front-end.ts
50 1 2
export default function SIPMeetingForm()
in front-end-resources/react-meeting/src/components/SIPMeetingForm/index.tsx
43 1 5
export function addCorsOptions()
in back-end-resources/back-end.ts
27 1 1
async function getNearestRegion()
in front-end-resources/react-meeting/src/containers/MeetingForm/RegionSelection.tsx
25 7 0
export async function fetchMeeting()
in front-end-resources/react-meeting/src/utils/api.ts
21 3 3
export async function createMeeting()
in front-end-resources/react-meeting/src/utils/api.ts
19 2 3
export function createGetAttendeeCallback()
in front-end-resources/react-meeting/src/utils/api.ts
17 2 1
export default function useDevicePermissionStatus()
in front-end-resources/react-meeting/src/hooks/useDevicePermissionStatus.tsx
16 1 0
export async function getBreakouts()
in front-end-resources/react-meeting/src/utils/api.ts
15 2 1
export async function endMeeting()
in front-end-resources/react-meeting/src/utils/api.ts
11 2 1
export default function getFormattedOptionsForSelect()
in front-end-resources/react-meeting/src/utils/select-options-format.ts
9 1 1
export function useAppState()
in front-end-resources/react-meeting/src/providers/AppStateProvider.tsx
7 2 0
export default function useToggle()
in front-end-resources/react-meeting/src/hooks/useToggle.tsx
7 1 1
constructor()
in index.ts
5 1 3
constructor()
in index.ts
4 1 3
function formatMetric()
in front-end-resources/react-meeting/src/containers/MeetingMetrics/index.tsx
3 2 1
export function getErrorContext()
in front-end-resources/react-meeting/src/providers/ErrorProvider.tsx
3 1 0
constructor()
in front-end-resources/react-meeting/src/providers/SIPMeetingProvider/SIPMeetingManager.ts
3 1 1
function toggle()
in front-end-resources/react-meeting/src/hooks/useToggle.tsx
3 1 0