aws-samples / aws-lambda-redirection-at-edge
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 60 units with 613 lines of code in units (36.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (227 lines of code)
    • 14 small units (193 lines of code)
    • 38 very small units (193 lines of code)
0% | 0% | 37% | 31% | 31%
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% | 37% | 31% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/deploy-function0% | 0% | 72% | 20% | 7%
lambda/origin-request-function0% | 0% | 52% | 27% | 19%
userinterface/js/services0% | 0% | 16% | 37% | 46%
userinterface/js/contollers0% | 0% | 14% | 34% | 51%
userinterface/js0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
"": function()
in lambda/origin-request-function/rules.js
38 9 1
function sendResponse()
in lambda/deploy-function/index.js
33 1 4
function uploadUIAssets()
in lambda/deploy-function/index.js
32 3 1
exports.handler = function()
in lambda/deploy-function/index.js
26 3 2
"": function()
in lambda/origin-request-function/rules.js
26 8 1
function syncRedirectionRule()
in lambda/origin-request-function/index.js
25 3 2
(function ()()
in userinterface/js/services/configService.js
24 1 1
function AppController()
in userinterface/js/contollers/AppController.js
23 2 7
function GlobalController()
in userinterface/js/contollers/GlobalController.js
20 2 6
function generateResponse()
in lambda/origin-request-function/utils.js
18 1 3
var AWSService = function()
in userinterface/js/services/awsService.js
16 1 0
function isRuleValid()
in lambda/origin-request-function/utils.js
15 5 2
function createRedirectRuleFile()
in lambda/deploy-function/index.js
14 1 0
makeCall: function()
in userinterface/js/services/httpService.js
13 2 5
AWSService.prototype.listVersions = function()
in userinterface/js/services/awsService.js
13 1 0
"": function()
in lambda/origin-request-function/rules.js
13 4 1
(function ()()
in userinterface/js/app.js
12 1 1
onSuccess: function()
in userinterface/js/contollers/LoginController.js
12 3 1
vm.getRules = function()
in userinterface/js/contollers/AppController.js
12 2 1
vm.addSection = function()
in userinterface/js/contollers/AppController.js
12 4 1