microsoft / PowerBI-visuals-FacetKey
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 379 units with 3,502 lines of code in units (64.8% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (306 lines of code)
    • 37 medium size units (1,125 lines of code)
    • 63 small units (879 lines of code)
    • 274 very small units (1,192 lines of code)
0% | 8% | 32% | 25% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 18% | 44% | 20% | 16%
js0% | 4% | 26% | 27% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 18% | 44% | 20% | 16%
lib/@uncharted.software/stories-facets/src/components/facet0% | 5% | 32% | 20% | 42%
lib/@uncharted.software/stories-facets/src/components0% | 6% | 25% | 31% | 36%
lib/@uncharted.software/stories-facets/src0% | 0% | 17% | 40% | 41%
lib/@uncharted.software/stories-facets/src/util0% | 0% | 0% | 56% | 43%
lib/@uncharted.software/stories-facets/src/templates0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
70 30 1
67 14 2
FacetVertical.prototype._update = function()
in lib/@uncharted.software/stories-facets/src/components/facet/facetVertical.js
60 27 0
57 7 2
Group.prototype._performDragging = function()
in lib/@uncharted.software/stories-facets/src/components/group.js
52 10 1
FacetHistogram.prototype.initializeSlices = function()
in lib/@uncharted.software/stories-facets/src/components/facet/facetHistogram.js
49 9 2
public update()
in src/FacetsVisual.ts
46 28 1
44 9 2
private bindFacetsEventHandlers()
in src/FacetsVisual.ts
43 9 0
FacetHistogramFilter.prototype._initializeDragging = function()
in lib/@uncharted.software/stories-facets/src/components/facet/facetHistogramFilter.js
42 7 0
40 7 2
39 9 1
39 6 2
Group.prototype.append = function()
in lib/@uncharted.software/stories-facets/src/components/group.js
38 9 1
38 3 3
FacetHorizontal.prototype.select = function()
in lib/@uncharted.software/stories-facets/src/components/facet/facetHorizontal.js
35 21 1
private syncFacets()
in src/FacetsVisual.ts
35 9 0
function FacetHistogramFilter()
in lib/@uncharted.software/stories-facets/src/components/facet/facetHistogramFilter.js
32 1 2
FacetHistogramFilter.prototype._initializePagination = function()
in lib/@uncharted.software/stories-facets/src/components/facet/facetHistogramFilter.js
32 5 0
Facets.prototype.select = function()
in lib/@uncharted.software/stories-facets/src/main.js
32 8 2