microsoft / TestAdapterForGoogleTest
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 527 units with 5,860 lines of code in units (42.9% of code).
    • 2 very long units (221 lines of code)
    • 5 long units (326 lines of code)
    • 59 medium size units (1,677 lines of code)
    • 132 small units (1,886 lines of code)
    • 329 very small units (1,750 lines of code)
3% | 5% | 28% | 32% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs3% | 5% | 28% | 31% | 30%
h0% | 0% | 59% | 40% | 0%
cpp0% | 0% | 0% | 32% | 67%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
GoogleTestAdapter/VsPackage.GTA28% | 16% | 10% | 24% | 20%
GoogleTestAdapter/NewProjectWizard40% | 0% | 8% | 23% | 27%
GoogleTestAdapter/Core0% | 6% | 37% | 28% | 26%
GoogleTestAdapter/VsPackage.Shared0% | 14% | 19% | 28% | 37%
GoogleTestAdapter/TestAdapter0% | 0% | 25% | 46% | 28%
GoogleTestAdapter/Tests.Common0% | 0% | 30% | 25% | 44%
GoogleTestAdapter/DiaResolver0% | 0% | 16% | 54% | 29%
GoogleTestAdapter/Common0% | 0% | 16% | 27% | 55%
SampleTests/DllProject0% | 0% | 0% | 78% | 21%
GoogleTestAdapter/TenSecondsWaiter0% | 0% | 0% | 100% | 0%
GoogleTestAdapter/CrashingExe0% | 0% | 0% | 0% | 100%
GoogleTestAdapter/FailingExe0% | 0% | 0% | 0% | 100%
GoogleTestAdapter/SemaphoreExe0% | 0% | 0% | 0% | 100%
GoogleTestAdapter/FakeGtestDll0% | 0% | 0% | 0% | 100%
SampleTests/LibProject0% | 0% | 0% | 0% | 100%
GoogleTestAdapter/UnicodeNameExe0% | 0% | 0% | 0% | 100%
GoogleTestAdapter/VsPackage.TAfGT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in GoogleTestAdapter/VsPackage.GTA/ReleaseNotes/ReleaseNotesDialog.Designer.cs
119 1 0
public void RunStarted()
in GoogleTestAdapter/NewProjectWizard/WizardImplementation.cs
102 15 4
private IList NewCreateTestcases()
in GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs
82 8 2
public override void Register()
in GoogleTestAdapter/VsPackage.GTA/AsyncPackage/AsyncPackageRegistrationAttribute.cs
69 14 1
private TestResult CreateTestResult()
in GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs
62 14 0
public IXPathNavigable AddRunSettings()
in GoogleTestAdapter/VsPackage.Shared/Settings/RunSettingsService.cs
59 8 3
public void RunTests()
in GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs
54 7 7
private int LaunchProcess()
in GoogleTestAdapter/Core/Helpers/ProcessLauncher.cs
50 8 7
public void ExecuteWithSettingsForExecutable()
in GoogleTestAdapter/Core/Settings/SettingsWrapper.cs
47 5 3
public IList CreateTestCases()
in GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs
47 9 1
private TestResult CreateTestResult()
in GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs
42 11 1
public static RunSettingsContainer LoadFromXml()
in GoogleTestAdapter/TestAdapter/Settings/RunSettingsContainer.cs
42 6 1
private List RunTestExecutableWithNewFramework()
in GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs
41 9 6
private TestResult ParseTestResult()
in GoogleTestAdapter/Core/TestResults/XmlTestResultParser.cs
41 5 1
public void RunTestsAndCheckOutput()
in GoogleTestAdapter/Tests.Common/ResultChecker/TrxResultChecker.cs
38 7 3
private static PROCESS_INFORMATION CreateProcess()
in GoogleTestAdapter/Core/Helpers/ProcessExecutor.cs
37 4 6
private IEnumerable GetFinalCommandLines()
in GoogleTestAdapter/Core/Runners/CommandLineGenerator.cs
37 4 1
private void RunTestsFromExecutable()
in GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs
37 7 8
public void PrintStatisticsToDebugOutput()
in GoogleTestAdapter/Core/Scheduling/SchedulingAnalyzer.cs
33 4 0
public void CheckResults()
in GoogleTestAdapter/Tests.Common/ResultChecker/ResultChecker.cs
33 5 3