microsoft / MCW-Internet-of-Things
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 31 units with 899 lines of code in units (77.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 3 simple units (90 lines of code)
    • 28 very simple units (809 lines of code)
0% | 0% | 0% | 10% | 89%
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% | 0% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lab-files/starter-project/SmartMeterSimulator0% | 0% | 0% | 10% | 89%
lab-files/starter-project/CloudToDevice0% | 0% | 0% | 0% | 100%
lab-files/starter-project/DownstreamDevice0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private void WorkComplete()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/MainForm.cs
55 10 1
private void btnConnect_Click()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/MainForm.cs
17 6 2
private void btnDisconnect_Click()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/MainForm.cs
18 6 2
private void btnRegister_Click()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/MainForm.cs
29 5 2
private void DoWork()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/MainForm.cs
20 5 1
private void Device_Hover()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/MainForm.cs
28 5 2
public async void ReceiveMessageAsync()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/Sensor.cs
26 5 0
private static int GetReadLineInteger()
in Hands-on lab/lab-files/starter-project/CloudToDevice/Program.cs
15 4 3
private static double GetReadLineDouble()
in Hands-on lab/lab-files/starter-project/CloudToDevice/Program.cs
15 4 3
private async static Task PromptUser()
in Hands-on lab/lab-files/starter-project/CloudToDevice/Program.cs
19 3 0
private static string GetReadLine()
in Hands-on lab/lab-files/starter-project/CloudToDevice/Program.cs
15 3 2
public int Compare()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/ListViewColumnSorter.cs
20 3 2
protected override void Dispose()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/MainForm.Designer.cs
8 3 1
private static string ComputeDerivedSymmetricKey()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/DeviceManager.cs
13 2 2
static void Main()
in Hands-on lab/lab-files/starter-project/CloudToDevice/Program.cs
7 1 1
private async static Task SendCloudToDeviceMessageAsync()
in Hands-on lab/lab-files/starter-project/CloudToDevice/Program.cs
5 1 0
static void Main()
in Hands-on lab/lab-files/starter-project/DownstreamDevice/Program.cs
4 1 1
public Task QueueTask()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/BackgroundQueue.cs
11 1 1
public async static Task RegisterDeviceAsync()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/DeviceManager.cs
9 1 3
public static void InstallCACert()
in Hands-on lab/lab-files/starter-project/SmartMeterSimulator/DeviceManager.cs
3 1 0