microsoft / PartsUnlimitedMRP
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 5,039 units with 50,579 lines of code in units (63.3% of code).
    • 11 very long units (2,085 lines of code)
    • 62 long units (4,157 lines of code)
    • 478 medium size units (13,975 lines of code)
    • 898 small units (13,157 lines of code)
    • 3,590 very small units (17,205 lines of code)
4% | 8% | 27% | 26% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js4% | 8% | 27% | 26% | 32%
java0% | 1% | 27% | 21% | 49%
groovy0% | 0% | 66% | 0% | 33%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Clients/Web4% | 8% | 27% | 26% | 32%
src/Backend/OrderService0% | 1% | 32% | 21% | 43%
src/Backend/IntegrationService0% | 0% | 0% | 16% | 83%
Labfiles/DevOps200.1x-PracticesandPrinciples/Mod040% | 0% | 0% | 0% | 100%
Labfiles/DevOps200.1x-PracticesandPrinciples/Mod030% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function concludeRefresh()
in src/Clients/Web/winjs/js/winjs.js
691 233 0
(function ()()
in src/Clients/Web/winjs/js/winjs.js
212 91 1
attribute: literal()
in src/Clients/Web/winjs/js/winjs.js
192 3 1
_synchronize: function ListView_synchronize()
in src/Clients/Web/winjs/js/winjs.js
165 46 0
oneTimeTextBindingAnalyze: function()
in src/Clients/Web/winjs/js/winjs.js
140 70 1
compile: function()
in src/Clients/Web/winjs/js/winjs.js
124 11 3
bindToken: literal()
in src/Clients/Web/winjs/js/winjs.js
115 17 1
115 43 1
sourceProperties: literal()
in src/Clients/Web/winjs/js/winjs.js
113 17 1
function processRefreshResults()
in src/Clients/Web/winjs/js/winjs.js
113 34 5
function reservedWordLookup()
in src/Clients/Web/winjs/js/winjs.js
105 49 1
98 32 1
_processBatch: function()
in src/Clients/Web/winjs/js/winjs.js
96 28 0
onKeyDown: function SelectionMode_onKeyDown()
in src/Clients/Web/winjs/js/winjs.js
95 56 1
render: function overflowState_render()
in src/Clients/Web/winjs/js/winjs.js
93 26 1
inserted: function()
in src/Clients/Web/winjs/js/winjs.js
87 24 4
86 19 1
_measure: function NavBarContainer_measure()
in src/Clients/Web/winjs/js/winjs.js
86 14 0
85 33 1
_loadItem: function pivot_loadItem()
in src/Clients/Web/winjs/js/winjs.js
85 26 1