microsoft / vscode-azure-iot-toolkit
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 436 units with 4,544 lines of code in units (18.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (465 lines of code)
    • 33 simple units (1,070 lines of code)
    • 397 very simple units (3,009 lines of code)
0% | 0% | 10% | 23% | 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
ts0% | 0% | 11% | 23% | 64%
js0% | 0% | 4% | 27% | 67%
cs0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
go0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 14% | 24% | 60%
resources/simulator0% | 0% | 12% | 34% | 53%
external_lib/dummy-json0% | 0% | 0% | 29% | 70%
src/Nodes0% | 0% | 0% | 19% | 80%
src/simulatorwebview0% | 0% | 0% | 21% | 78%
resources/code-template0% | 0% | 0% | 0% | 100%
resources/welcome0% | 0% | 0% | 0% | 100%
src/Model0% | 0% | 0% | 0% | 100%
src/providers0% | 0% | 0% | 0% | 100%
src/Utility0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
75 20 4
export function activate()
in src/extension.ts
152 18 1
private async deployAtScale()
in src/iotEdgeExplorer.ts
70 15 2
async getPersistedInputs()
in resources/simulator/main.js
35 13 0
33 13 3
public async createIoTHub()
in src/iotHubResourceExplorer.ts
100 11 3
public async getChildren()
in src/Nodes/TwinNode.ts
40 10 2
private async promptForSamplingRate()
in src/distributedTracingManager.ts
27 10 2
private async getDeploymentJson()
in src/iotEdgeExplorer.ts
41 10 1
repeat: function()
in external_lib/dummy-json/lib/helpers.js
33 9 3
lorem: function()
in external_lib/dummy-json/lib/helpers.js
30 9 2
data()
in resources/simulator/main.js
95 9 0
private done()
in src/deviceExplorer.ts
35 9 7
57 9 5
public replaceConnectionString()
in src/snippetManager.ts
31 9 1
21 9 1
function getDate()
in external_lib/dummy-json/lib/helpers.js
25 8 5
private async updateDeviceTwin()
in src/distributedTracingManager.ts
26 8 4
37 8 1
10 8 1