amazon-connect / advanced-usage-analytics
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 34 units with 302 lines of code in units (12.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (76 lines of code)
    • 2 simple units (30 lines of code)
    • 30 very simple units (196 lines of code)
0% | 0% | 25% | 9% | 64%
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% | 0% | 25% | 9% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Frontend0% | 0% | 26% | 10% | 62%
cloudformation/FrontendStackCustomResources0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
46 13 3
30 12 3
13 7 3
var submitLogs = function()
in Frontend/connect-ccp-metric-worker.js
17 6 0
function storeContactTraceStream()
in Frontend/connect-ccp-metric-worker.js
12 5 2
self.onmessage = function()
in Frontend/connect-ccp-metric-worker.js
9 5 1
function checkPreconditions()
in cloudformation/FrontendStackCustomResources/frontendgenerator.js
13 5 1
function init()
in Frontend/main.js
45 2 0
req.onupgradeneeded = function()
in Frontend/connect-ccp-metric-worker.js
9 2 1
currentContactsPendingRequest.onsuccess = function()
in Frontend/connect-ccp-metric-worker.js
10 2 0
xhr.onreadystatechange = function()
in Frontend/connect-ccp-metric-worker.js
12 2 0
xhr.onreadystatechange = function()
in Frontend/connect-ccp-metric-worker.js
10 2 0
3 1 0
req.onsuccess = function()
in Frontend/connect-ccp-metric-worker.js
10 1 1
completeCountRequest.onsuccess = function()
in Frontend/connect-ccp-metric-worker.js
4 1 0
currentContactsCompleteRequest.onsuccess = function()
in Frontend/connect-ccp-metric-worker.js
4 1 0
completeCountRequest.onerror = function()
in Frontend/connect-ccp-metric-worker.js
4 1 0
currentContactsCompleteRequest.onerror = function()
in Frontend/connect-ccp-metric-worker.js
4 1 0
currentContactsPendingRequest.onerror = function()
in Frontend/connect-ccp-metric-worker.js
4 1 0
req.onerror = function()
in Frontend/connect-ccp-metric-worker.js
3 1 1