aws / amazon-chime-sdk-js
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 1,397 units with 14,450 lines of code in units (41.1% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (569 lines of code)
    • 31 medium complex units (2,025 lines of code)
    • 82 simple units (2,434 lines of code)
    • 1,279 very simple units (9,422 lines of code)
0% | 3% | 14% | 16% | 65%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 4% | 19% | 23% | 53%
js0% | 3% | 5% | 6% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/devicecontroller0% | 18% | 17% | 19% | 44%
integration/js0% | 2% | 4% | 5% | 87%
src/videodownlinkbandwidthpolicy0% | 15% | 31% | 25% | 26%
libs/voicefocus0% | 10% | 17% | 21% | 50%
src/task0% | 0% | 33% | 27% | 39%
src/audiovideocontroller0% | 0% | 32% | 16% | 51%
src/transceivercontroller0% | 0% | 48% | 3% | 47%
src/videouplinkbandwidthpolicy0% | 0% | 44% | 0% | 55%
src/transcript0% | 0% | 96% | 0% | 3%
src/backgroundfilter0% | 0% | 23% | 10% | 65%
src/audiomixcontroller0% | 0% | 52% | 0% | 47%
src/videotile0% | 0% | 29% | 30% | 40%
src/meetingsession0% | 0% | 12% | 37% | 50%
src/meetingreadinesschecker0% | 0% | 0% | 65% | 34%
src/eventbuffer0% | 0% | 0% | 66% | 33%
src/contentsharecontroller0% | 0% | 0% | 50% | 49%
src/videostreamindex0% | 0% | 0% | 50% | 49%
src/sdp0% | 0% | 0% | 38% | 61%
src/voicefocus0% | 0% | 0% | 18% | 81%
src/messagingsession0% | 0% | 0% | 46% | 53%
src/realtimecontroller0% | 0% | 0% | 33% | 66%
src/activespeakerdetector0% | 0% | 0% | 45% | 54%
src/signalingclient0% | 0% | 0% | 12% | 87%
src/logger0% | 0% | 0% | 36% | 63%
src/useragentparser0% | 0% | 0% | 100% | 0%
src/applicationmetadata0% | 0% | 0% | 94% | 5%
src/signalingprotocol0% | 0% | 0% | 0% | 100%
src/statscollector0% | 0% | 0% | 0% | 100%
src/backgroundreplacementprocessor0% | 0% | 0% | 0% | 100%
src/videoframeprocessor0% | 0% | 0% | 0% | 100%
src/backgroundblurprocessor0% | 0% | 0% | 0% | 100%
src/eventcontroller0% | 0% | 0% | 0% | 100%
src/sessionstatecontroller0% | 0% | 0% | 0% | 100%
src/browserbehavior0% | 0% | 0% | 0% | 100%
src/volumeindicatoradapter0% | 0% | 0% | 0% | 100%
script0% | 0% | 0% | 0% | 100%
src/utils0% | 0% | 0% | 0% | 100%
src/pingpong0% | 0% | 0% | 0% | 100%
src/sigv40% | 0% | 0% | 0% | 100%
src/cspmonitor0% | 0% | 0% | 0% | 100%
src/videotilecontroller0% | 0% | 0% | 0% | 100%
src/versioning0% | 0% | 0% | 0% | 100%
src/audiovideofacade0% | 0% | 0% | 0% | 100%
src/eventreporter0% | 0% | 0% | 0% | 100%
src/mediadevicefactory0% | 0% | 0% | 0% | 100%
src/devicepixelratiomonitor0% | 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%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
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
static configure()
in libs/voicefocus/voicefocus.js
64 27 2
async chooseAudioInputDevice()
in src/devicecontroller/DefaultDeviceController.ts
98 26 1
private async actionConnect()
in src/audiovideocontroller/DefaultAudioVideoController.ts
185 24 1
private priorityPolicy()
in src/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.ts
92 23 3
private calculateEncodingParameters()
in src/videouplinkbandwidthpolicy/DefaultSimulcastUplinkPolicy.ts
99 23 1
private calculateMediaStreamConstraints()
in src/devicecontroller/DefaultDeviceController.ts
75 23 2
private updateRemoteVideosFromLastVideosToReceive()
in src/audiovideocontroller/DefaultAudioVideoController.ts
84 23 0
async testScript()
in integration/js/utils/SdkBaseTest.js
56 21 0
async run()
in src/task/FinishGatheringICECandidatesTask.ts
90 20 0
private processBwPausedStreams()
in src/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.ts
68 18 2
static from()
in src/transcript/TranscriptEvent.ts
96 18 1
private addRemoteVideoTrack()
in src/task/CreatePeerConnectionTask.ts
86 17 2
private updateTransceivers()
in src/transceivercontroller/DefaultTransceiverController.ts
63 17 3
static isSupported()
in libs/voicefocus/voicefocus.js
24 16 2
private determineTargetRate()
in src/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.ts
56 16 0
async setEncodingParameters()
in src/transceivercontroller/DefaultTransceiverController.ts
36 16 1
static init()
in libs/voicefocus/voicefocus.js
48 15 5