microsoft / pxt-neopixel
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 19 units with 209 lines of code in units (49.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (81 lines of code)
    • 5 small units (73 lines of code)
    • 12 very small units (55 lines of code)
0% | 0% | 38% | 34% | 26%
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% | 38% | 34% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 38% | 34% | 26%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
showRainbow()
in neopixel.ts
47 7 2
export function hsl()
in neopixel.ts
34 7 3
private setPixelRGB()
in neopixel.ts
17 5 2
private setAllRGB()
in neopixel.ts
16 4 1
private setAllW()
in neopixel.ts
14 4 1
private setPixelW()
in neopixel.ts
14 5 2
12 3 3
setMatrixColor()
in neopixel.ts
10 4 3
10 2 4
showColor()
in neopixel.ts
5 1 1
function unpackR()
in neopixel.ts
4 1 1
function unpackG()
in neopixel.ts
4 1 1
function unpackB()
in neopixel.ts
4 1 1
setMatrixWidth()
in neopixel.ts
3 1 1
show()
in neopixel.ts
3 1 0
length()
in neopixel.ts
3 1 0
export function rgb()
in neopixel.ts
3 1 3
3 1 1
function packRGB()
in neopixel.ts
3 1 3