microsoft / vscode-python
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 2,395 units with 26,698 lines of code in units (67.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (566 lines of code)
    • 48 medium complex units (2,731 lines of code)
    • 174 simple units (4,613 lines of code)
    • 2,170 very simple units (18,788 lines of code)
0% | 2% | 10% | 17% | 70%
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% | 2% | 9% | 17% | 70%
py0% | 0% | 20% | 9% | 69%
js0% | 0% | 0% | 9% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/client0% | 2% | 9% | 17% | 70%
pythonFiles0% | 0% | 47% | 0% | 52%
pythonFiles/testing_tools0% | 0% | 9% | 22% | 68%
ROOT0% | 0% | 0% | 11% | 88%
news0% | 0% | 0% | 17% | 82%
src/testMultiRootWkspc0% | 0% | 0% | 0% | 100%
build/ci0% | 0% | 0% | 0% | 100%
build0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private async runTest()
in src/client/testing/testController/unittest/runner.ts
231 46 5
protected async provideLaunchDefaults()
in src/client/debugger/extension/configuration/resolvers/launch.ts
95 38 2
protected update()
in src/client/common/configSettings.ts
240 34 1
export function translateProductToModule()
in src/client/common/installer/moduleInstaller.ts
55 25 1
public async getActivatedEnvironmentVariablesImpl()
in src/client/interpreter/activation/service.ts
90 25 3
def main()
in pythonFiles/visualstudio_py_testlauncher.py
167 23 0
protected async provideAttachDefaults()
in src/client/debugger/extension/configuration/resolvers/attach.ts
59 21 2
def determine_pip_install_arguments()
in pythonFiles/get-pip.py
31 20 0
async function updateTestItemFromRawDataInternal()
in src/client/testing/testController/common/testItemUtilities.ts
83 20 6
public async install()
in src/client/common/installer/productInstaller.ts
108 19 4
private async ensurePrerequisitesAreInstalled()
in src/client/tensorBoard/tensorBoardSession.ts
87 19 0
private static async locate()
in src/client/pythonEnvironments/common/environmentManagers/conda.ts
71 18 0
function getTextEditsInternal()
in src/client/common/editor.ts
63 17 4
export async function updateResultFromJunitXml()
in src/client/testing/testController/common/resultsHelper.ts
88 17 4
public async refreshTestData()
in src/client/testing/testController/unittest/unittestController.ts
97 17 3
public async getEnvironmentVariables()
in src/client/debugger/extension/configuration/resolvers/helper.ts
35 16 1
def __init__()
in pythonFiles/testing_tools/adapter/info.py
23 15 3
export function getWorkspaceEditsFromPatch()
in src/client/common/editor.ts
62 15 3
function patch_fromText()
in src/client/common/editor.ts
62 15 1
public async getActivationCommandsForInterpreter()
in src/client/common/terminal/environmentActivationProviders/condaActivationProvider.ts
39 15 2