microsoft / vscode-arduino
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 478 units with 5,694 lines of code in units (71.0% of code).
    • 2 very complex units (573 lines of code)
    • 1 complex units (90 lines of code)
    • 18 medium complex units (734 lines of code)
    • 45 simple units (1,310 lines of code)
    • 412 very simple units (2,987 lines of code)
10% | 1% | 12% | 23% | 52%
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
ts11% | 1% | 13% | 22% | 51%
tsx0% | 0% | 11% | 31% | 56%
js0% | 0% | 0% | 0% | 100%
ino0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src41% | 0% | 7% | 8% | 42%
src/arduino10% | 0% | 11% | 27% | 50%
src/serialmonitor0% | 15% | 5% | 20% | 58%
src/views0% | 0% | 16% | 23% | 59%
src/debug0% | 0% | 34% | 23% | 42%
src/common0% | 0% | 14% | 28% | 57%
src/logger0% | 0% | 21% | 18% | 59%
src/langService0% | 0% | 0% | 60% | 39%
ROOT0% | 0% | 0% | 0% | 100%
snippets0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private async _build()
in src/arduino/arduino.ts
238 65 2
335 57 1
public async startListening()
in src/serialmonitor/usbDetector.ts
90 29 0
public async resolveOpenOcdOptions()
in src/debug/debuggerManager.ts
61 24 1
public async installBoard()
in src/arduino/arduino.ts
50 19 4
function versionArrayCompare()
in src/common/sharedUtilities/utils.ts
32 18 2
public async initialize()
in src/arduino/arduinoSettings.ts
50 16 0
public async selectSerialPort()
in src/serialmonitor/serialMonitor.ts
32 14 2
protected log()
in src/logger/telemetry-transport.ts
32 13 5
export default function libraryManagerReducer()
in src/views/app/reducers/libraryManagerReducer.ts
66 13 2
public async installLibrary()
in src/arduino/arduino.ts
37 12 3
private async parseExamplesFromLibrary()
in src/arduino/exampleManager.ts
47 12 3
private async update()
in src/arduino/intellisense.ts
35 12 1
private async resolveProgramPath()
in src/debug/configurationProvider.ts
34 12 1
public loadPackageContent()
in src/arduino/boardManager.ts
42 11 1
export function decycle()
in src/common/cycle.ts
41 11 2
public async resolveMainSketch()
in src/deviceContext.ts
43 11 0
public get modified()
in src/deviceSettings.ts
13 11 0
export function decycle()
in src/views/app/actions/cycle.ts
41 11 2
public render()
in src/views/app/components/LibraryManager.tsx
55 11 0