aws-samples / amazon-chime-sdk
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 380 units with 5,109 lines of code in units (17.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (192 lines of code)
    • 3 medium complex units (249 lines of code)
    • 12 simple units (426 lines of code)
    • 364 very simple units (4,242 lines of code)
0% | 3% | 4% | 8% | 83%
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
tsx0% | 47% | 0% | 25% | 26%
js0% | 0% | 8% | 5% | 85%
swift0% | 0% | 0% | 18% | 81%
kt0% | 0% | 0% | 5% | 94%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
apps/meeting0% | 29% | 6% | 16% | 48%
apps/televisit-demo0% | 0% | 11% | 8% | 80%
apps/chat-ios0% | 0% | 0% | 20% | 79%
apps/chat-android0% | 0% | 0% | 5% | 94%
apps/chat0% | 0% | 0% | 0% | 100%
apps/moderated-chat-and-sentiment-analysis0% | 0% | 0% | 0% | 100%
apps/real-time-collaboration0% | 0% | 0% | 0% | 100%
apps/iOS-WKWebView-sample0% | 0% | 0% | 0% | 100%
apps/amplify-demo0% | 0% | 0% | 0% | 100%
apps/android-webview-sample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function reducer()
in apps/meeting/src/providers/VideoTileGridProvider/state.tsx
192 43 3
function ResultRow()
in apps/televisit-demo/frontend/src/containers/transcriptions/AnalysisPane.js
109 19 3
export default function generateSOAPSummary()
in apps/televisit-demo/frontend/src/containers/transcriptions/soapSummary.js
98 17 1
function parseArgs()
in apps/meeting/serverless/deploy.js
42 16 0
async function selectTransform()
in apps/meeting/src/components/DeviceSelection/CameraDevices/VideoTransformDropdown.tsx
26 9 1
function combineSegments()
in apps/televisit-demo/frontend/src/containers/transcriptions/TranscriptLine.js
29 7 1
export default function useComprehension()
in apps/televisit-demo/frontend/src/containers/transcriptions/useComprehension.js
58 7 1
exports.handler = function()
in apps/televisit-demo/backend/messagemoderator/index.js
71 7 2
func updateCell()
in apps/chat-ios/AmazonChimeSDKMessagingDemo/entity/ChatMessageTableViewCell.swift
44 7 1
suspend fun initialize()
in apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/ui/messaging/presentation/MessagingViewModel.kt
33 6 0
suspend fun initialize()
in apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/ui/channel/presentation/ChannelViewModel.kt
33 6 0
async function getNearestRegion()
in apps/meeting/src/containers/MeetingForm/RegionSelection.tsx
20 6 0
async function toggleBackgroundBlur()
in apps/meeting/src/components/MeetingControls/VideoInputTransformControl.tsx
29 6 0
async function toggleBackgroundReplacement()
in apps/meeting/src/components/MeetingControls/VideoInputTransformControl.tsx
29 6 0
func getChannelPreferences()
in apps/chat-ios/AmazonChimeSDKMessagingDemo/models/NotificationSettingsModel.swift
28 6 2
func setChannelPreferences()
in apps/chat-ios/AmazonChimeSDKMessagingDemo/models/NotificationSettingsModel.swift
26 6 0
export default function TranscriptAnalysisPane()
in apps/televisit-demo/frontend/src/containers/transcriptions/TranscriptAnalysisPane.js
137 5 5
override fun signURL()
in apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/utils/DefaultSigV4.kt
83 5 7
fun setPreferences()
in apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/ui/messaging/presentation/NotificationSettingsViewModel.kt
30 5 2
override fun onCreate()
in apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/ui/messaging/view/activity/MessagingActivity.kt
31 5 1