microsoft / gather
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 175 units with 1,876 lines of code in units (58.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (293 lines of code)
    • 10 simple units (341 lines of code)
    • 161 very simple units (1,242 lines of code)
0% | 0% | 15% | 18% | 66%
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% | 15% | 18% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/overlay0% | 0% | 16% | 9% | 73%
src/widgets/history0% | 0% | 41% | 41% | 17%
src/main0% | 0% | 17% | 0% | 82%
src/persistence0% | 0% | 32% | 0% | 67%
src/widgets/revision0% | 0% | 0% | 58% | 41%
src/util0% | 0% | 0% | 83% | 16%
src/widgets/slicedcell0% | 0% | 0% | 38% | 61%
src/model0% | 0% | 0% | 4% | 95%
src/widgets/codeversion0% | 0% | 0% | 0% | 100%
src/widgets/notification0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
onModelChange()
in src/overlay/gather-markers.ts
106 24 3
export function computeTextDiff()
in src/widgets/history/diff.ts
103 24 2
export function getCellsJsonForSlice()
in src/main/gather-actions.ts
45 11 2
function _loadExecutionFromJson()
in src/persistence/load.ts
39 11 1
export function log()
in src/util/log.ts
34 10 2
constructor()
in src/widgets/revision/widget.ts
74 9 1
constructor()
in src/model/cell.ts
12 8 1
handleClick()
in src/overlay/gather-markers.ts
25 7 1
18 7 2
export function buildHistoryModel()
in src/widgets/history/compute.ts
67 7 4
private _registerCell()
in src/overlay/cell-listener.ts
21 6 1
private _registerAddedCells()
in src/overlay/cell-listener.ts
12 6 1
function addLines()
in src/widgets/history/diff.ts
36 6 4
constructor()
in src/widgets/slicedcell/widget.ts
42 6 1
highlightDefs()
in src/overlay/gather-markers.ts
11 5 2
highlightDependencies()
in src/overlay/gather-markers.ts
32 5 1
function _tryLoadHistory()
in src/persistence/load.ts
21 5 2
function _getPathForCurrentNotebook()
in src/main/gather-actions.ts
11 4 1
3 4 1
function clearSelectionsInWindow()
in src/overlay/gather-markers.ts
7 4 0