microsoft / busiotools
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 545 units with 12,237 lines of code in units (62.1% of code).
    • 2 very complex units (717 lines of code)
    • 5 complex units (918 lines of code)
    • 28 medium complex units (2,214 lines of code)
    • 58 simple units (2,177 lines of code)
    • 452 very simple units (6,211 lines of code)
5% | 7% | 18% | 17% | 50%
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
cs7% | 7% | 22% | 18% | 45%
cpp0% | 12% | 1% | 17% | 68%
h0% | 0% | 0% | 17% | 82%
ino0% | 0% | 0% | 11% | 88%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sensors/Tools/SensorExplorer7% | 8% | 22% | 16% | 44%
usb/tools/ConnectionExerciser0% | 11% | 1% | 18% | 68%
sensors/Tools/MALT0% | 0% | 9% | 12% | 78%
hmdvalidationkit/managed0% | 0% | 0% | 50% | 49%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static async Task GetDefault()
in sensors/Tools/SensorExplorer/Sensor.cs
501 74 1
public void UpdateProperty()
in sensors/Tools/SensorExplorer/SensorDisplay.cs
216 60 1
public async Task EvaluateStateEverySecondAsync()
in sensors/Tools/SensorExplorer/Scenario4_Distance.xaml.cs
285 47 0
bool DTMF_HandleCommand()
in usb/tools/ConnectionExerciser/libraries/DTMF/DTMF.cpp
169 35 1
private void TestBegin()
in sensors/Tools/SensorExplorer/Scenario0_Testing.xaml.cs
154 34 0
private void TestBegin()
in sensors/Tools/SensorExplorer/Scenario0_Tests.xaml.cs
154 34 0
public static async Task GetPLDInformation()
in sensors/Tools/SensorExplorer/Sensor.cs
156 32 2
public SensorDisplay()
in sensors/Tools/SensorExplorer/SensorDisplay.cs
192 23 7
private void CalculateJitterTest()
in sensors/Tools/SensorExplorer/Scenario0_Testing.xaml.cs
66 22 0
private void CalculateJitterTest()
in sensors/Tools/SensorExplorer/Scenario0_Tests.xaml.cs
66 22 0
private void AddSummaryPage()
in sensors/Tools/SensorExplorer/Scenario1_View.xaml.cs
92 22 0
private async void EnumerateSensors()
in sensors/Tools/SensorExplorer/Scenario0_Testing.xaml.cs
153 21 0
private async void EnumerateSensors()
in sensors/Tools/SensorExplorer/Scenario0_Tests.xaml.cs
153 21 0
private async void EnumerateSensors()
in sensors/Tools/SensorExplorer/Scenario1_View.xaml.cs
150 21 0
public static void EnableSensor()
in sensors/Tools/SensorExplorer/Sensor.cs
64 20 3
public static void DisableSensor()
in sensors/Tools/SensorExplorer/Sensor.cs
64 20 2
public void ReportIntervalButton()
in sensors/Tools/SensorExplorer/Scenario1_View.xaml.cs
71 17 2
byte DTMF_ToneToByte()
in usb/tools/ConnectionExerciser/libraries/DTMF/DTMF.cpp
24 17 1
static void Main()
in sensors/Tools/MALT/Code/MALTUtil/MALTUtil/Program.cs
102 16 1
private async static void PeriodicTimerCallbackSensorDisplay()
in sensors/Tools/SensorExplorer/PeriodicTimer.cs
74 15 1