microsoft / PowerBI-visuals-StrippetsBrowser
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 285 units with 3,200 lines of code in units (24.7% of code).
    • 2 very long units (314 lines of code)
    • 5 long units (323 lines of code)
    • 27 medium size units (713 lines of code)
    • 57 small units (832 lines of code)
    • 194 very small units (1,018 lines of code)
9% | 10% | 22% | 26% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js6% | 7% | 21% | 29% | 34%
ts24% | 22% | 27% | 8% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/@uncharted/strippets/src11% | 3% | 20% | 29% | 34%
src24% | 22% | 27% | 8% | 17%
lib/@uncharted/thumbnails/src0% | 17% | 20% | 30% | 31%
lib/@uncharted/strippets.common/src0% | 0% | 25% | 28% | 46%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
FeatureContent.prototype.renderEntities = function()
in lib/@uncharted/strippets/src/strippets.outline.feature.js
172 40 1
public static converter()
in src/StrippetsVisual.ts
142 52 5
Readerview.prototype.placeReader = function()
in lib/@uncharted/thumbnails/src/thumbnails.readerview.js
79 20 2
private onLoadArticle()
in src/StrippetsVisual.ts
70 14 1
Thumbnail.prototype._loadImages = function()
in lib/@uncharted/thumbnails/src/thumbnails.thumbnail.js
60 12 2
bucket: getBucket()
in src/StrippetsVisual.ts
60 10 1
Outline.prototype.registerEvents = function()
in lib/@uncharted/strippets/src/strippets.outline.js
54 13 0
constructor()
in src/StrippetsVisual.ts
45 11 1
private initializeOutlines()
in src/StrippetsVisual.ts
43 6 0
Outline.prototype.constructLayout = function()
in lib/@uncharted/strippets/src/strippets.outline.js
36 11 1
Strippets.prototype.startAutoCentering = function()
in lib/@uncharted/strippets/src/strippets.js
31 6 0
util.getCSSRule = function()
in lib/@uncharted/strippets.common/src/uncharted.util.js
29 13 1
Outline.prototype.init = function()
in lib/@uncharted/strippets/src/strippets.outline.js
29 6 4
Outline.prototype.openReadingMode = function()
in lib/@uncharted/strippets/src/strippets.outline.js
27 3 0
27 9 4
Strippets.prototype.initializeContainer = function()
in lib/@uncharted/strippets/src/strippets.js
26 2 0
IBindable.prototype.off = function()
in lib/@uncharted/thumbnails/src/IBindable.js
26 7 2
Strippets.prototype.mapEntitiesToIconMap = function()
in lib/@uncharted/strippets/src/strippets.js
25 7 2
Outline.prototype.getTransitionSizes = function()
in lib/@uncharted/strippets/src/strippets.outline.js
25 9 1
Sidebar.prototype.renderEntities = function()
in lib/@uncharted/strippets/src/strippets.outline.sidebar.js
25 5 0