microsoft / SDCM
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 11 units with 1,002 lines of code in units (57.1% of code).
    • 1 very long units (866 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (72 lines of code)
    • 2 small units (37 lines of code)
    • 5 very small units (27 lines of code)
86% | 0% | 7% | 3% | 2%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs86% | 0% | 7% | 3% | 2%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
SurfaceDevCenterManager91% | 0% | 5% | 1% | 1%
SurfaceDevCenterManager/Utility0% | 0% | 43% | 37% | 18%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
private static async Task MainAsync()
in SurfaceDevCenterManager/Program.cs
866 137 1
private static void DevCenterErrorDetailsDump()
in SurfaceDevCenterManager/Program.cs
25 5 1
private static int Main()
in SurfaceDevCenterManager/Program.cs
24 3 1
private static string GetCredential()
in SurfaceDevCenterManager/Utility/DevCenterCredentialsHandler.cs
23 4 0
private static bool SetCredential()
in SurfaceDevCenterManager/Utility/DevCenterCredentialsHandler.cs
20 3 1
17 4 1
private static void ShowHelp()
in SurfaceDevCenterManager/Program.cs
8 1 1
private static void ErrorParsingOptions()
in SurfaceDevCenterManager/Program.cs
5 1 1
private static string GetSdcmBinPath()
in SurfaceDevCenterManager/Utility/DevCenterCredentialsHandler.cs
5 1 0
private static bool DeleteCredential()
in SurfaceDevCenterManager/Utility/DevCenterCredentialsHandler.cs
5 1 0
public static void LastCommandSet()
in SurfaceDevCenterManager/Program.cs
4 1 1