aws-solutions / real-time-insights-account-activity
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 71 units with 1,071 lines of code in units (13.3% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (194 lines of code)
    • 14 medium size units (475 lines of code)
    • 16 small units (221 lines of code)
    • 38 very small units (181 lines of code)
0% | 18% | 44% | 20% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 14% | 50% | 18% | 16%
py0% | 49% | 0% | 33% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/web_site/js0% | 21% | 42% | 16% | 19%
source/update_ddb_from_stream0% | 49% | 0% | 33% | 16%
source/helper/lib0% | 0% | 76% | 10% | 13%
source/helper0% | 0% | 49% | 34% | 15%
deployment/manifest-generator0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
var updateDashboard = function()
in source/web_site/js/dash.js
79 15 0
def lambda_handler()
in source/update_ddb_from_stream/update_ddb_from_stream.py
61 16 2
var updateLineChart = function()
in source/web_site/js/dash.js
54 9 4
let createAppVariables = function()
in source/helper/lib/website-helper.js
45 2 10
42 5 2
let uploadFile = function()
in source/helper/lib/website-helper.js
42 11 5
$()
in source/web_site/js/dash.js
42 15 1
var fastUpdateLineChart = function()
in source/web_site/js/dash.js
40 8 5
var fastUpdate = function()
in source/web_site/js/dash.js
39 8 0
38 1 1
let sendResponse = function()
in source/helper/index.js
34 1 5
var normalizeValues = function()
in source/web_site/js/dash.js
33 7 3
metricsHelper.prototype.sendAnonymousMetric = function()
in source/helper/lib/metrics-helper.js
31 2 2
var updateHorizontalBarChart = function()
in source/web_site/js/dash.js
23 7 5
onSuccess: function()
in source/web_site/js/dash.js
23 2 1
let downloadWebisteManifest = function()
in source/helper/lib/website-helper.js
22 4 4
var generateLineChartConfig = function()
in source/web_site/js/dash.js
21 1 1
$()
in source/web_site/js/dash.js
17 5 1
def sendAnonymousData()
in source/update_ddb_from_stream/update_ddb_from_stream.py
16 1 2
function updateData()
in source/web_site/js/dash.js
16 3 5