microsoft / powerbi-visuals-sankey
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 86 units with 1,813 lines of code in units (77.3% of code).
    • 1 very long units (163 lines of code)
    • 8 long units (586 lines of code)
    • 17 medium size units (495 lines of code)
    • 23 small units (354 lines of code)
    • 37 very small units (215 lines of code)
8% | 32% | 27% | 19% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts8% | 32% | 27% | 19% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src8% | 32% | 27% | 19% | 11%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public converter()
in src/sankeyDiagram.ts
163 37 1
private renderNodes()
in src/sankeyDiagram.ts
91 11 1
private getSvgPathForSelfLink()
in src/sankeyDiagram.ts
89 10 2
private computePositions()
in src/sankeyDiagram.ts
86 16 1
private renderLinkLabels()
in src/sankeyDiagram.ts
78 9 1
private computeYPosition()
in src/sankeyDiagram.ts
68 19 3
65 3 1
function dragged()
in src/sankeyDiagram.ts
58 13 1
private renderLinks()
in src/sankeyDiagram.ts
51 6 1
private static computeXPositions()
in src/sankeyDiagram.ts
41 7 1
private createNewNode()
in src/sankeyDiagram.ts
38 1 2
37 6 6
private getSvgPathForForwardLink()
in src/sankeyDiagram.ts
37 2 1
32 6 4
32 7 7
public static dfs()
in src/sankeyDiagram.ts
30 9 4
29 5 0
public getColumns()
in src/sankeyDiagram.ts
27 6 1
private static sortColumns()
in src/sankeyDiagram.ts
26 5 4
private saveNodePositions()
in src/sankeyDiagram.ts
26 2 1