microsoft / donuts.node
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 169 units with 2,170 lines of code in units (63.6% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (289 lines of code)
    • 21 medium size units (663 lines of code)
    • 51 small units (716 lines of code)
    • 93 very small units (502 lines of code)
0% | 13% | 30% | 32% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 13% | 30% | 33% | 22%
cc0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
core0% | 36% | 14% | 28% | 20%
remote0% | 20% | 36% | 27% | 16%
modularity0% | 0% | 50% | 28% | 20%
core/logging0% | 0% | 38% | 34% | 26%
remote/proxy0% | 0% | 24% | 41% | 33%
settings0% | 0% | 61% | 20% | 18%
weak0% | 0% | 0% | 60% | 39%
ROOT0% | 0% | 0% | 64% | 35%
remote/pattern0% | 0% | 0% | 55% | 44%
ipc0% | 0% | 0% | 40% | 59%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
format()
in core/utils.js
93 24 2
constructor()
in remote/communicator.js
72 15 2
constructor()
in remote/object-remoting-proxy.js
68 14 4
format()
in core/utils.js
56 28 2
async initializeModulesAync()
in modularity/module-manager.js
42 12 1
realizeObjectDataInfo()
in remote/data-info-manager.js
42 9 1
realizeDataInfo()
in remote/data-info-manager.js
40 13 1
sendAsync()
in remote/communicator.js
39 4 2
constructor()
in modularity/object-remoting-host-router.js
38 7 2
constructor()
in remote/communication-host.js
37 4 2
constructor()
in remote/proxy/socket-proxy.js
37 7 1
toObjectDataInfo()
in remote/data-info-manager.js
35 13 1
loadModuleInfos()
in modularity/module-manager.js
34 10 2
toDataInfo()
in remote/data-info-manager.js
34 14 2
isSerializable()
in core/utils.js
30 14 1
register()
in modularity/module-manager.js
30 12 1
generateProperties()
in core/logging/log.js
29 10 1
defaultStringifier()
in core/utils.js
29 13 2
constructor()
in settings/file-settings.js
29 8 3
async setAsync()
in settings/settings.js
26 11 2