microsoft / appcenter-sdk-dotnet
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 1,669 units with 16,623 lines of code in units (59.1% of code).
    • 4 very long units (1,610 lines of code)
    • 9 long units (508 lines of code)
    • 142 medium size units (4,069 lines of code)
    • 327 small units (4,520 lines of code)
    • 1,187 very small units (5,916 lines of code)
9% | 3% | 24% | 27% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs10% | 3% | 24% | 26% | 35%
cake0% | 0% | 31% | 36% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Apps/Contoso.WinForms.Puppet.DotNetCore62% | 0% | 4% | 16% | 16%
Apps/Contoso.WinForms.Demo.DotNetCore62% | 0% | 4% | 16% | 16%
Apps/Contoso.WinForms.Puppet62% | 0% | 3% | 16% | 17%
Apps/Contoso.WinForms.Demo62% | 0% | 3% | 16% | 17%
SDK/AppCenter0% | 4% | 34% | 26% | 34%
SDK/AppCenterCrashes0% | 5% | 27% | 36% | 30%
Apps/Contoso.Forms.Puppet0% | 5% | 24% | 31% | 37%
Apps/Contoso.Forms.Demo0% | 5% | 25% | 32% | 37%
Apps/Contoso.Android.Puppet0% | 9% | 18% | 35% | 36%
Apps/Contoso.WinUI.Desktop.Puppet0% | 0% | 35% | 18% | 45%
Apps/Contoso.WinUI.Desktop.Demo0% | 0% | 35% | 18% | 45%
ROOT0% | 0% | 44% | 27% | 28%
Apps/Contoso.WPF.Puppet.DotNetCore0% | 0% | 30% | 23% | 46%
Apps/Contoso.WPF.Demo.DotNetCore0% | 0% | 30% | 23% | 46%
Apps/Contoso.WPF.Puppet0% | 0% | 29% | 23% | 47%
Apps/Contoso.WPF.Demo0% | 0% | 29% | 23% | 47%
Apps/Contoso.UWP.Puppet0% | 0% | 49% | 17% | 32%
Apps/Contoso.UWP.Demo0% | 0% | 50% | 17% | 32%
Apps/Contoso.iOS.Puppet0% | 0% | 14% | 33% | 52%
SDK/AppCenterDistribute0% | 0% | 14% | 27% | 58%
scripts/configuration0% | 0% | 21% | 57% | 21%
SDK/AppCenterAnalytics0% | 0% | 5% | 36% | 58%
Apps/Contoso.MacOS.Puppet0% | 0% | 0% | 38% | 61%
scripts0% | 0% | 0% | 24% | 75%
Apps/Contoso.UtilClassLibrary0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in Apps/Contoso.WinForms.Demo.DotNetCore/MainForm.Designer.cs
408 1 0
private void InitializeComponent()
in Apps/Contoso.WinForms.Puppet.DotNetCore/MainForm.Designer.cs
408 1 0
private void InitializeComponent()
in Apps/Contoso.WinForms.Demo/MainForm.Designer.cs
397 1 0
private void InitializeComponent()
in Apps/Contoso.WinForms.Puppet/MainForm.Designer.cs
397 1 0
protected override void OnStart()
in Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs
72 15 0
protected override void OnStart()
in Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs
66 14 0
internal static string GetSecretAndTargetForPlatform()
in SDK/AppCenter/Microsoft.AppCenter.Shared/AppCenter.cs
58 15 2
private static ModelException ProcessException()
in SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Utils/ErrorLogHelperPart.cs
54 13 3
private void Suspend()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs
53 9 4
private async Task TriggerIngestionAsync()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs
52 8 1
protected override void OnCreate()
in Apps/Contoso.Android.Puppet/MainActivity.cs
51 3 1
private void CheckPendingLogsInternal()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs
51 9 1
private Task ProcessPendingErrorsAsync()
in SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Windows.Shared/Crashes.cs
51 11 0
public App()
in Apps/Contoso.WinUI.Desktop.Puppet/Contoso.WinUI.Desktop.Puppet/App.xaml.cs
50 7 0
public Task GetLogsAsync()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs
50 5 3
public App()
in Apps/Contoso.WinUI.Desktop.Demo/Contoso.WinUI.Desktop.Demo/App.xaml.cs
49 7 0
internal void StartInstance()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/AppCenter.cs
49 10 1
public bool SetMaxStorageSize()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/StorageAdapter.cs
45 6 1
public static IDictionary ValidateProperties()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/PropertyValidator.cs
45 8 2
public async Task SendAsync()
in SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/HttpNetworkAdapter.cs
44 8 5