aws-solutions / real-time-web-analytics-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 82 units with 1,228 lines of code in units (12.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (219 lines of code)
    • 5 simple units (144 lines of code)
    • 73 very simple units (865 lines of code)
0% | 0% | 17% | 11% | 70%
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% | 19% | 12% | 67%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/web_site/js0% | 0% | 18% | 20% | 61%
source/wasa0% | 0% | 55% | 23% | 21%
source/custom-resource/lib0% | 0% | 13% | 0% | 86%
source/custom-resource0% | 0% | 0% | 0% | 100%
source/load-testing0% | 0% | 0% | 0% | 100%
source/web_site0% | 0% | 0% | 0% | 100%
source/wasa/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
$()
in source/web_site/js/dash.js
42 15 1
var getLatestMetrics = function()
in source/web_site/js/dash.js
57 14 0
function amendMetric()
in source/wasa/index.js
78 13 2
let uploadFile = function()
in source/custom-resource/lib/website-helper.js
42 11 5
function makeBarChart()
in source/web_site/js/dash.js
40 7 2
function makeEventLineChart()
in source/web_site/js/dash.js
18 7 2
function upsert()
in source/wasa/index.js
33 6 2
newPasswordRequired: function()
in source/web_site/js/dash.js
9 6 2
function makeAllEventsLineChart()
in source/web_site/js/dash.js
44 6 1
kinesisAnalyticsAppHelper.prototype.startApplication = function()
in source/custom-resource/lib/kinesis-helper.js
44 5 3
amiHelper.prototype.getAMIByName = function()
in source/custom-resource/lib/ami-helper.js
33 5 3
$()
in source/web_site/js/dash.js
21 5 1
function makeVisitorLineChart()
in source/web_site/js/dash.js
36 5 2
let downloadWebsiteManifest = function()
in source/custom-resource/lib/website-helper.js
22 4 4
dynamoHelper.prototype.seedData = function()
in source/custom-resource/lib/dynamo-helper.js
34 4 3
function getQSParameterByName()
in source/web_site/js/dash.js
11 4 2
function makeAmomalyBarChart()
in source/web_site/js/dash.js
33 4 2
downloadWebsiteManifest()
in source/custom-resource/lib/website-helper.js
14 3 5
function getMetricDetailIndex()
in source/wasa/index.js
8 3 2
function getMetricIndex()
in source/wasa/index.js
8 3 2