aws-solutions / real-time-iot-device-monitoring-with-kinesis
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 58 units with 1,109 lines of code in units (15.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (204 lines of code)
    • 3 simple units (105 lines of code)
    • 52 very simple units (800 lines of code)
0% | 0% | 18% | 9% | 72%
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% | 20% | 5% | 73%
py0% | 0% | 0% | 40% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/web_site/js0% | 0% | 27% | 9% | 63%
source/custom-resource/lib0% | 0% | 14% | 0% | 85%
source/update_ddb_from_stream0% | 0% | 0% | 40% | 59%
source/custom-resource0% | 0% | 0% | 0% | 100%
deployment/manifest-generator0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
var getLatestRecord = function()
in source/web_site/js/dash.js
93 15 0
$()
in source/web_site/js/dash.js
69 15 1
let uploadFile = function()
in source/custom-resource/lib/website-helper.js
42 11 5
def lambda_handler()
in source/update_ddb_from_stream/update_ddb_from_stream.py
51 10 2
var updateLineChart = function()
in source/web_site/js/dash.js
41 10 6
newPasswordRequired: function()
in source/web_site/js/dash.js
13 6 2
kinesisAnalyticsAppHelper.prototype.startApplication = function()
in source/custom-resource/lib/kinesis-helper.js
44 5 3
kinesisAnalyticsAppHelper.prototype.stopApplication = function()
in source/custom-resource/lib/kinesis-helper.js
36 5 3
$()
in source/web_site/js/dash.js
17 5 1
$()
in source/web_site/js/dash.js
28 5 1
def put_record_with_retry()
in source/update_ddb_from_stream/update_ddb_from_stream.py
19 4 6
def merge_record_values()
in source/update_ddb_from_stream/update_ddb_from_stream.py
7 4 2
websiteHelper.prototype.configureWebsite = function()
in source/custom-resource/lib/website-helper.js
35 4 5
let downloadWebsiteManifest = function()
in source/custom-resource/lib/website-helper.js
22 4 4
function getQSParameterByName()
in source/web_site/js/dash.js
11 4 2
var updateHorizontalBarChart = function()
in source/web_site/js/dash.js
17 4 5
let getFileList = function()
in deployment/manifest-generator/app.js
16 4 1
def merge_values()
in source/update_ddb_from_stream/update_ddb_from_stream.py
4 3 4
downloadWebsiteManifest()
in source/custom-resource/lib/website-helper.js
15 3 5
bucketEncryptionHelper.prototype.enableDefaultBucketEncryption = function()
in source/custom-resource/lib/s3-bucket-encryption-helper.js
27 3 4