microsoft / ProtocolTestFramework
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 463 units with 6,609 lines of code in units (68.1% of code).
    • 0 very long units (0 lines of code)
    • 15 long units (1,069 lines of code)
    • 83 medium size units (2,569 lines of code)
    • 113 small units (1,604 lines of code)
    • 252 very small units (1,367 lines of code)
0% | 16% | 38% | 24% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 16% | 38% | 24% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/TestFramework/Core/Adapters0% | 35% | 36% | 14% | 13%
src/TestFramework/Core0% | 17% | 35% | 28% | 19%
src/TestFramework.AdapterConsole0% | 31% | 26% | 26% | 15%
src/TestFramework/VSTS0% | 11% | 41% | 26% | 21%
src/TestFramework/Core/Logging0% | 4% | 46% | 25% | 23%
src/PTFTestLogger0% | 16% | 17% | 48% | 17%
src/TestFramework/VSTS/Checking0% | 0% | 63% | 6% | 29%
src/TestFramework/Messages0% | 0% | 39% | 21% | 38%
src/TestFramework/Core/Attributes0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private XmlDocument MergeConfigFiles()
in src/TestFramework/Core/ConfigurationReader.cs
96 14 1
public virtual T GetAdapter()
in src/TestFramework/Core/DefaultTestSite.cs
86 15 0
protected override object ExecuteMethod()
in src/TestFramework/Core/Adapters/PowerShellAdapterProxy.cs
85 14 2
private static void MergePropertyAndGroup()
in src/TestFramework/Core/ConfigurationReader.cs
85 20 3
protected override object ExecuteMethod()
in src/TestFramework/Core/Adapters/ShellAdapterProxy.cs
79 12 2
internal static object ParseResult()
in src/TestFramework.AdapterConsole/ConsoleHelper.cs
71 12 2
internal static object ParseResult()
in src/TestFramework/Core/Adapters/AdapterProxyHelpers.cs
71 12 2
private int Expect()
in src/TestFramework/Core/ProtocolTestsManager.cs
71 13 6
void CaptureRequirementIfAreEqual()
in src/TestFramework/Core/ITestSite.cs
67 1 6
protected override object ExecuteMethod()
in src/TestFramework/Core/Adapters/ManagedAdapterBase.cs
66 8 2
private PSParameterBuilder InvokeScript()
in src/TestFramework/Core/Adapters/PowerShellAdapterProxy.cs
66 7 4
private int InvokeScript()
in src/TestFramework/Core/Adapters/ShellAdapterProxy.cs
64 8 2
public void SetSwitch()
in src/TestFramework/VSTS/PtfTestClassBase.cs
56 12 2
private static string CreateUniqueFileName()
in src/TestFramework/Core/Logging/LogProfileParser.cs
55 8 2
private List GetCaptureFilesPath()
in src/PTFTestLogger/TxtToJSON.cs
51 14 0
private void MergeXmlDocument()
in src/TestFramework/Core/ConfigurationReader.cs
49 7 2
private Dictionary CreateLogInformationBag()
in src/TestFramework/Core/Logging/Logger.cs
46 8 3
private static Type ResolveTypeByLoadAssembly()
in src/TestFramework/Core/TestToolHelpers.cs
46 7 2
private static void AppendOrOverrideChild()
in src/TestFramework/Core/ConfigurationReader.cs
45 9 3
protected virtual void Dispose()
in src/TestFramework/Core/Logging/Logger.cs
45 6 1