microsoft / backbone-virtualized-listview
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 87 units with 920 lines of code in units (65.2% of code).
    • 2 very long units (237 lines of code)
    • 1 long units (57 lines of code)
    • 6 medium size units (207 lines of code)
    • 4 small units (67 lines of code)
    • 74 very small units (352 lines of code)
25% | 6% | 22% | 7% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js25% | 6% | 22% | 7% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
spec23% | 10% | 18% | 5% | 42%
js32% | 0% | 31% | 11% | 23%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function getTestCases()
in spec/index.js
130 8 1
_redraw()
in js/index.js
107 25 0
describe()
in spec/index.js
57 7 2
describe()
in spec/index.js
43 1 2
set()
in js/index.js
41 13 2
40 8 0
describe()
in spec/index.js
36 1 2
describe()
in spec/viewport-detection.js
24 1 2
_initViewport()
in js/index.js
23 9 0
scrollToItem()
in js/index.js
20 7 1
_hookUpViewport()
in js/index.js
17 4 0
15 3 0
15 5 2
10 2 1
get itemHeights()
in js/index.js
10 2 0
10 1 1
it()
in spec/index.js
10 1 2
export function doAsync()
in spec/test-util.js
10 2 1
viewport: $()
in spec/viewport-detection.js
10 1 1
viewport: $()
in spec/viewport-detection.js
10 1 1