microsoft / MTC_WindowsSmartInk
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 219 units with 2,325 lines of code in units (40.8% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (170 lines of code)
    • 20 medium size units (635 lines of code)
    • 43 small units (629 lines of code)
    • 153 very small units (891 lines of code)
0% | 7% | 27% | 27% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 7% | 27% | 27% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
SmartInkLaboratory/ViewModels0% | 16% | 41% | 20% | 22%
EBC_InkDemo/Views0% | 31% | 17% | 20% | 31%
SmartInkLaboratory0% | 0% | 49% | 22% | 28%
Microsoft.MTC.SmartInk0% | 0% | 15% | 42% | 41%
Microsoft.MTC.SmartInk/Extensions0% | 0% | 54% | 28% | 17%
SmartInkLaboratory/Services0% | 0% | 13% | 31% | 54%
SmartInkLaboratory/AI0% | 0% | 56% | 0% | 43%
EBC_InkDemo0% | 0% | 60% | 0% | 40%
SmartInkLaboratory/Views0% | 0% | 0% | 31% | 68%
EBC_InkDemo/ViewModels0% | 0% | 0% | 32% | 67%
EBC_InkDemo/Converters0% | 0% | 0% | 0% | 100%
EBC_InkDemo/Extensions0% | 0% | 0% | 0% | 100%
SmartInkLaboratory/Extensions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public TrainViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/TrainViewModel.cs
59 8 4
public MainPage()
in WindowsSmartInk/EBC_InkDemo/Views/MainPage.xaml.cs
56 5 0
public TestViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/TestViewModel.cs
55 7 3
public async Task PublishPackageAsync()
in WindowsSmartInk/Microsoft.MTC.SmartInk/PackageManager.cs
47 4 2
public PackageManagerViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/PackageManagerViewModel.cs
44 4 4
public MainPage()
in WindowsSmartInk/SmartInkLaboratory/MainPage.xaml.cs
43 5 0
public IconMapViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/IconMapViewModel.cs
43 9 1
public ProjectsViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/ProjectsViewModel.cs
39 5 3
public ResourceKeysViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/ResourceKeysViewModel.cs
37 6 5
public static SoftwareBitmap DrawInk()
in WindowsSmartInk/Microsoft.MTC.SmartInk/Extensions/InkStrokeCollectionExtensions.cs
35 5 5
public NewPackageViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/NewPackageViewModel.cs
35 5 4
public ImageTagsViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/ImageTagsViewModel.cs
33 4 2
private async Task PlaceIconAsync()
in WindowsSmartInk/EBC_InkDemo/Views/MainPage.xaml.cs
31 4 3
private async Task PlaceIconAsync()
in WindowsSmartInk/SmartInkLaboratory/MainPage.xaml.cs
30 4 3
public ViewModelLocator()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/Locator.cs
30 1 0
private static IList ScaleAndTransformStrokes()
in WindowsSmartInk/Microsoft.MTC.SmartInk/Extensions/InkStrokeCollectionExtensions.cs
27 5 3
public async Task GetModuleDownloadUriAsync()
in WindowsSmartInk/SmartInkLaboratory/Services/CustomVisionTrainingService.cs
27 4 1
public Task TrainCurrentIterationAsync()
in WindowsSmartInk/SmartInkLaboratory/Services/CustomVisionTrainingService.cs
25 4 0
private async Task HandleDownloadAsync()
in WindowsSmartInk/Microsoft.MTC.SmartInk/PackageManager.cs
24 4 2
public OpenPackageViewModel()
in WindowsSmartInk/SmartInkLaboratory/ViewModels/OpenPackageViewModel.cs
22 4 3