microsoft / vscode-cosmosdb
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 760 units with 7,286 lines of code in units (45.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (529 lines of code)
    • 58 simple units (1,633 lines of code)
    • 691 very simple units (5,124 lines of code)
0% | 0% | 7% | 22% | 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% | 0% | 7% | 22% | 70%
js0% | 0% | 0% | 42% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/mongo0% | 0% | 8% | 23% | 68%
src/commands0% | 0% | 35% | 32% | 32%
src0% | 0% | 28% | 10% | 61%
src/postgres0% | 0% | 0% | 18% | 81%
src/tree0% | 0% | 0% | 26% | 73%
src/docdb0% | 0% | 0% | 25% | 74%
src/utils0% | 0% | 0% | 24% | 75%
build0% | 0% | 0% | 50% | 50%
src/graph0% | 0% | 0% | 6% | 93%
ROOT0% | 0% | 0% | 0% | 100%
src/table0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function searchDbAccounts()
in src/commands/api/findTreeItem.ts
47 18 4
80 13 2
async function executeCommand()
in src/mongo/MongoScrapbook.ts
51 13 3
export async function findTreeItem()
in src/commands/api/findTreeItem.ts
51 12 1
export async function pickTreeItem()
in src/commands/api/pickTreeItem.ts
51 12 1
private getCollectionName()
in src/mongo/services/completionItemProvider.ts
22 12 1
public async loadMoreChildrenImpl()
in src/mongo/tree/MongoAccountTreeItem.ts
34 12 1
public propertyValue()
in src/mongo/grammar/mongoParser.ts
57 11 0
public literal()
in src/mongo/grammar/mongoParser.ts
58 11 0
private getCompletionItemsFromTerminalNode()
in src/mongo/services/completionItemProvider.ts
30 11 1
private async _determineShellPathOrCmd()
in src/mongo/tree/MongoDatabaseTreeItem.ts
48 11 2
public argument()
in src/mongo/grammar/mongoParser.ts
50 10 0
private async createTreeItem()
in src/tree/AttachedAccountsTreeItem.ts
32 10 5
private async persistIds()
in src/tree/AttachedAccountsTreeItem.ts
24 10 1
private async startCore()
in src/utils/InteractiveChildProcess.ts
50 10 0
function uriToFilePath()
in build/vscode-languageserver-files-stub.js
18 9 1
async function insertDocumentsIntoDocdb()
in src/commands/importDocuments.ts
28 9 3
public commands()
in src/mongo/grammar/mongoParser.ts
58 9 0
protected aggregateResult()
in src/mongo/services/mongoScript.ts
13 9 2
export async function connectPostgresDatabase()
in src/postgres/commands/connectPostgresDatabase.ts
22 9 2