microsoft / vscode-iot-workbench
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 1,602 units with 26,315 lines of code in units (83.0% of code).
    • 2 very complex units (1,893 lines of code)
    • 11 complex units (931 lines of code)
    • 112 medium complex units (5,392 lines of code)
    • 242 simple units (6,438 lines of code)
    • 1,235 very simple units (11,661 lines of code)
7% | 3% | 20% | 24% | 44%
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
js10% | 4% | 22% | 25% | 37%
ts0% | 1% | 15% | 22% | 59%
c0% | 0% | 0% | 79% | 20%
ino0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
assets/modelRepository10% | 4% | 23% | 24% | 36%
views10% | 4% | 22% | 25% | 37%
src/Models0% | 4% | 24% | 18% | 52%
src/DigitalTwin0% | 0% | 11% | 29% | 59%
src0% | 0% | 10% | 19% | 70%
resources/templates0% | 0% | 0% | 35% | 64%
scripts/mdLinkChecker0% | 0% | 0% | 40% | 59%
src/common0% | 0% | 0% | 31% | 69%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
(function(global, factory)()
in assets/modelRepository/vue.js
947 95 2
946 93 2
function parseFilters()
in assets/modelRepository/vue.js
96 38 1
96 38 1
function hydrate()
in assets/modelRepository/vue.js
98 34 4
function hydrate()
in views/vue.js
98 34 4
function enter()
in assets/modelRepository/vue.js
68 33 2
function enter()
in views/vue.js
68 33 2
private static async _getARMParameters()
in src/Models/AzureUtility.ts
129 32 2
function patchVnode()
in assets/modelRepository/vue.js
61 29 4
render: function render()
in assets/modelRepository/vue.js
78 29 1
function patchVnode()
in views/vue.js
61 29 4
78 29 1
function _createElement()
in assets/modelRepository/vue.js
79 25 5
79 25 5
start: function start()
in assets/modelRepository/vue.js
45 23 3
45 23 3
function processAttrs()
in assets/modelRepository/vue.js
85 22 1
private flushDeviceConfig()
in src/Models/AZ3166Device.ts
124 22 2
85 22 1