aws-samples / aws-iot-core-acmebots-monitoring
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 158 units with 2,567 lines of code in units (52.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (143 lines of code)
    • 6 simple units (287 lines of code)
    • 150 very simple units (2,137 lines of code)
0% | 0% | 5% | 11% | 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
js0% | 0% | 5% | 11% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
backend/src0% | 0% | 8% | 16% | 75%
bots/src0% | 0% | 14% | 17% | 68%
frontend/src0% | 0% | 0% | 5% | 94%
bots/scripts0% | 0% | 0% | 0% | 100%
frontend/scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
updateState: function()
in bots/src/bot/core.js
44 12 2
clearEcsCluster: function()
in backend/src/cleanup/clear-ecs-cluster.js
99 11 3
function processCmd()
in bots/src/bot/msgHandler.js
17 7 2
function getDelta()
in bots/src/bot/core.js
18 7 3
ecsDeleteBot: function()
in backend/src/bot/ecsDeleteBot.js
59 7 3
handleTelemetryData: function()
in backend/src/iotRules/handleTelemetryData.js
128 7 3
function initProps()
in bots/src/bot/index.js
17 6 2
render()
in frontend/src/components/Telemetry.js
48 6 0
render()
in frontend/src/components/Telemetry.js
72 5 0
export default function register()
in frontend/src/registerServiceWorker.js
22 5 0
checkIfThingExists: function()
in backend/src/iot/checkIfThingExists.js
16 5 3
clearEcrRepo: function()
in backend/src/cleanup/clear-ecr-repo.js
44 5 3
clearPrincipals: function()
in backend/src/cleanup/detachPrincipals.js
42 5 3
function getBackEndRegion()
in bots/scripts/clear-ecr-repo.js
10 4 0
function getBackEndRegion()
in bots/scripts/setup.js
10 4 0
function getBackEndRegion()
in bots/scripts/clear-ecs-cluster.js
10 4 0
function fetchThings()
in frontend/src/components/Things.js
23 4 2
render()
in frontend/src/components/Things.js
44 4 0
function fetchThings()
in frontend/src/components/Telemetry.js
23 4 2
function getBackEndRegion()
in frontend/scripts/setup.js
10 4 0