aws-samples / aws-lambda-fanout
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 77 units with 1,218 lines of code in units (84.6% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (182 lines of code)
    • 16 medium size units (478 lines of code)
    • 20 small units (299 lines of code)
    • 38 very small units (259 lines of code)
0% | 14% | 39% | 24% | 21%
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% | 39% | 24% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 12% | 40% | 24% | 23%
ROOT0% | 29% | 33% | 27% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function readTarget()
in lib/configuration.js
71 29 2
57 14 1
54 14 5
exports.servers = function()
in lib/memcached.js
49 5 2
47 4 3
38 5 2
function ensureService()
in lib/services.js
33 9 3
var runQuery = function()
in lib/configuration.js
32 6 1
exports.send = function()
in lib/post-es.js
32 3 4
function transformDDBRecord()
in lib/transformation.js
30 9 3
var register = function()
in lib/statistics.js
28 7 6
exports.get = function()
in lib/services.js
27 8 2
var addValue = function()
in lib/statistics.js
26 6 2
var _publish = function()
in lib/statistics.js
24 5 0
24 4 5
22 6 3
exports.send = function()
in lib/post-sns.js
22 4 4
exports.send = function()
in lib/post-iot.js
22 4 4
exports.send = function()
in lib/post-sqs.js
22 4 4
function duplicateObject()
in lib/ddb-utils.js
20 8 1