microsoft / powerbi-visuals-globemap
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 170 units with 2,382 lines of code in units (81.4% of code).
    • 1 very long units (214 lines of code)
    • 6 long units (372 lines of code)
    • 22 medium size units (701 lines of code)
    • 39 small units (588 lines of code)
    • 102 very small units (507 lines of code)
8% | 15% | 29% | 24% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts11% | 15% | 30% | 23% | 19%
js0% | 15% | 25% | 29% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src15% | 21% | 27% | 19% | 15%
src/lib0% | 15% | 25% | 29% | 29%
src/geocoder0% | 0% | 40% | 31% | 28%
src/UrlUtils0% | 0% | 0% | 64% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static converter()
in src/globemap.ts
214 82 3
79 26 1
70 5 0
THREE.OrbitControls = function()
in src/lib/OrbitControls.js
68 3 2
private initRayCaster()
in src/globemap.ts
53 10 0
private initScene()
in src/globemap.ts
51 6 0
private intersectBars()
in src/globemap.ts
51 15 0
public getUrl()
in src/geocoder/geocoder.ts
49 16 0
constructor()
in src/globemap.ts
47 5 3
this.update = function()
in src/lib/OrbitControls.js
46 7 0
private renderMagic()
in src/globemap.ts
44 15 0
private animateCamera()
in src/globemap.ts
42 6 2
public getCoordinates()
in src/geocoder/geocodingCache.ts
37 5 1
public destroy()
in src/globemap.ts
36 7 0
public getResult()
in src/geocoder/geocoder.ts
33 11 1
33 11 8
33 7 3
private registerInMemory()
in src/geocoder/geocodingCache.ts
31 8 2
31 6 1
public update()
in src/globemap.ts
27 11 1