microsoft / vs-extension-testing
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 253 units with 3,364 lines of code in units (49.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (508 lines of code)
    • 1 medium complex units (67 lines of code)
    • 14 simple units (551 lines of code)
    • 237 very simple units (2,238 lines of code)
0% | 15% | 1% | 16% | 66%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs0% | 15% | 1% | 16% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Microsoft.VisualStudio.Extensibility.Testing.SourceGenerator0% | 71% | 0% | 0% | 28%
src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared0% | 0% | 2% | 21% | 75%
src/Microsoft.VisualStudio.VsixInstaller.Shared0% | 0% | 0% | 85% | 14%
src/Microsoft.VisualStudio.IntegrationTestService.Shared0% | 0% | 0% | 0% | 100%
src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.IntegrationTests.Shared0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void Initialize()
in src/Microsoft.VisualStudio.Extensibility.Testing.SourceGenerator/TestServicesSourceGenerator.cs
508 40 1
private static DTE? GetDebuggerHostDte()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/VisualStudioInstance.cs
67 12 0
protected override async Task RunTestCollectionAsync()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/IdeTestAssemblyRunner.cs
80 9 4
public bool OnMessage()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/IdeTestAssemblyRunner.cs
47 9 1
internal static string GetIdeState()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/InProcess/VisualStudio_InProc.cs
37 9 0
internal static void TryWriteWatsonEntriesToFile()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/EventLogCollector.cs
56 8 1
private static bool TrySetForegroundWindow()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/InProcess/VisualStudio_InProc.cs
37 8 1
internal static void TryWriteDotNetEntriesToFile()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/EventLogCollector.cs
43 7 1
public override bool Equals()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/FeedbackItemWatsonEntry.cs
13 7 1
private static Version GetVersion()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/IdeTestAssemblyRunner.cs
20 7 1
internal static bool IsInstalled()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Threading/IdeTestCaseBase.cs
31 7 1
protected override async Task InvokeTestMethodAsync()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Threading/InProcessIdeTestInvoker.cs
56 7 1
private static bool IsValidWatsonEntry()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/EventLogCollector.cs
12 6 1
public static DTE? TryLocateDteForProcess()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/IntegrationHelper.cs
35 6 1
protected override Task BeforeTestMethodInvokedAsync()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Threading/InProcessIdeTestInvoker.cs
42 6 0
public static void Install()
in src/Microsoft.VisualStudio.VsixInstaller.Shared/Installer.cs
42 6 3
private static string CreateLogFileName()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/DataCollectionService.cs
21 5 6
private static bool IsLastDayOrLastFiveRecentEntry()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/EventLogCollector.cs
10 5 2
private static bool IsValidDotNetEntry()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/EventLogCollector.cs
17 5 2
private object? GetService()
in src/Microsoft.VisualStudio.Extensibility.Testing.Xunit.Shared/Harness/ServiceProvider.cs
27 5 1