aws-samples / amazon-chime-sdk-js-device-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 39 units with 365 lines of code in units (20.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (128 lines of code)
    • 5 small units (73 lines of code)
    • 30 very small units (164 lines of code)
0% | 0% | 35% | 20% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 0% | 38% | 11% | 49%
js0% | 0% | 28% | 36% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/room0% | 0% | 43% | 19% | 36%
serverless0% | 0% | 36% | 35% | 28%
src0% | 0% | 41% | 0% | 58%
ROOT0% | 0% | 0% | 50% | 50%
src/controller0% | 0% | 0% | 0% | 100%
serverless/src0% | 0% | 0% | 0% | 100%
src/shim0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function reducer()
in src/room/containers/RoomProvider/reducer.tsx
40 8 2
function parseArgs()
in serverless/deploy.js
35 12 0
31 3 0
function reducer()
in src/room/containers/VideoManager.tsx
22 3 3
function ensureBucket()
in serverless/deploy.js
19 4 0
function spawnOrFail()
in serverless/deploy.js
15 3 3
async joinMeeting()
in src/room/MeetingManager.tsx
15 1 2
async initializeMeetingSession()
in src/room/MeetingManager.tsx
13 1 1
11 1 0
private setupAwsIotClient()
in src/IoTClient.tsx
10 1 0
async getAttendee()
in src/room/MeetingManager.tsx
9 1 1
function getArgOrExit()
in serverless/deploy.js
8 2 2
async setupAudioDevices()
in src/room/MeetingManager.tsx
8 3 0
function respond()
in server.js
8 2 4
function usage()
in serverless/deploy.js
7 2 0
export function init()
in src/IoTModule.tsx
7 1 1
export function useRoomProviderDispatch()
in src/room/containers/RoomProvider/index.tsx
7 2 0
export function useRoomProviderState()
in src/room/containers/RoomProvider/index.tsx
7 2 0
export function useControllerState()
in src/controller/containers/ControllerProvider/index.tsx
7 2 0
export function useControllerDispatch()
in src/controller/containers/ControllerProvider/index.tsx
7 2 0