microsoft / DACExtensions
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 802 units with 7,823 lines of code in units (12.8% of code).
    • 4 very complex units (3,028 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (20 lines of code)
    • 797 very simple units (4,775 lines of code)
38% | 0% | 0% | <1% | 61%
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
cs38% | 0% | 0% | <1% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
DacFxStronglyTypedModel48% | 0% | 0% | 0% | 51%
RuleSamples0% | 0% | 0% | 5% | 94%
SampleTests0% | 0% | 0% | 0% | 100%
RuleTests0% | 0% | 0% | 0% | 100%
SampleConsoleApp0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static IEnumerable GetModelElementTypes()
in DacFxStronglyTypedModel/ModelUtilityMethods.cs
980 659 1
public static bool ImplementsType()
in DacFxStronglyTypedModel/ModelUtilityMethods.cs
1543 411 2
257 121 2
public static ISqlModelElement AdaptInstance()
in DacFxStronglyTypedModel/model.cs
248 120 1
private void CheckIfCapitalized()
in RuleSamples/CapitalizedNamesRule.cs
20 7 2
private void DumpErrors()
in RuleTests/RuleTest.cs
22 5 1
private bool IsSupportedForCurrentType()
in RuleSamples/TSqlScriptDomUtils.cs
15 4 1
15 4 1
public static void SaveStringToFile()
in RuleTests/RuleTestUtils.cs
27 4 2
private void AssertAllObjectsHaveSchemaName()
in SampleTests/TestFiltering.cs
10 4 2
public TSqlModelElement()
in DacFxStronglyTypedModel/TSqlModelElement.cs
14 3 2
public TSqlModelElementReference()
in DacFxStronglyTypedModel/TSqlModelElementReference.cs
11 3 2
public IEnumerable GetObjects()
in DacFxStronglyTypedModel/TSqlTypedModel.cs
10 3 1
public IEnumerable GetObjects()
in DacFxStronglyTypedModel/TSqlTypedModel.cs
10 3 2
public TSqlColumnReference()
in DacFxStronglyTypedModel/model.cs
11 3 2
public TSqlTableValuedFunctionReference()
in DacFxStronglyTypedModel/model.cs
11 3 2
public TSqlScalarFunctionReference()
in DacFxStronglyTypedModel/model.cs
11 3 2
public TSqlClrTableOptionReference()
in DacFxStronglyTypedModel/model.cs
11 3 2
public TSqlAggregateReference()
in DacFxStronglyTypedModel/model.cs
11 3 2
public TSqlApplicationRoleReference()
in DacFxStronglyTypedModel/model.cs
11 3 2