aws-samples / aws-modernization-hub
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 209 units with 3,191 lines of code in units (59.2% of code).
    • 7 very long units (1,028 lines of code)
    • 6 long units (400 lines of code)
    • 23 medium size units (745 lines of code)
    • 27 small units (372 lines of code)
    • 146 very small units (646 lines of code)
32% | 12% | 23% | 11% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js32% | 12% | 23% | 11% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
themes/aws-modernize/static/bootstrap/js32% | 12% | 23% | 11% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
268 78 0
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
165 62 0
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
163 56 0
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
111 23 0
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
109 29 0
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
108 44 0
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
104 26 0
(function (global, factory)()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
95 12 2
var Tooltip = function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
76 1 1
var Carousel = function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
60 1 1
function computeStyle()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
57 11 2
function flip()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
57 41 2
var Dropdown = function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
55 1 1
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
50 10 0
function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
46 16 0
function arrow()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
45 11 2
function parseOffset()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
44 11 4
function computeAutoPlacement()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
42 7 5
var Popover = function()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
38 1 1
function getBoundaries()
in themes/aws-modernize/static/bootstrap/js/bootstrap.bundle.js
36 7 4