microsoft / HashCalculator
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 97 units with 1,253 lines of code in units (42.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (123 lines of code)
    • 14 medium size units (404 lines of code)
    • 25 small units (380 lines of code)
    • 56 very small units (346 lines of code)
0% | 9% | 32% | 30% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 9% | 32% | 30% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
HashCalculator/Controls0% | 15% | 34% | 27% | 23%
HashCalculator/Views0% | 11% | 33% | 21% | 33%
HashCalculator0% | 0% | 27% | 48% | 24%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
protected override void OnKeyDown()
in HashCalculator/Controls/NavMenuListView.cs
67 14 1
private async Task CheckAndUpdateAsync()
in HashCalculator/Views/PermutateHash.xaml.cs
56 15 1
protected override void OnLaunched()
in HashCalculator/App.xaml.cs
43 8 1
private void AppShell_KeyDown()
in HashCalculator/AppShell.xaml.cs
40 19 2
private void LoadState()
in HashCalculator/Views/CalculateHMACHash.xaml.cs
35 9 2
private async void PermutateHashes_Click()
in HashCalculator/Views/PermutateHash.xaml.cs
32 5 2
private void LoadState()
in HashCalculator/Views/CalculateHash.xaml.cs
31 8 2
private void CoreDispatcher_AcceleratorKeyActivated()
in HashCalculator/Controls/NavigationHelper.cs
28 19 2
public static async Task SaveAsync()
in HashCalculator/Controls/SuspensionManager.cs
27 4 0
public void OnNavigatedTo()
in HashCalculator/Controls/NavigationHelper.cs
26 5 1
public static async Task RestoreAsync()
in HashCalculator/Controls/SuspensionManager.cs
26 5 1
private void Extend_Click()
in HashCalculator/Views/TpmPcrs.xaml.cs
26 5 2
public NavMenuListView()
in HashCalculator/Controls/NavMenuListView.cs
23 4 0
private void LoadState()
in HashCalculator/Views/TpmPcrs.xaml.cs
23 7 2
public static Dictionary SessionStateForFrame()
in HashCalculator/Controls/SuspensionManager.cs
22 4 1
public Settings()
in HashCalculator/Views/Settings.xaml.cs
22 4 0
public AppShell()
in HashCalculator/AppShell.xaml.cs
20 1 0
private void OnNavigatingToPage()
in HashCalculator/AppShell.xaml.cs
20 8 2
public void SetSelectedItem()
in HashCalculator/Controls/NavMenuListView.cs
20 5 1
private void CheckTogglePaneButtonSizeChanged()
in HashCalculator/AppShell.xaml.cs
19 4 0