aws-samples / aws-iot-edukit-tutorials
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 46 units with 848 lines of code in units (9.8% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (252 lines of code)
    • 10 medium size units (301 lines of code)
    • 14 small units (223 lines of code)
    • 18 very small units (72 lines of code)
0% | 29% | 35% | 26% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 29% | 35% | 26% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
workshop/static/en/api-reference/search0% | 27% | 41% | 21% | 8%
workshop/static/en/api-reference0% | 36% | 12% | 44% | 6%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
this.Nav = function()
in workshop/static/en/api-reference/search/search.js
76 22 2
function initMenu()
in workshop/static/en/api-reference/menu.js
65 6 5
function createResults()
in workshop/static/en/api-reference/search/search.js
56 6 0
this.OnSearchFieldChange = function()
in workshop/static/en/api-reference/search/search.js
55 11 1
this.Search = function()
in workshop/static/en/api-reference/search/search.js
49 6 0
this.Search = function()
in workshop/static/en/api-reference/search/search.js
47 7 1
this.NavChild = function()
in workshop/static/en/api-reference/search/search.js
41 11 3
this.FindChildElement = function()
in workshop/static/en/api-reference/search/search.js
32 13 1
this.Activate = function()
in workshop/static/en/api-reference/search/search.js
23 5 1
function toggleFolder()
in workshop/static/en/api-reference/dynsections.js
22 2 1
function convertToId()
in workshop/static/en/api-reference/search/search.js
22 4 1
this.SelectItemSet = function()
in workshop/static/en/api-reference/search/search.js
22 4 1
this.ProcessKeys = function()
in workshop/static/en/api-reference/search/search.js
22 6 1
this.OnSearchSelectKey = function()
in workshop/static/en/api-reference/search/search.js
21 8 1
function toggleVisibility()
in workshop/static/en/api-reference/dynsections.js
20 2 1
this.NavNext = function()
in workshop/static/en/api-reference/search/search.js
20 5 1
this.NavPrev = function()
in workshop/static/en/api-reference/search/search.js
20 5 1
function resetState()
in workshop/static/en/api-reference/menu.js
18 3 0
function SearchBox()
in workshop/static/en/api-reference/search/search.js
17 5 4
this.OnSearchSelectShow = function()
in workshop/static/en/api-reference/search/search.js
17 2 0