aws-samples / bring-your-own-data-labs
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 76 units with 731 lines of code in units (8.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 11 medium size units (344 lines of code)
    • 10 small units (145 lines of code)
    • 55 very small units (242 lines of code)
0% | 0% | 47% | 19% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 40% | 22% | 37%
py0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
workshop/Server/js0% | 0% | 40% | 22% | 37%
workshop0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
var sendLog = function()
in workshop/Server/js/kinesis.js
50 5 0
def main()
in workshop/post_build.py
47 5 0
jQuery()
in workshop/Server/js/learn.js
33 8 1
function autoComplete()
in workshop/Server/js/auto-complete.js
31 8 1
function initLunr()
in workshop/Server/js/search.js
30 2 0
jQuery.fn.highlight = function()
in workshop/Server/js/learn.js
30 6 2
def main()
in workshop/pre_build.py
30 2 0
that.keydownHandler = function()
in workshop/Server/js/auto-complete.js
27 14 1
that.keyupHandler = function()
in workshop/Server/js/auto-complete.js
23 13 1
highlight: function()
in workshop/Server/js/learn.js
22 11 4
function getScrollBarWidth()
in workshop/Server/js/learn.js
21 2 0
that.updateSC = function()
in workshop/Server/js/auto-complete.js
20 11 2
$()
in workshop/Server/js/learn.js
18 4 1
renderItem: function()
in workshop/Server/js/search.js
16 2 2
this.destroy = function()
in workshop/Server/js/auto-complete.js
16 3 0
scrollIfAnchor: function()
in workshop/Server/js/learn.js
15 5 2
function fallbackMessage()
in workshop/Server/js/learn.js
14 4 1
jQuery.fn.unhighlight = function()
in workshop/Server/js/learn.js
12 1 1
var suggest = function()
in workshop/Server/js/auto-complete.js
12 4 1
jQuery()
in workshop/Server/js/learn.js
11 3 1