awslabs / amazon-kinesis-data-generator
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 248 units with 2,963 lines of code in units (5.6% of code).
    • 2 very long units (330 lines of code)
    • 6 long units (392 lines of code)
    • 26 medium size units (831 lines of code)
    • 47 small units (661 lines of code)
    • 167 very small units (749 lines of code)
11% | 13% | 28% | 22% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js11% | 13% | 28% | 22% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
web/js12% | 14% | 24% | 21% | 27%
setup0% | 0% | 71% | 28% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
var Internet = function()
in web/js/faker.js
201 1 1
var Image = function()
in web/js/faker.js
129 1 1
function Fake()
in web/js/faker.js
78 16 1
function Faker()
in web/js/faker.js
73 11 1
var Helpers = function()
in web/js/faker.js
62 3 1
function Random()
in web/js/faker.js
62 6 2
var Company = function()
in web/js/faker.js
60 1 1
function init()
in web/js/producer.js
57 5 0
49 1 0
46 7 2
function updateRoles()
in setup/createCognitoPool.js
45 3 1
onSuccess: function()
in web/js/producer.js
44 5 1
var _Date = function()
in web/js/faker.js
43 1 1
exports.createPoolAndUser = function()
in setup/createCognitoPool.js
39 3 2
function sendResponse()
in setup/createCognitoPool.js
35 1 4
function updateStreamsList()
in web/js/producer.js
34 7 2
function updateFirehoseList()
in web/js/producer.js
34 7 2
var Hacker = function()
in web/js/faker.js
34 1 1
password = function()
in web/js/faker.js
34 10 4
function rnd()
in web/js/faker.js
32 14 2