microsoft / azuredatastudio-postgresql
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 75 units with 1,227 lines of code in units (93.0% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (358 lines of code)
    • 10 medium size units (314 lines of code)
    • 25 small units (375 lines of code)
    • 36 very small units (180 lines of code)
0% | 29% | 25% | 30% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 30% | 26% | 29% | 13%
js0% | 0% | 0% | 54% | 45%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 30% | 26% | 29% | 13%
tasks0% | 0% | 0% | 54% | 45%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
97 16 1
96 16 1
totalTime: String()
in src/main.ts
95 16 1
70 6 1
48 8 1
39 9 3
34 7 0
32 1 3
31 7 3
private parseDiagnostics()
in src/commandObserver.ts
29 7 1
27 6 0
27 6 1
function readXML()
in src/commonHelper.ts
25 15 3
22 5 0
prompt: localize()
in src/commands.ts
20 8 2
function updateProjects()
in src/commonHelper.ts
20 3 3
20 4 3
20 8 3
19 4 2
18 2 0