aws-samples / dotnet-share-auth-cookie-between-monolith-and-modernized-apps
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 633 units with 8,204 lines of code in units (43.4% of code).
    • 1 very long units (999 lines of code)
    • 10 long units (664 lines of code)
    • 87 medium size units (2,569 lines of code)
    • 139 small units (1,927 lines of code)
    • 396 very small units (2,045 lines of code)
12% | 8% | 31% | 23% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js13% | 9% | 28% | 23% | 25%
cs0% | 0% | 54% | 22% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Legacy.Monolith/Scripts13% | 9% | 28% | 23% | 25%
Modernized.Infrastructure0% | 0% | 72% | 17% | 9%
Legacy.Monolith/Controllers0% | 0% | 61% | 14% | 24%
Modernized.Backend.ServiceA0% | 0% | 81% | 0% | 18%
Modernized.Backend.ServiceB0% | 0% | 81% | 0% | 18%
Legacy.Monolith/App_Start0% | 0% | 59% | 21% | 19%
Modernized.Lambda.Authorizer0% | 0% | 32% | 52% | 14%
Legacy.Monolith/Services0% | 0% | 0% | 80% | 20%
Modernized.Backend.ServiceA/Services0% | 0% | 0% | 48% | 51%
Modernized.Backend.ServiceB/Services0% | 0% | 0% | 48% | 51%
Modernized.Lambda.Authorizer/Services0% | 0% | 0% | 59% | 40%
Legacy.Monolith0% | 0% | 0% | 0% | 100%
Modernized.Backend.ServiceA/Controllers0% | 0% | 0% | 0% | 100%
Modernized.Backend.ServiceB/Controllers0% | 0% | 0% | 0% | 100%
Modernized.Lambda.Authorizer/Error0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
(function (global, factory)()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
999 79 2
function flip()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
99 25 1
function preventOverflow()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
89 35 1
_slide()
in Legacy.Monolith/Scripts/bootstrap.esm.js
62 13 2
show()
in Legacy.Monolith/Scripts/bootstrap.esm.js
62 15 0
_slide()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
62 13 2
show()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
62 15 0
show()
in Legacy.Monolith/Scripts/bootstrap.esm.js
61 15 0
show()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
61 15 0
function computeOffsets()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
54 12 1
function mapToStyles()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
52 20 1
function detectOverflow()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
49 18 2
trigger()
in Legacy.Monolith/Scripts/bootstrap.esm.js
46 11 3
trigger()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
43 11 3
show()
in Legacy.Monolith/Scripts/bootstrap.esm.js
42 13 0
show()
in Legacy.Monolith/Scripts/bootstrap.bundle.js
42 13 0
public void ConfigureAuth()
in Legacy.Monolith/App_Start/Startup.Auth.cs
39 3 1
function addHandler()
in Legacy.Monolith/Scripts/bootstrap.esm.js
39 15 5
_addTouchEventListeners()
in Legacy.Monolith/Scripts/bootstrap.esm.js
39 13 0
_getPopperConfig()
in Legacy.Monolith/Scripts/bootstrap.esm.js
39 3 1