microsoft / featuretimeline
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 384 units with 7,019 lines of code in units (45.8% of code).
    • 6 very long units (1,128 lines of code)
    • 17 long units (1,170 lines of code)
    • 65 medium size units (1,996 lines of code)
    • 116 small units (1,703 lines of code)
    • 180 very small units (1,022 lines of code)
16% | 16% | 28% | 24% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx24% | 20% | 24% | 17% | 12%
ts11% | 15% | 30% | 27% | 14%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/FeatureTimeline/react72% | 0% | 4% | 15% | 7%
src/EpicRoadmap/react58% | 15% | 0% | 14% | 11%
src/PortfolioPlanning/Redux41% | 18% | 3% | 17% | 19%
src/PortfolioPlanning/Common9% | 8% | 35% | 27% | 19%
src/EpicRoadmap/redux16% | 33% | 26% | 18% | 5%
src/FeatureTimeline/redux0% | 19% | 41% | 35% | 3%
src/Common/react0% | 31% | 32% | 9% | 25%
src/PortfolioPlanning/Components0% | 24% | 43% | 23% | 7%
src/PortfolioPlanning0% | 27% | 29% | 23% | 19%
src/Common/redux0% | 12% | 36% | 30% | 20%
src0% | 0% | 0% | 100% | 0%
src/Services0% | 0% | 0% | 43% | 56%
scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public render()
in src/FeatureTimeline/react/Components/FeatureTimelineGrid.tsx
323 27 0
public render()
in src/EpicRoadmap/react/Components/EpicRoadmapGrid.tsx
248 20 0
public async AddWorkItemsToPlan()
in src/PortfolioPlanning/Common/Services/PortfolioPlanningDataService.ts
205 30 3
function handlePortfolioItemsReceived()
in src/PortfolioPlanning/Redux/Reducers/EpicTimelineReducer.ts
128 19 2
export function getWorkItemIterationDuration()
in src/EpicRoadmap/redux/selectors/workItemStartEndIterationSelector.ts
120 23 6
export function epicTimelineReducer()
in src/PortfolioPlanning/Redux/Reducers/EpicTimelineReducer.ts
104 21 2
function _getGridItems()
in src/EpicRoadmap/redux/selectors/EpicRoadmapGridViewSelector.ts
90 15 9
export function getGridWorkItems()
in src/FeatureTimeline/redux/selectors/FeatureTimelineGridViewSelector.ts
87 13 10
export function getEpicRoadmapGridView()
in src/EpicRoadmap/redux/selectors/EpicRoadmapGridViewSelector.ts
86 6 9
public async getWorkItemProjectIds()
in src/PortfolioPlanning/Common/Services/PortfolioPlanningDataService.ts
83 11 2
public render()
in src/Common/react/Components/IterationDuration/IterationDuration.tsx
76 7 0
private _renderTimeline()
in src/PortfolioPlanning/Components/Plan/PlanTimeline.tsx
75 4 0
export function getWorkItemDisplayDetails()
in src/EpicRoadmap/redux/selectors/workItemDisplayDetailsSelector.ts
71 19 9
export function getGridView()
in src/FeatureTimeline/redux/selectors/FeatureTimelineGridViewSelector.ts
71 6 8
public render()
in src/Common/react/Components/WorkItem/WorkItemRenderer.tsx
70 9 0
private _renderZoomControls()
in src/PortfolioPlanning/Components/Plan/PlanTimeline.tsx
69 4 0
public render()
in src/EpicRoadmap/react/Components/EpicRoadmapView.tsx
68 7 0
public HandleTestExtensionStorage()
in src/PortfolioPlanning/Common/Components/ODataTest.tsx
57 1 1
private openAllPlansDialog()
in src/PortfolioPlanning/AddToPlanAction.tsx
56 4 2
export function getDisplayIterations()
in src/Common/redux/Selectors/displayIterationSelector.ts
54 16 5