microsoft / timelinestoryteller
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 310 units with 9,225 lines of code in units (38.2% of code).
    • 20 very long units (4,773 lines of code)
    • 16 long units (1,134 lines of code)
    • 57 medium size units (1,719 lines of code)
    • 50 small units (700 lines of code)
    • 167 very small units (899 lines of code)
51% | 12% | 18% | 7% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js51% | 12% | 18% | 7% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src53% | 12% | 17% | 7% | 8%
src/spec84% | 0% | 15% | 0% | 0%
src/lib0% | 19% | 37% | 4% | 38%
src/dialogs0% | 0% | 61% | 9% | 28%
ROOT0% | 0% | 100% | 0% | 0%
src/templates0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
831 67 3
function update()
in src/configurableTL.js
656 206 12
function delayedUpdate()
in src/configurableTL.js
418 120 7
325 45 4
273 4 2
module.exports = function()
in src/spec/testData/singleSceneWithAnnotations.js
220 1 0
module.exports = function()
in src/addImage.js
212 6 7
192 23 0
function radialAxis()
in src/radialAxis.js
168 7 1
function configureLinearAxis()
in src/configurableTL.js
164 32 12
setTimeout()
in src/main.js
163 16 1
function calendarAxis()
in src/calendarAxis.js
154 1 1
147 42 11
145 13 1
141 25 1
function updateScale()
in src/configurableTL.js
126 37 2
function configurableTL()
in src/configurableTL.js
115 12 1
function reset()
in src/globals.js
110 1 0
function initializeElements()
in src/configurableTL.js
109 14 8
104 17 2