aws-samples / lti-ready-virtual-classroom-with-amazon-chime-sdk
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 184 units with 2,560 lines of code in units (13.4% of code).
    • 1 very long units (229 lines of code)
    • 2 long units (170 lines of code)
    • 37 medium size units (1,016 lines of code)
    • 40 small units (593 lines of code)
    • 104 very small units (552 lines of code)
8% | 6% | 39% | 23% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts48% | 0% | 29% | 10% | 12%
tsx0% | 15% | 53% | 6% | 23%
js0% | 5% | 37% | 33% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
chime-sdk-components/backend-cdk/lib100% | 0% | 0% | 0% | 0%
chime-sdk-components/react-meeting-demo/src0% | 12% | 52% | 11% | 24%
lti-components/web/src0% | 13% | 41% | 29% | 14%
chime-sdk-components/backend-cdk/src0% | 0% | 40% | 39% | 20%
lti-components/web/amplify0% | 0% | 28% | 27% | 43%
chime-sdk-components/frontend-cdk/lib0% | 0% | 100% | 0% | 0%
lti-components/web0% | 0% | 0% | 100% | 0%
chime-sdk-components/backend-cdk0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in chime-sdk-components/backend-cdk/lib/lti-construct.ts
229 1 3
export function useAttendeeStatus()
in chime-sdk-components/react-meeting-demo/src/hooks/sdk/useAttendeeStatus.tsx
95 27 1
render()
in lti-components/web/src/components/EventPanel.js
75 3 0
export function reducer()
in chime-sdk-components/react-meeting-demo/src/providers/RemoteVideoTileProvider/state.tsx
50 6 3
constructor()
in chime-sdk-components/frontend-cdk/lib/meetings-frontend-stack.ts
50 1 3
async listAndSelectDevices()
in chime-sdk-components/react-meeting-demo/src/providers/MeetingProvider/MeetingManager.ts
43 13 0
render()
in lti-components/web/src/components/UserInfo.js
42 4 0
export function useBandwidthMetrics()
in chime-sdk-components/react-meeting-demo/src/hooks/sdk/useBandwidthMetrics.tsx
40 6 0
constructor()
in lti-components/web/amplify/backend/function/chimeLtiApiAuth/src/utils/LTIMessage.js
31 12 2
async function createEvent()
in chime-sdk-components/backend-cdk/src/setup/setup.js
31 7 1
var addMethod = function()
in lti-components/web/amplify/backend/function/chimeEventApiAuthorizer/src/index.js
30 7 4
var addMethod = function()
in chime-sdk-components/backend-cdk/src/auth/auth.js
30 7 4
export function useAttendeeAudioStatus()
in chime-sdk-components/react-meeting-demo/src/hooks/sdk/useAttendeeAudioStatus.tsx
30 4 1
export function useFocusIn()
in chime-sdk-components/react-meeting-demo/src/hooks/useFocusIn/index.tsx
29 3 2
async function updateEvent()
in chime-sdk-components/backend-cdk/src/join/join.js
27 2 1
render()
in lti-components/web/src/components/ConfigEditor.js
26 2 0
audioInputsChanged: async()
in chime-sdk-components/react-meeting-demo/src/providers/DevicesProvider/AudioInputProvider.tsx
26 6 1
function analyserNodeCallback()
in chime-sdk-components/react-meeting-demo/src/hooks/sdk/useLocalAudioInputActivity.tsx
26 8 0
export function useToggleLocalMute()
in chime-sdk-components/react-meeting-demo/src/hooks/sdk/useToggleLocalMute.tsx
26 4 0
export function useSelectVideoQuality()
in chime-sdk-components/react-meeting-demo/src/hooks/sdk/useSelectVideoQuality.tsx
26 5 0