microsoft / dag-history-component
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 117 units with 1,249 lines of code in units (27.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (204 lines of code)
    • 8 simple units (239 lines of code)
    • 106 very simple units (806 lines of code)
0% | 0% | 16% | 19% | 64%
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% | 20% | 34% | 45%
tsx0% | 0% | 13% | 5% | 80%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/components0% | 0% | 29% | 8% | 62%
src/state0% | 0% | 0% | 81% | 18%
example/persister0% | 0% | 0% | 47% | 52%
src/util0% | 0% | 0% | 13% | 86%
stories/components0% | 0% | 0% | 0% | 100%
example/state0% | 0% | 0% | 0% | 100%
example/components0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export default function calculateSpans()
in src/components/BranchProfile/calculateSpans.ts
46 17 9
getBranchList()
in src/components/History/HistoryView/BranchListContainer.tsx
89 15 2
export default function makeActions()
in src/components/History/BookmarkActions.ts
69 11 5
export default function reduce()
in src/state/reducers/bookmarks.ts
41 10 2
render()
in src/components/OptionDropdown/index.tsx
38 7 0
export default function makeReducer()
in src/state/reducers/dragDrop.ts
25 7 1
export default function()
in src/state/reducers/playback.ts
30 7 1
export function insertSpan()
in src/util/spans.ts
21 7 2
export default function simulate()
in example/persister/simulate.ts
34 6 3
export default function calculateSpans()
in src/components/DiscoveryTrail/calculateSpans.ts
19 6 4
export default function makeReducer()
in src/state/reducers/views.ts
31 6 1
export default function isNumber()
in src/util/isNumber.ts
7 5 1
export default function reduce()
in example/state/reducers/app/metadata.ts
22 4 2
export default function reduce()
in example/state/reducers/app/visuals.ts
11 4 2
private onLeadInSet()
in src/components/Bookmark/EditBookmark.tsx
18 4 1
function getContinuationText()
in src/components/Continuation/index.tsx
12 4 1
renderPlayback()
in src/components/History/index.tsx
57 4 0
function getBackgroundColor()
in src/components/State/State.tsx
11 4 4
public isDepthAtStart()
in src/util/Bookmark.ts
13 4 1
function hashString()
in example/state/reducers/index.ts
15 3 1