awslabs / iot-channel-using-amazon-pinpoint
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 23 units with 425 lines of code in units (70.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (42 lines of code)
    • 0 simple units (0 lines of code)
    • 22 very simple units (383 lines of code)
0% | 0% | 9% | 0% | 90%
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% | 11% | 0% | 88%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
custom-resource/lib0% | 0% | 14% | 0% | 85%
custom-resource0% | 0% | 0% | 0% | 100%
pinpoint-iot-campaign-hook0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
let uploadFile = function()
in source/custom-resource/lib/website-helper.js
42 11 5
def lambda_handler()
in source/pinpoint-iot-campaign-hook/lambda_function.py
39 5 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
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
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
function()
in source/custom-resource/lib/website-helper.js
6 2 2
let validateJSON = function()
in source/custom-resource/lib/website-helper.js
10 2 1
uploadFile()
in source/custom-resource/lib/website-helper.js
6 2 6
metricsHelper.prototype.sendAnonymousMetric = function()
in source/custom-resource/lib/metrics-helper.js
31 2 2
function()
in source/custom-resource/index.js
12 2 2
function()
in source/custom-resource/index.js
12 2 2
Deleted: moment()
in source/custom-resource/index.js
5 2 0
Launch: moment()
in source/custom-resource/index.js
5 2 0
def sendAnonymousData()
in source/pinpoint-iot-campaign-hook/lambda_function.py
22 1 0
websiteHelper.prototype.deployWebsite = function()
in source/custom-resource/lib/website-helper.js
3 1 5
on()
in source/custom-resource/lib/website-helper.js
3 1 2
on()
in source/custom-resource/lib/website-helper.js
5 1 2