microsoft / vsts-team-calendar
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 195 units with 3,490 lines of code in units (62.5% of code).
    • 4 very long units (513 lines of code)
    • 13 long units (828 lines of code)
    • 36 medium size units (1,099 lines of code)
    • 32 small units (468 lines of code)
    • 110 very small units (582 lines of code)
14% | 23% | 31% | 13% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts12% | 23% | 31% | 14% | 18%
tsx18% | 24% | 32% | 11% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
legacy/src/Calendar13% | 17% | 35% | 14% | 19%
legacy/src/Calendar/EventSources15% | 25% | 37% | 12% | 9%
src18% | 43% | 13% | 8% | 15%
legacy/src/Calendar/Utils0% | 0% | 26% | 43% | 29%
legacy/src/Calendar/Enhancers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public getEvents()
in legacy/src/Calendar/EventSources/VSOCapacityEventSource.ts
146 16 1
public render()
in legacy/src/Calendar/Views.tsx
133 6 0
public render()
in src/Calendar.tsx
119 6 0
private _renderContent()
in legacy/src/Calendar/Dialogs.ts
115 21 0
public render()
in src/AddEditDaysOffDialog.tsx
90 5 0
private _createEventSource()
in legacy/src/Calendar/Calendar.ts
76 17 2
constructor()
in src/Calendar.tsx
76 4 1
private _createLayout()
in legacy/src/Calendar/Dialogs.ts
67 5 0
public updateEvent()
in legacy/src/Calendar/EventSources/VSOCapacityEventSource.ts
65 4 2
public getEvents()
in legacy/src/Calendar/EventSources/VSOIterationEventSource.ts
64 7 1
public removeEvent()
in legacy/src/Calendar/EventSources/VSOCapacityEventSource.ts
60 4 1
public render()
in src/SummaryComponent.tsx
60 4 0
private _validate()
in legacy/src/Calendar/Dialogs.ts
59 14 1
private _eventRender()
in legacy/src/Calendar/Views.tsx
55 11 4
public getFields()
in legacy/src/Calendar/Dialogs.ts
54 5 0
public static parseUniquefiedIdentityName()
in legacy/src/Calendar/EventSources/VSOCapacityEventSource.ts
51 11 1
private async initialize()
in src/Calendar.tsx
51 11 0
private _getCategorySubTitle()
in legacy/src/Calendar/EventSources/VSOCapacityEventSource.ts
47 3 3
private _updateCategoryForEvents()
in legacy/src/Calendar/EventSources/FreeFormEventsSource.ts
46 11 1
public initialize()
in legacy/src/Calendar/Views.tsx
46 2 0