microsoft / SandDance
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 755 units with 13,765 lines of code in units (64.2% of code).
    • 1 very complex units (426 lines of code)
    • 1 complex units (114 lines of code)
    • 32 medium complex units (2,114 lines of code)
    • 90 simple units (3,263 lines of code)
    • 631 very simple units (7,848 lines of code)
3% | <1% | 15% | 23% | 57%
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
tsx8% | 2% | 9% | 24% | 55%
ts0% | 0% | 18% | 23% | 58%
py0% | 0% | 30% | 27% | 41%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/sanddance-explorer9% | 2% | 11% | 20% | 54%
packages/sanddance-specs0% | 0% | 20% | 23% | 56%
packages/sanddance0% | 0% | 16% | 29% | 54%
packages/vega-deck.gl0% | 0% | 18% | 8% | 72%
python/jupyter-widget0% | 0% | 23% | 21% | 54%
packages/powerbi0% | 0% | 15% | 44% | 40%
packages/search-expression0% | 0% | 17% | 25% | 57%
packages/chart-recommender0% | 0% | 23% | 32% | 43%
packages/sanddance-app0% | 0% | 0% | 34% | 65%
extensions/vscode-sanddance0% | 0% | 0% | 95% | 4%
packages/sanddance-embed0% | 0% | 0% | 61% | 38%
extensions/azdata-sanddance0% | 0% | 0% | 29% | 70%
extensions/common-frontend0% | 0% | 0% | 27% | 72%
packages/sanddance-react0% | 0% | 0% | 0% | 100%
packages/sanddance-vue0% | 0% | 0% | 0% | 100%
extensions/common-backend0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function _Explorer()
in packages/sanddance-explorer/src/explorer.tsx
426 69 1
public updateViewerOptions()
in packages/sanddance-explorer/src/explorer.tsx
114 30 1
public changeColumnMapping()
in packages/sanddance-explorer/src/explorer.tsx
102 22 3
private setDeckProps()
in packages/vega-deck.gl/src/presenter.ts
59 21 5
render()
in packages/sanddance-explorer/src/explorer.tsx
98 19 0
private runExpressionOnColumn()
in packages/search-expression/src/exec.ts
44 18 2
public changeChartType()
in packages/sanddance-explorer/src/explorer.tsx
45 17 1
export function addGlobalAxes()
in packages/sanddance-specs/src/axes.ts
63 17 1
def which()
in python/jupyter-widget/setupbase.py
25 16 3
export function ensureColumnsPopulated()
in packages/sanddance-explorer/src/columns.ts
45 15 4
function needsNewCharacterSet()
in packages/sanddance/src/characterSet.ts
19 15 2
def _translate_glob_part()
in python/jupyter-widget/setupbase.py
33 15 1
constructor()
in packages/chart-recommender/src/scatterPlot.ts
38 14 2
show()
in packages/powerbi/src/visual.ts
58 14 1
export function DataBrowser()
in packages/sanddance-explorer/src/dialogs/dataBrowser.tsx
72 14 1
private createConfig()
in packages/sanddance/src/viewer.ts
70 14 1
present()
in packages/vega-deck.gl/src/presenter.ts
67 14 4
function convertExpressionOperator()
in packages/powerbi/src/convertFilter.ts
17 13 1
export function initPrefs()
in packages/sanddance-explorer/src/partialInsight.ts
33 13 2
export default function()
in packages/sanddance-specs/src/charts/density.ts
169 13 1