microsoft / Windows-appsample-trafficapp
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 59 units with 613 lines of code in units (53.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (184 lines of code)
    • 13 small units (186 lines of code)
    • 39 very small units (243 lines of code)
0% | 0% | 30% | 30% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 0% | 30% | 30% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
LocationHelper0% | 0% | 45% | 19% | 35%
TrafficApp0% | 0% | 23% | 35% | 41%
TrafficMonitor0% | 0% | 0% | 100% | 0%
TrafficApp/Common0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static async Task UpdateTravelInfoAsync()
in LocationHelper/LocationHelper.cs
33 7 2
private async Task SaveAsync()
in TrafficApp/MainPage.xaml.cs
33 10 1
public static async Task GetCurrentLocationAsync()
in LocationHelper/LocationHelper.cs
27 5 0
private async Task ResetViewAsync()
in TrafficApp/MainPage.xaml.cs
26 12 1
private async void Geolocator_StatusChanged()
in TrafficApp/MainPage.xaml.cs
23 7 2
21 4 2
21 9 2
protected override void OnLaunched()
in TrafficApp/App.xaml.cs
19 4 1
public async void Run()
in TrafficMonitor/TrafficMonitor.cs
19 2 1
public static async Task SaveLocationDataAsync()
in LocationHelper/LocationDataStore.cs
16 1 1
15 4 4
private void ToggleLocationsPaneVisibility()
in TrafficApp/MainPage.xaml.cs
15 2 0
private async void InputMap_MapTapped()
in TrafficApp/MainPage.xaml.cs
15 1 2
public MainPage()
in TrafficApp/MainPage.xaml.cs
14 6 0
private void Flyout_Closed()
in TrafficApp/MainPage.xaml.cs
14 4 2
13 3 0
protected override async void OnNavigatedTo()
in TrafficApp/MainPage.xaml.cs
12 4 1
private void EnterMapSelectionMode()
in TrafficApp/MainPage.xaml.cs
12 1 2
private async void AddCurrentLocation_Click()
in TrafficApp/MainPage.xaml.cs
11 2 2
private void DisableMapSelection()
in TrafficApp/MainPage.xaml.cs
11 1 0