microsoft / MTC_ComeSayHi
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 64 units with 1,006 lines of code in units (48.7% of code).
    • 2 very long units (232 lines of code)
    • 3 long units (187 lines of code)
    • 7 medium size units (209 lines of code)
    • 10 small units (162 lines of code)
    • 42 very small units (216 lines of code)
23% | 18% | 20% | 16% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs23% | 18% | 20% | 16% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/CognitiveKioskUWP/Controls44% | 26% | 11% | 6% | 11%
src/CognitiveKioskUWP14% | 15% | 24% | 19% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public void UpdateEvent()
in src/CognitiveKioskUWP/Controls/Faces.xaml.cs
130 22 1
private async Task ProcessImage()
in src/CognitiveKioskUWP/MainPage.xaml.cs
102 11 1
public void UpdateEvent()
in src/CognitiveKioskUWP/Controls/Captions.xaml.cs
77 19 1
private async Task StartSpeechTranslation()
in src/CognitiveKioskUWP/MainPage.xaml.cs
57 6 0
private async Task StartPreviewAsync()
in src/CognitiveKioskUWP/MainPage.xaml.cs
53 4 0
public void SetUserInfo()
in src/CognitiveKioskUWP/AgeControl.xaml.cs
50 10 4
public void UpdateEvent()
in src/CognitiveKioskUWP/Controls/Tags.xaml.cs
34 8 1
private async Task StopMediaCapture()
in src/CognitiveKioskUWP/MainPage.xaml.cs
31 5 0
protected async override void OnNavigatedTo()
in src/CognitiveKioskUWP/SettingsPage.xaml.cs
25 1 1
private async void _faceDetectionEffect_FaceDetectedAsync()
in src/CognitiveKioskUWP/MainPage.xaml.cs
24 5 2
protected override void OnLaunched()
in src/CognitiveKioskUWP/App.xaml.cs
23 5 1
private async void TimerTakePicture_Tick()
in src/CognitiveKioskUWP/MainPage.xaml.cs
22 4 2
public void UpdateEvent()
in src/CognitiveKioskUWP/Controls/Speech.xaml.cs
20 4 1
protected async override void OnNavigatedTo()
in src/CognitiveKioskUWP/MainPage.xaml.cs
18 1 1
private async Task TakeImage()
in src/CognitiveKioskUWP/MainPage.xaml.cs
18 2 0
private void UpdateWithAnalysis()
in src/CognitiveKioskUWP/MainPage.xaml.cs
18 3 2
private void TimerFace_Tick()
in src/CognitiveKioskUWP/MainPage.xaml.cs
17 3 2
private async Task ActivateUI()
in src/CognitiveKioskUWP/MainPage.xaml.cs
16 2 0
private void DisableUI()
in src/CognitiveKioskUWP/MainPage.xaml.cs
14 3 0
private void UpdateTranslationUI()
in src/CognitiveKioskUWP/MainPage.xaml.cs
14 2 2