microsoft / MSIX-Toolkit
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 340 units with 3,634 lines of code in units (36.1% of code).
    • 1 very long units (288 lines of code)
    • 1 long units (58 lines of code)
    • 39 medium size units (1,151 lines of code)
    • 60 small units (874 lines of code)
    • 239 very small units (1,263 lines of code)
7% | 1% | 31% | 24% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs7% | 1% | 31% | 24% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AppInstallerFileBuilder/AppInstallerFileBuilder/Views22% | 4% | 27% | 13% | 31%
AppInstallerFileBuilder/AppInstallerFileBuilderLib/AppxPackaging0% | 0% | 53% | 23% | 23%
AppInstallerFileBuilder/AppInstallerFileBuilderLib/Logger0% | 0% | 20% | 33% | 45%
AppInstallerFileBuilder/AppInstallerFileBuilderLib/IO0% | 0% | 41% | 35% | 23%
AppInstallerFileBuilder/AppInstallerFileBuilder0% | 0% | 63% | 17% | 19%
AppInstallerFileBuilder/AppInstallerFileBuilder/Controls0% | 0% | 34% | 50% | 14%
AppInstallerFileBuilder/AppInstallerFileBuilderLib/AppxPackagingInterop0% | 0% | 100% | 0% | 0%
AppInstallerFileBuilder/AppInstallerFileBuilder/Model0% | 0% | 0% | 10% | 89%
AppInstallerFileBuilder/AppInstallerFileBuilder/Converters0% | 0% | 0% | 73% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private async void Generate_File_Button_Click()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/GenerateXMLView.xaml.cs
288 44 2
private bool _validateInput()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/GenerateXMLView.xaml.cs
58 31 0
private async void PackageInfoButton_Click()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/MainPackageView.xaml.cs
49 7 2
private static IStream CreateStreamOnFile()
in AppInstallerFileBuilder/AppInstallerFileBuilderLib/IO/StreamUtils.cs
49 8 5
public AppxMetadata()
in AppInstallerFileBuilder/AppInstallerFileBuilderLib/AppxPackaging/AppxMetadata.cs
43 4 1
private void AppShell_KeyDown()
in AppInstallerFileBuilder/AppInstallerFileBuilder/AppShell.xaml.cs
40 19 2
public AppxMetadata()
in AppInstallerFileBuilder/AppInstallerFileBuilderLib/AppxPackaging/AppxMetadata.cs
40 3 1
private async void PackageInfoButton_Click()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/DependenciesView.xaml.cs
38 7 2
private void CompatComboBox_SelectionChanged()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/MainPackageView.xaml.cs
38 4 2
private async void PackageInfoButton_Click()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/ModificationPackageView.xaml.cs
38 7 2
private async void PackageInfoButton_Click()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/OptionalPackagesView.xaml.cs
38 7 2
private async void PackageInfoButton_Click()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/RelatedPackagesView.xaml.cs
38 7 2
private void PopulateOptionalAppxPackagesAndBundles()
in AppInstallerFileBuilder/AppInstallerFileBuilderLib/AppxPackaging/AppxBundleMetadata.cs
32 4 0
void EncryptPackage()
in AppInstallerFileBuilder/AppInstallerFileBuilderLib/AppxPackagingInterop/IAppxEncryptionFactory.cs
32 1 5
private void _save()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/MainPackageView.xaml.cs
30 13 0
public static void CopyResourceToFile()
in AppInstallerFileBuilder/AppInstallerFileBuilderLib/IO/FileSystemUtils.cs
30 6 3
public AppShell()
in AppInstallerFileBuilder/AppInstallerFileBuilder/AppShell.xaml.cs
28 1 0
public NavMenuListView()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Controls/NavMenuListView.cs
28 4 0
private async void _displaySuccessDialog()
in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/GenerateXMLView.xaml.cs
28 3 1
protected override void OnLaunched()
in AppInstallerFileBuilder/AppInstallerFileBuilder/App.xaml.cs
27 5 1