microsoft / redux-dag-history
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 213 units with 2,362 lines of code in units (39.8% of code).
    • 0 very long units (0 lines of code)
    • 8 long units (504 lines of code)
    • 21 medium size units (647 lines of code)
    • 35 small units (508 lines of code)
    • 149 very small units (703 lines of code)
0% | 21% | 27% | 21% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 36% | 22% | 20% | 21%
ts0% | 12% | 30% | 22% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
packages/dag-history-component/src/components0% | 31% | 30% | 19% | 19%
packages/dag-history-component/src/util0% | 31% | 9% | 16% | 43%
packages/redux-dag-history/src0% | 11% | 17% | 18% | 53%
packages/redux-dag-history/src/DagHistory0% | 17% | 36% | 30% | 16%
packages/dag-history-component/stories/components0% | 85% | 0% | 0% | 14%
packages/dag-history-component/src/state0% | 0% | 59% | 22% | 18%
packages/example/src/state0% | 0% | 47% | 26% | 26%
packages/example/src/persister0% | 0% | 0% | 68% | 31%
packages/example/src/components0% | 0% | 0% | 58% | 41%
packages/example/src/util0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
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
public renderPlayback()
in packages/dag-history-component/src/components/History/index.tsx
70 4 0
function tryToHandleHistoryAction()
in packages/redux-dag-history/src/reducer.ts
59 15 2
graph: fromJS()
in packages/dag-history-component/stories/components/History/index.tsx
57 1 66
export default function insert()
in packages/redux-dag-history/src/DagHistory/insert.ts
57 6 3
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
public render()
in packages/dag-history-component/src/components/OptionDropdown/index.tsx
49 8 0
public render()
in packages/dag-history-component/src/components/BookmarkList/index.tsx
47 6 0
export default function reduce()
in packages/dag-history-component/src/state/reducers/bookmarks.ts
44 10 2
public render()
in packages/dag-history-component/src/components/StateList/index.tsx
41 4 0
export default function calculateSpans()
in packages/dag-history-component/src/components/BranchProfile/calculateSpans.ts
35 8 7
function reduce()
in packages/dag-history-component/src/state/reducers/views.ts
35 7 3
public print()
in packages/redux-dag-history/src/DagGraph.ts
34 4 0
function reduce()
in packages/dag-history-component/src/state/reducers/playback.ts
33 7 3
function trackHistoryReducer()
in packages/redux-dag-history/src/reducer.ts
31 6 2
public render()
in packages/dag-history-component/src/components/History/index.tsx
30 2 0
function reducer()
in packages/dag-history-component/src/state/reducers/dragDrop.ts
30 7 3
public squashCurrentBranch()
in packages/redux-dag-history/src/DagGraph.ts
26 5 0