microsoft / redux-dag-history
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 213 units with 2,362 lines of code in units (39.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (218 lines of code)
    • 12 simple units (425 lines of code)
    • 198 very simple units (1,719 lines of code)
0% | 0% | 9% | 17% | 72%
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% | 8% | 22% | 69%
tsx0% | 0% | 10% | 11% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/dag-history-component/src/components0% | 0% | 10% | 18% | 70%
packages/dag-history-component/src/util0% | 0% | 31% | 9% | 59%
packages/redux-dag-history/src0% | 0% | 11% | 5% | 83%
packages/dag-history-component/src/state0% | 0% | 0% | 67% | 32%
packages/redux-dag-history/src/DagHistory0% | 0% | 0% | 17% | 82%
packages/dag-history-component/stories/components0% | 0% | 0% | 0% | 100%
packages/example/src/state0% | 0% | 0% | 0% | 100%
packages/example/src/persister0% | 0% | 0% | 0% | 100%
packages/example/src/components0% | 0% | 0% | 0% | 100%
packages/example/src/util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function tryToHandleHistoryAction()
in packages/redux-dag-history/src/reducer.ts
59 15 2
public getBranchList()
in packages/dag-history-component/src/components/BranchListContainer/index.tsx
87 14 2
export default function makeActions()
in packages/dag-history-component/src/util/BookmarkActions.ts
72 11 5
export default function reduce()
in packages/dag-history-component/src/state/reducers/bookmarks.ts
44 10 2
export default function calculateSpans()
in packages/dag-history-component/src/components/BranchProfile/calculateSpans.ts
35 8 7
export default function calculateSpans()
in packages/dag-history-component/src/components/DiscoveryTrail/calculateSpans.ts
23 8 4
public render()
in packages/dag-history-component/src/components/OptionDropdown/index.tsx
49 8 0
function reducer()
in packages/dag-history-component/src/state/reducers/bookmarkEdit.ts
20 7 3
function reducer()
in packages/dag-history-component/src/state/reducers/dragDrop.ts
30 7 3
function reduce()
in packages/dag-history-component/src/state/reducers/playback.ts
33 7 3
function reduce()
in packages/dag-history-component/src/state/reducers/views.ts
35 7 3
export function insertSpan()
in packages/dag-history-component/src/util/spans.ts
21 7 2
public render()
in packages/dag-history-component/src/components/BookmarkList/index.tsx
47 6 0
export default function insert()
in packages/redux-dag-history/src/DagHistory/insert.ts
57 6 3
function trackHistoryReducer()
in packages/redux-dag-history/src/reducer.ts
31 6 2
function getStateList()
in packages/dag-history-component/src/components/StateListContainer/index.tsx
51 5 6
function getStateList()
in packages/dag-history-component/src/components/StateListManager/index.tsx
51 5 6
function reduce()
in packages/dag-history-component/src/state/reducers/pinnedState.ts
20 5 3
export default function isNumber()
in packages/dag-history-component/src/util/isNumber.ts
9 5 1
public branchesOf()
in packages/redux-dag-history/src/DagGraph.ts
20 5 1