microsoft / powerbi-visuals-utils-svgutils
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 55 units with 307 lines of code in units (49.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 4 small units (57 lines of code)
    • 51 very small units (250 lines of code)
0% | 0% | 0% | 18% | 81%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 0% | 18% | 81%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/shapes0% | 0% | 0% | 25% | 74%
src0% | 0% | 0% | 17% | 82%
src/touch0% | 0% | 0% | 0% | 100%
src/shapes/rect0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function intersect()
in src/shapes/shapes.ts
17 5 2
public getScale()
in src/scaleDetector.ts
14 3 0
export function isIntersecting()
in src/shapes/shapes.ts
13 4 2
export function combine()
in src/shapes/shapes.ts
13 3 2
constructor()
in src/scaleDetector.ts
10 1 1
export function inflate()
in src/shapes/shapes.ts
10 2 2
export function deflate()
in src/shapes/shapes.ts
10 2 2
export function containsPoint()
in src/shapes/shapes.ts
9 6 2
8 4 1
8 3 1
export function add()
in src/shapes/shapes.ts
8 1 2
export function subtract()
in src/shapes/shapes.ts
8 1 2
7 2 0
7 2 0
7 2 0
6 1 1
6 1 0
constructor()
in src/shapes/rect/rect.ts
6 5 4
export function getClosestPoint()
in src/shapes/shapes.ts
6 1 3
6 7 2