aws-samples / aws-cdk-changelogs-demo
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 223 units with 3,313 lines of code in units (32.6% of code).
    • 0 very long units (0 lines of code)
    • 10 long units (664 lines of code)
    • 38 medium size units (1,341 lines of code)
    • 39 small units (596 lines of code)
    • 136 very small units (712 lines of code)
0% | 20% | 40% | 17% | 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% | 20% | 40% | 17% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 34% | 34% | 30% | 0%
app/autocomplete0% | 18% | 40% | 16% | 24%
app/crawl0% | 18% | 40% | 16% | 24%
app/lib0% | 18% | 40% | 16% | 24%
app/regenerate-homepage0% | 18% | 40% | 16% | 24%
app/recently-crawled0% | 18% | 40% | 16% | 24%
app/recrawl0% | 18% | 40% | 16% | 24%
app/rubygem-recent0% | 18% | 40% | 16% | 24%
app/pypi-recent0% | 18% | 40% | 16% | 24%
custom-constructs0% | 0% | 100% | 0% | 0%
app/scripts0% | 0% | 56% | 43% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in changelogs-md.js
73 1 3
Parser.prototype.extractHeaderInfo = function()
in app/autocomplete/lib/parser.js
67 21 1
67 21 1
67 21 1
Parser.prototype.extractHeaderInfo = function()
in app/regenerate-homepage/lib/parser.js
67 21 1
Parser.prototype.extractHeaderInfo = function()
in app/recently-crawled/lib/parser.js
67 21 1
67 21 1
Parser.prototype.extractHeaderInfo = function()
in app/rubygem-recent/lib/parser.js
67 21 1
Parser.prototype.extractHeaderInfo = function()
in app/pypi-recent/lib/parser.js
67 21 1
constructor()
in changelogs-md.js
55 1 1
Parser.prototype.parse = function()
in app/autocomplete/lib/parser.js
50 13 1
Parser.prototype.parse = function()
in app/crawl/lib/parser.js
50 13 1
50 13 1
Parser.prototype.parse = function()
in app/regenerate-homepage/lib/parser.js
50 13 1
Parser.prototype.parse = function()
in app/recently-crawled/lib/parser.js
50 13 1
Parser.prototype.parse = function()
in app/recrawl/lib/parser.js
50 13 1
Parser.prototype.parse = function()
in app/rubygem-recent/lib/parser.js
50 13 1
Parser.prototype.parse = function()
in app/pypi-recent/lib/parser.js
50 13 1
Parser.prototype.removeHTMLComments = function()
in app/autocomplete/lib/parser.js
39 14 1
39 14 1