aws / amazon-chime-sdk-js
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 1,397 units with 14,450 lines of code in units (41.1% of code).
    • 4 very long units (592 lines of code)
    • 27 long units (1,980 lines of code)
    • 129 medium size units (4,023 lines of code)
    • 215 small units (3,212 lines of code)
    • 1,022 very small units (4,643 lines of code)
4% | 13% | 27% | 22% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts5% | 18% | 35% | 21% | 19%
js2% | 6% | 16% | 23% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/audiovideocontroller22% | 25% | 36% | 10% | 6%
src/devicecontroller11% | 16% | 36% | 16% | 19%
integration/js2% | 5% | 15% | 22% | 53%
src/videodownlinkbandwidthpolicy15% | 31% | 29% | 17% | 5%
src/task0% | 34% | 46% | 9% | 8%
src/videouplinkbandwidthpolicy0% | 44% | 9% | 18% | 27%
src/transcript0% | 96% | 0% | 0% | 3%
src/eventbuffer0% | 34% | 19% | 22% | 23%
src/backgroundfilter0% | 23% | 19% | 35% | 21%
libs/voicefocus0% | 10% | 34% | 37% | 17%
src/transceivercontroller0% | 31% | 17% | 33% | 18%
src/audiomixcontroller0% | 52% | 0% | 13% | 34%
src/meetingreadinesschecker0% | 0% | 70% | 25% | 3%
src/meetingsession0% | 0% | 52% | 20% | 26%
src/statscollector0% | 0% | 47% | 32% | 20%
src/signalingclient0% | 0% | 50% | 19% | 30%
src/voicefocus0% | 0% | 25% | 30% | 43%
src/videotile0% | 0% | 59% | 22% | 18%
src/contentsharecontroller0% | 0% | 42% | 41% | 15%
src/videostreamindex0% | 0% | 50% | 9% | 40%
src/sdp0% | 0% | 38% | 30% | 31%
src/videoframeprocessor0% | 0% | 38% | 9% | 51%
src/messagingsession0% | 0% | 39% | 40% | 20%
src/realtimecontroller0% | 0% | 33% | 51% | 15%
src/activespeakerdetector0% | 0% | 45% | 37% | 17%
src/volumeindicatoradapter0% | 0% | 49% | 24% | 26%
src/backgroundblurprocessor0% | 0% | 27% | 12% | 59%
src/backgroundreplacementprocessor0% | 0% | 18% | 50% | 31%
src/eventcontroller0% | 0% | 32% | 52% | 15%
src/logger0% | 0% | 36% | 0% | 63%
src/sessionstatecontroller0% | 0% | 0% | 72% | 27%
script0% | 0% | 0% | 100% | 0%
src/devicepixelratiomonitor0% | 0% | 0% | 100% | 0%
src/mediadevicefactory0% | 0% | 0% | 89% | 10%
src/sigv40% | 0% | 0% | 71% | 28%
src/pingpong0% | 0% | 0% | 52% | 47%
src/browserbehavior0% | 0% | 0% | 31% | 68%
src/eventreporter0% | 0% | 0% | 60% | 40%
src/useragentparser0% | 0% | 0% | 100% | 0%
src/applicationmetadata0% | 0% | 0% | 94% | 5%
src/videotilecontroller0% | 0% | 0% | 48% | 51%
src/utils0% | 0% | 0% | 38% | 61%
src/audiovideofacade0% | 0% | 0% | 40% | 60%
src/cspmonitor0% | 0% | 0% | 33% | 66%
src/signalingprotocol0% | 0% | 0% | 0% | 100%
src/versioning0% | 0% | 0% | 0% | 100%
src/connectionhealthpolicy0% | 0% | 0% | 0% | 100%
src/reconnectcontroller0% | 0% | 0% | 0% | 100%
src/audioprofile0% | 0% | 0% | 0% | 100%
src/scheduler0% | 0% | 0% | 0% | 100%
src/videostreamidset0% | 0% | 0% | 0% | 100%
src/destroyable0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private async actionConnect()
in src/audiovideocontroller/DefaultAudioVideoController.ts
185 24 1
private async chooseInputIntrinsicDevice()
in src/devicecontroller/DefaultDeviceController.ts
167 42 4
async audioCheck()
in integration/js/pages/AppPage.js
132 29 3
protected calculateOptimalReceiveStreams()
in src/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.ts
108 28 0
private calculateEncodingParameters()
in src/videouplinkbandwidthpolicy/DefaultSimulcastUplinkPolicy.ts
99 23 1
async chooseAudioInputDevice()
in src/devicecontroller/DefaultDeviceController.ts
98 26 1
static from()
in src/transcript/TranscriptEvent.ts
96 18 1
private priorityPolicy()
in src/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.ts
92 23 3
async run()
in src/task/FinishGatheringICECandidatesTask.ts
90 20 0
private addRemoteVideoTrack()
in src/task/CreatePeerConnectionTask.ts
86 17 2
async audioFrequencyCheck()
in integration/js/pages/MeetingReadinessCheckerPage.js
85 13 0
private async sendEventImmediately()
in src/eventbuffer/InMemoryJSONEventBuffer.ts
84 10 1
private updateRemoteVideosFromLastVideosToReceive()
in src/audiovideocontroller/DefaultAudioVideoController.ts
84 23 0
constructor()
in integration/js/utils/SdkBaseTest.js
84 11 3
async run()
in src/task/JoinAndReceiveIndexTask.ts
75 14 0
private calculateMediaStreamConstraints()
in src/devicecontroller/DefaultDeviceController.ts
75 23 2
async run()
in src/task/AttachMediaInputTask.ts
74 15 0
private async actionReconnect()
in src/audiovideocontroller/DefaultAudioVideoController.ts
74 5 1
async run()
in src/task/ReceiveTURNCredentialsTask.ts
70 8 0
async run()
in src/task/ReceiveVideoInputTask.ts
69 15 0