microsoft / Windows-AppConsult-Samples-UWP
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 126 units with 1,209 lines of code in units (34.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 18 medium size units (457 lines of code)
    • 18 small units (260 lines of code)
    • 90 very small units (492 lines of code)
0% | 0% | 37% | 21% | 40%
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% | 42% | 22% | 35%
java0% | 0% | 0% | 30% | 69%
cpp0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
UWP-Advanced-Inking/UnprocessedInput0% | 0% | 61% | 20% | 18%
UWP-Advanced-Inking/XAMLShapesAdvancedManipulations0% | 0% | 41% | 21% | 36%
PlaneIdentifier/PlaneIdentifier0% | 0% | 63% | 0% | 36%
UWP-Advanced-Inking/XAMLShapesLineCurving0% | 0% | 28% | 44% | 26%
UWP-Advanced-Inking/CurveALine0% | 0% | 65% | 0% | 34%
PlaneIdentifier/PlaneIdentifier.Desktop0% | 0% | 37% | 25% | 36%
UWP-Advanced-Inking/XAMLShapesManipulations0% | 0% | 22% | 29% | 47%
UWP-Advanced-Inking/StrokesToShapes0% | 0% | 32% | 16% | 50%
UWP-Advanced-Inking/InkingAndZoom0% | 0% | 50% | 0% | 50%
GeolocationSample/windows0% | 0% | 0% | 52% | 47%
GeolocationSample/android0% | 0% | 0% | 46% | 53%
NativeModulesSample/android0% | 0% | 0% | 0% | 100%
XamlIslands/ComplexCustomControl0% | 0% | 0% | 0% | 100%
NativeModulesSample0% | 0% | 0% | 0% | 100%
GeolocationSample/ios0% | 0% | 0% | 0% | 100%
NativeModulesSample/windows0% | 0% | 0% | 0% | 100%
GeolocationSample0% | 0% | 0% | 0% | 100%
XamlIslands/SimpleCustomControl0% | 0% | 0% | 0% | 100%
NativeModulesSample/ios0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void FindIntersection()
in UWP-Advanced-Inking/UnprocessedInput/UnprocessedInput/MainPage.xaml.cs
50 9 9
private void Line_Tapped()
in UWP-Advanced-Inking/XAMLShapesAdvancedManipulations/XAMLShapesAdvancedManipulations/MainPage.xaml.cs
35 1 2
private void UnprocessedInput_PointerReleased()
in UWP-Advanced-Inking/UnprocessedInput/UnprocessedInput/MainPage.xaml.cs
32 4 2
private async Task EvaluateVideoFrameAsync()
in PlaneIdentifier/PlaneIdentifier.Desktop/MainWindow.xaml.cs
28 4 1
private async Task EvaluateVideoFrameAsync()
in PlaneIdentifier/PlaneIdentifier/MainPage.xaml.cs
28 4 1
private void AnchorManipulationCompleted()
in UWP-Advanced-Inking/XAMLShapesAdvancedManipulations/XAMLShapesAdvancedManipulations/MainPage.xaml.cs
26 2 3
private void Line_Tapped()
in UWP-Advanced-Inking/XAMLShapesLineCurving/XAMLShapesLineCurving/MainPage.xaml.cs
24 1 2
private void DrawABezierCurve()
in UWP-Advanced-Inking/CurveALine/CurveALine/MainPage.xaml.cs
23 1 0
private async void OnRecognize()
in PlaneIdentifier/PlaneIdentifier/MainPage.xaml.cs
22 1 2
protected override void OnLaunched()
in PlaneIdentifier/PlaneIdentifier/App.xaml.cs
21 5 1
protected override void OnLaunched()
in UWP-Advanced-Inking/CurveALine/CurveALine/App.xaml.cs
21 5 1
protected override void OnLaunched()
in UWP-Advanced-Inking/InkingAndZoom/InkingAndZoom/App.xaml.cs
21 5 1
protected override void OnLaunched()
in UWP-Advanced-Inking/StrokesToShapes/StrokesToShapes/App.xaml.cs
21 5 1
protected override void OnLaunched()
in UWP-Advanced-Inking/UnprocessedInput/UnprocessedInput/App.xaml.cs
21 5 1
private List CutTheLine()
in UWP-Advanced-Inking/UnprocessedInput/UnprocessedInput/MainPage.xaml.cs
21 1 2
protected override void OnLaunched()
in UWP-Advanced-Inking/XAMLShapesAdvancedManipulations/XAMLShapesAdvancedManipulations/App.xaml.cs
21 5 1
protected override void OnLaunched()
in UWP-Advanced-Inking/XAMLShapesLineCurving/XAMLShapesLineCurving/App.xaml.cs
21 5 1
protected override void OnLaunched()
in UWP-Advanced-Inking/XAMLShapesManipulations/XAMLShapesManipulations/App.xaml.cs
21 5 1
private static void initializeFlipper()
in GeolocationSample/android/app/src/main/java/com/geolocationsample/MainApplication.java
19 6 2
private async void OnRecognize()
in PlaneIdentifier/PlaneIdentifier.Desktop/MainWindow.xaml.cs
19 2 2