microsoft / vstest
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 2,611 units with 36,017 lines of code in units (35.4% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (964 lines of code)
    • 56 medium complex units (3,813 lines of code)
    • 231 simple units (8,375 lines of code)
    • 2,319 very simple units (22,865 lines of code)
0% | 2% | 10% | 23% | 63%
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% | 2% | 10% | 23% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Microsoft.TestPlatform.ObjectModel0% | 6% | 8% | 25% | 59%
src/Microsoft.TestPlatform.CrossPlatEngine0% | 3% | 8% | 17% | 70%
src/vstest.console0% | 4% | 17% | 20% | 57%
src/Microsoft.TestPlatform.Build0% | 49% | 13% | 8% | 29%
src/Microsoft.TestPlatform.CoreUtilities0% | 8% | 3% | 10% | 78%
src/Microsoft.TestPlatform.Common0% | 0% | 12% | 20% | 66%
src/Microsoft.TestPlatform.Extensions.BlameDataCollector0% | 0% | 25% | 27% | 47%
src/Microsoft.TestPlatform.Client0% | 0% | 19% | 19% | 61%
src/Microsoft.TestPlatform.Utilities0% | 0% | 21% | 15% | 63%
src/Microsoft.TestPlatform.CommunicationUtilities0% | 0% | 8% | 25% | 66%
src/SettingsMigrator0% | 0% | 43% | 8% | 47%
src/Microsoft.TestPlatform.TestHostProvider0% | 0% | 15% | 32% | 52%
src/AttachVS0% | 0% | 38% | 29% | 31%
src/DataCollectors0% | 0% | 13% | 38% | 48%
src/Microsoft.TestPlatform.Extensions.TrxLogger0% | 0% | 3% | 21% | 74%
src/Microsoft.TestPlatform.PlatformAbstractions0% | 0% | 5% | 15% | 78%
src/Microsoft.TestPlatform.AdapterUtilities0% | 0% | 4% | 66% | 28%
src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer0% | 0% | 0% | 28% | 71%
src/testhost.x860% | 0% | 0% | 33% | 66%
src/Microsoft.TestPlatform.Extensions.HtmlLogger0% | 0% | 0% | 53% | 46%
src/Microsoft.TestPlatform.Execution.Shared0% | 0% | 0% | 47% | 52%
src/datacollector0% | 0% | 0% | 47% | 52%
playground/TestPlatform.Playground0% | 0% | 0% | 0% | 100%
playground/MSTest10% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static RunConfiguration FromXml()
in src/Microsoft.TestPlatform.ObjectModel/RunSettings/RunConfiguration.cs
278 49 1
private List AddArgs()
in src/Microsoft.TestPlatform.Build/Tasks/VSTestTask.cs
152 43 0
private void TestRunCompleteHandler()
in src/vstest.console/Internal/ConsoleLogger.cs
198 43 2
public void OnMessageReceived()
in src/Microsoft.TestPlatform.CrossPlatEngine/EventHandlers/TestRequestHandler.cs
218 32 2
public bool TryGetDotnetPathByArchitecture()
in src/Microsoft.TestPlatform.CoreUtilities/Helpers/DotnetHostHelper.cs
118 28 2
private bool RunTestInternalWithExecutors()
in src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs
140 24 2
public virtual TestProcessStartInfo GetTestHostProcessStartInfo()
in src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
94 24 3
internal static FilterExpression Parse()
in src/Microsoft.TestPlatform.Common/Filtering/FilterExpression.cs
91 23 2
private void AddLegacyNodes()
in src/SettingsMigrator/Migrator.cs
78 23 5
public override object ReadJson()
in src/Microsoft.TestPlatform.CommunicationUtilities/Serialization/TestResultConverter.cs
73 22 4
private void ProcessRequests()
in src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs
123 21 1
internal bool Evaluate()
in src/Microsoft.TestPlatform.Common/Filtering/Condition.cs
66 21 1
public void GetPlatformAndFrameworkSettings()
in src/Microsoft.TestPlatform.ObjectModel/Utilities/AssemblyLoadWorker.cs
80 20 3
public static bool AreRunSettingsCollectorsIncompatibleWithTestSettings()
in src/Microsoft.TestPlatform.Utilities/InferRunSettingsHelper.cs
54 19 1
private static bool AttachVs()
in src/AttachVS/AttachVs.cs
93 18 2
private Type GetType()
in src/Microsoft.TestPlatform.ObjectModel/TestProperty/TestProperty.cs
62 18 1
public IHangDumper Create()
in src/Microsoft.TestPlatform.Extensions.BlameDataCollector/HangDumperFactory.cs
65 17 1
private static string GetArchitectureForSource()
in src/Microsoft.TestPlatform.ObjectModel/Utilities/AssemblyLoadWorker.cs
81 17 1
public static bool SplitCommandLineIntoArguments()
in src/Microsoft.TestPlatform.Utilities/CommandLineUtilities.cs
82 17 2
internal int Execute()
in src/vstest.console/CommandLine/Executor.cs
61 17 1