microsoft / VisualProfiler-Unity
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 21 units with 418 lines of code in units (66.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (150 lines of code)
    • 2 medium size units (77 lines of code)
    • 8 small units (130 lines of code)
    • 9 very small units (61 lines of code)
0% | 35% | 18% | 31% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 35% | 18% | 31% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 35% | 18% | 31% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void LateUpdate()
in VisualProfiler.cs
92 22 0
private void BuildWindow()
in VisualProfiler.cs
58 2 0
private void Reset()
in VisualProfiler.cs
50 6 0
27 4 5
20 3 0
19 9 1
17 3 1
17 1 7
16 9 1
16 3 3
14 2 4
11 1 4
9 1 1
private void OnDestroy()
in VisualProfiler.cs
8 2 0
8 1 2
8 1 2
private void Start()
in VisualProfiler.cs
7 1 0
7 1 3
6 1 0
4 1 1