microsoft / release-stats
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 39 units with 469 lines of code in units (69.5% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (154 lines of code)
    • 3 medium size units (85 lines of code)
    • 9 small units (138 lines of code)
    • 25 very small units (92 lines of code)
0% | 32% | 18% | 29% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 51% | 28% | 14% | 5%
ts0% | 0% | 0% | 55% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts/widget0% | 51% | 36% | 8% | 3%
scripts/config0% | 50% | 17% | 23% | 8%
scripts/common0% | 0% | 0% | 55% | 44%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private render()
in scripts/widget/Widget.tsx
88 23 2
public load()
in scripts/config/WidgetConfiguration.tsx
66 7 2
private formatDate()
in scripts/widget/Widget.tsx
31 6 1
private timeDifference()
in scripts/widget/Widget.tsx
31 5 2
private updateReleaseEnvironments()
in scripts/config/WidgetConfiguration.tsx
23 2 1
private updateReleases()
in scripts/config/WidgetConfiguration.tsx
19 2 1
17 3 5
export function getProjects()
in scripts/common/RestCall.ts
16 4 2
export function getReleaseDefinitions()
in scripts/common/RestCall.ts
15 4 3
export function getLatestDeployment()
in scripts/common/RestCall.ts
15 4 4
export function getLatestRelease()
in scripts/common/RestCall.ts
15 4 5
export function getReleaseEnvironments()
in scripts/common/RestCall.ts
15 4 4
private clearAll()
in scripts/widget/Widget.tsx
15 1 0
private onChange()
in scripts/config/WidgetConfiguration.tsx
11 3 1
function getAuthHeader()
in scripts/common/RestCall.ts
8 1 0
public static Parse()
in scripts/common/WidgetSettings.ts
7 2 1
async function restApiCall()
in scripts/common/RestCall.ts
6 1 1
export function areSettingsValid()
in scripts/common/WidgetSettings.ts
6 3 1
public getCustomSettings()
in scripts/config/WidgetConfiguration.tsx
5 1 0
export function getReleaseDefinitionsUrl()
in scripts/common/RestCall.ts
3 1 2