microsoft / vssetup.powershell
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 54 units with 692 lines of code in units (43.1% of code).
    • 1 very long units (123 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (123 lines of code)
    • 17 small units (269 lines of code)
    • 31 very small units (177 lines of code)
17% | 0% | 17% | 38% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs17% | 0% | 17% | 38% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/VSSetup.PowerShell28% | 0% | 10% | 33% | 27%
src/VSSetup.PowerShell/PowerShell0% | 0% | 29% | 48% | 22%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
internal Instance()
in src/VSSetup.PowerShell/Instance.cs
123 6 1
protected override void ProcessRecord()
in src/VSSetup.PowerShell/PowerShell/GetInstanceCommand.cs
34 6 0
public static bool TryFromComObject()
in src/VSSetup.PowerShell/Module.cs
25 4 2
public override object GetPropertyValue()
in src/VSSetup.PowerShell/PowerShell/InstanceAdapter.cs
22 5 1
public int Compare()
in src/VSSetup.PowerShell/InstanceComparer.cs
21 5 2
public static bool ContainsAny()
in src/VSSetup.PowerShell/PowerShell/Extensions.cs
21 4 4
public static ReadOnlyCollection TrySetCollection()
in src/VSSetup.PowerShell/Utilities.cs
20 3 5
public static extern int GetModuleFileName()
in src/VSSetup.PowerShell/NativeMethods.cs
19 1 3
internal PackageReference()
in src/VSSetup.PowerShell/PackageReference.cs
19 2 1
private void EnsureProperties()
in src/VSSetup.PowerShell/PowerShell/InstanceAdapter.cs
19 3 1
public static T GetPropertyValue()
in src/VSSetup.PowerShell/PowerShell/Extensions.cs
18 3 3
public static bool TryParseVersion()
in src/VSSetup.PowerShell/Utilities.cs
18 3 2
public static bool ContainsAll()
in src/VSSetup.PowerShell/PowerShell/Extensions.cs
17 3 4
private static int Compare()
in src/VSSetup.PowerShell/InstanceComparer.cs
16 4 2
private IEnumerable GetInstances()
in src/VSSetup.PowerShell/PowerShell/GetInstanceCommand.cs
16 4 0
private static Version TryGetQueryVersion()
in src/VSSetup.PowerShell/PowerShell/VersionTable.cs
15 3 0
public static ISetupConfiguration2 Create()
in src/VSSetup.PowerShell/QueryFactory.cs
15 3 0
public override PSAdaptedProperty GetProperty()
in src/VSSetup.PowerShell/PowerShell/InstanceAdapter.cs
14 3 2
public VersionTable()
in src/VSSetup.PowerShell/PowerShell/VersionTable.cs
14 1 0
private static IEnumerable YieldAdaptedPackages()
in src/VSSetup.PowerShell/Utilities.cs
14 4 2