aws-samples / amazon-ecs-dotnet-app-graviton
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 60 units with 707 lines of code in units (44.7% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (128 lines of code)
    • 7 medium size units (202 lines of code)
    • 11 small units (161 lines of code)
    • 40 very small units (216 lines of code)
0% | 18% | 28% | 22% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 18% | 28% | 22% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
app/Migrations0% | 69% | 25% | 0% | 4%
app/Controllers0% | 0% | 45% | 30% | 23%
app0% | 0% | 60% | 24% | 14%
app/Data0% | 0% | 0% | 34% | 65%
app/Attribute0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
protected override void BuildModel()
in app/Migrations/MvcMovieContextModelSnapshot.cs
64 1 1
protected override void BuildTargetModel()
in app/Migrations/20210407143338_InitialCreate.Designer.cs
64 1 1
protected override void Up()
in app/Migrations/20210407143338_InitialCreate.cs
48 1 1
public async Task Index()
in app/Controllers/HomeController.cs
32 5 3
public async Task Edit()
in app/Controllers/HomeController.cs
29 5 2
27 6 1
public async Task ChangePassword()
in app/Controllers/AccountController.cs
22 6 1
public async Task SetPassword()
in app/Controllers/AccountController.cs
22 6 1
public void Configure()
in app/Startup.cs
22 2 2
public static void Main()
in app/Program.cs
20 2 1
public async Task Login()
in app/Controllers/AccountController.cs
19 4 1
17 2 1
public async Task CreateAsync()
in app/Data/AppUserStore.cs
15 3 2
public async Task UpdateAsync()
in app/Data/AppUserStore.cs
15 3 2
public async Task Details()
in app/Controllers/HomeController.cs
14 3 1
public async Task Delete()
in app/Controllers/HomeController.cs
14 3 1
public async Task Edit()
in app/Controllers/HomeController.cs
13 3 1
12 2 1
public async Task Create()
in app/Controllers/HomeController.cs
11 2 1
public async Task FindByIdAsync()
in app/Data/AppUserStore.cs
11 3 2