amazon-connect / amazon-connect-snippets
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 129 units with 1,948 lines of code in units (21.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (115 lines of code)
    • 8 medium complex units (468 lines of code)
    • 6 simple units (180 lines of code)
    • 114 very simple units (1,185 lines of code)
0% | 5% | 24% | 9% | 60%
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
js0% | 10% | 30% | 10% | 49%
py0% | 0% | 26% | 4% | 69%
go0% | 0% | 0% | 61% | 38%
ts0% | 0% | 0% | 0% | 100%
tsx0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
cs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools/CCPConnectivityTestTools0% | 18% | 46% | 6% | 28%
projects/ContextRouting0% | 0% | 66% | 0% | 33%
python/syncinstances0% | 0% | 43% | 0% | 56%
tools/CCPLogParser0% | 0% | 19% | 33% | 46%
python/contactflowhelper0% | 0% | 34% | 0% | 65%
go/GetQueueAvailableAgents0% | 0% | 0% | 100% | 0%
python/remote-control-center0% | 0% | 0% | 13% | 86%
javascript/programmatically-create-task-example0% | 0% | 0% | 0% | 100%
tools/ConnectCloudwatchDashboard0% | 0% | 0% | 0% | 100%
javascript/customAgentDesktop-AzureSSO0% | 0% | 0% | 0% | 100%
python/multiaccountmetrics0% | 0% | 0% | 0% | 100%
javascript/restrict-deskphone-in-ccp0% | 0% | 0% | 0% | 100%
go/StartOutboundVoiceContact0% | 0% | 0% | 0% | 100%
projects/WisdomAPI0% | 0% | 0% | 0% | 100%
java/OutboundExample0% | 0% | 0% | 0% | 100%
python/LexDefaultIntentUtterance0% | 0% | 0% | 0% | 100%
dotnet/OutboundExample0% | 0% | 0% | 0% | 100%
python/holidaycheck0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function checkDeviceSupport()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
115 43 1
function getIPs()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
53 19 2
function getBrowserInfo()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
78 18 0
def lambda_handler()
in projects/ContextRouting/Lambda/Python/ctrProcessor.py
56 18 2
function detectPrivateMode()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
44 14 1
def perform_sync()
in python/syncinstances/sync_instances.py
46 12 5
function detectDesktopOS()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
120 11 0
export default function interpolate()
in tools/CCPLogParser/src/utils/interpolator.js
42 11 7
def lambda_handler()
in python/contactflowhelper/lambda_function.py
29 11 2
(function(that)()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
25 8 1
function registerValidSW()
in tools/CCPLogParser/src/serviceWorker.js
33 8 2
export function buildIndex()
in tools/CCPLogParser/src/utils/findExtras.js
40 7 0
def process_configs()
in python/remote-control-center/GetConfigLambda/lambda_function.py
21 7 3
func main()
in go/GetQueueAvailableAgents/main.go
42 6 0
getOsName: function()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
19 6 0
function isIE10OrLater()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
11 5 1
any: function()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
3 5 0
export function register()
in tools/CCPLogParser/src/serviceWorker.js
22 5 1
function browserNotify()
in javascript/restrict-deskphone-in-ccp/code.js
20 5 1
def process_config()
in python/remote-control-center/HydrateConfigTableLambda/lambda_function.py
19 5 2