awslabs / iot-channel-using-amazon-pinpoint
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 23 units with 425 lines of code in units (70.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 10 medium size units (332 lines of code)
    • 3 small units (39 lines of code)
    • 10 very small units (54 lines of code)
0% | 0% | 78% | 9% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 74% | 10% | 14%
py0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
custom-resource/lib0% | 0% | 83% | 5% | 11%
pinpoint-iot-campaign-hook0% | 0% | 100% | 0% | 0%
custom-resource0% | 0% | 43% | 30% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
kinesisAnalyticsAppHelper.prototype.startApplication = function()
in source/custom-resource/lib/kinesis-helper.js
44 5 3
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.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 sendResponse = function()
in source/custom-resource/index.js
34 1 5
metricsHelper.prototype.sendAnonymousMetric = function()
in source/custom-resource/lib/metrics-helper.js
31 2 2
bucketEncryptionHelper.prototype.enableDefaultBucketEncryption = function()
in source/custom-resource/lib/s3-bucket-encryption-helper.js
27 3 4
def sendAnonymousData()
in source/pinpoint-iot-campaign-hook/lambda_function.py
22 1 0
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
function()
in source/custom-resource/index.js
12 2 2
function()
in source/custom-resource/index.js
12 2 2
let validateJSON = function()
in source/custom-resource/lib/website-helper.js
10 2 1
function()
in source/custom-resource/lib/website-helper.js
6 2 2
uploadFile()
in source/custom-resource/lib/website-helper.js
6 2 6
TimeStamp: moment()
in source/custom-resource/index.js
6 1 0
on()
in source/custom-resource/lib/website-helper.js
5 1 2
TimeStamp: moment()
in source/custom-resource/index.js
5 1 0
Deleted: moment()
in source/custom-resource/index.js
5 2 0