microsoft / powerbi-visuals-sankey
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 86 units with 1,813 lines of code in units (77.3% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (163 lines of code)
    • 4 medium complex units (303 lines of code)
    • 13 simple units (481 lines of code)
    • 68 very simple units (866 lines of code)
0% | 8% | 16% | 26% | 47%
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% | 8% | 16% | 26% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 8% | 16% | 26% | 47%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public converter()
in src/sankeyDiagram.ts
163 37 1
private computeYPosition()
in src/sankeyDiagram.ts
68 19 3
private computePositions()
in src/sankeyDiagram.ts
86 16 1
function dragged()
in src/sankeyDiagram.ts
58 13 1
private renderNodes()
in src/sankeyDiagram.ts
91 11 1
private getSvgPathForSelfLink()
in src/sankeyDiagram.ts
89 10 2
public static dfs()
in src/sankeyDiagram.ts
30 9 4
private renderLinkLabels()
in src/sankeyDiagram.ts
78 9 1
private static updateValueOfNode()
in src/sankeyDiagram.ts
25 8 1
private applySavedPositions()
in src/sankeyDiagram.ts
17 8 1
32 7 7
private static computeXPositions()
in src/sankeyDiagram.ts
41 7 1
public enumerateObjectInstances()
in src/sankeyDiagram.ts
17 7 1
public static getPositiveNumber()
in src/sankeyDiagram.ts
5 6 1
32 6 4
public getColumns()
in src/sankeyDiagram.ts
27 6 1
37 6 6
private renderLinks()
in src/sankeyDiagram.ts
51 6 1
29 5 0
public update()
in src/sankeyDiagram.ts
17 5 1