microsoft / WingtipTicketsSaaS-DbPerTenant
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 79 units with 1,425 lines of code in units (7.2% of code).
    • 1 very long units (171 lines of code)
    • 6 long units (377 lines of code)
    • 11 medium size units (366 lines of code)
    • 16 small units (214 lines of code)
    • 45 very small units (297 lines of code)
12% | 26% | 25% | 15% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs12% | 26% | 25% | 15% | 20%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
App/src12% | 26% | 25% | 15% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
protected override void OnModelCreating()
in App/src/Events-TenantUserApp.EF/TenantsDB/TenantDbContext.cs
171 1 1
protected override void OnModelCreating()
in App/src/Events-TenantUserApp.EF/CatalogDB/CatalogDbContext.cs
85 1 1
public async Task Index()
in App/src/Events-TenantUserApp/Controllers/EventsController.cs
75 11 1
public void Configure()
in App/src/Events-TenantUserApp/Startup.cs
62 4 3
public async Task Login()
in App/src/Events-TenantUserApp/Controllers/AccountController.cs
53 6 2
public async Task Register()
in App/src/Events-TenantUserApp/Controllers/AccountController.cs
51 6 2
public async Task Index()
in App/src/Events-TenantUserApp/Controllers/HomeController.cs
51 10 0
private TenantConfig PopulateTenantConfigs()
in App/src/Events-TenantUserApp/Controllers/BaseController.cs
47 4 3
public async void RegisterTenantShard()
in App/src/Events-Tenant.Common/Utilities/Utilities.cs
46 7 4
public async Task FindSeats()
in App/src/Events-TenantUserApp/Controllers/FindSeatsController.cs
42 6 2
protected void SetTenantConfig()
in App/src/Events-TenantUserApp/Controllers/BaseController.cs
40 6 2
public static async Task RegisterNewShard()
in App/src/Events-Tenant.Common/Utilities/Sharding.cs
34 4 5
public async Task PurchaseTickets()
in App/src/Events-TenantUserApp/Controllers/FindSeatsController.cs
34 4 6
private void ReadAppConfig()
in App/src/Events-TenantUserApp/Startup.cs
28 2 0
public async Task GetVenueDetails()
in App/src/Events-Tenant.Common/Repositories/TenantRepository.cs
25 3 1
public async Task GetAvailableSeats()
in App/src/Events-TenantUserApp/Controllers/FindSeatsController.cs
25 3 3
public Sharding()
in App/src/Events-Tenant.Common/Utilities/Sharding.cs
24 4 5
public void ConfigureServices()
in App/src/Events-TenantUserApp/Startup.cs
21 1 1
private List GetAllTenantNames()
in App/src/Events-Tenant.Common/Utilities/Utilities.cs
20 2 2
public ActionResult Logout()
in App/src/Events-TenantUserApp/Controllers/AccountController.cs
18 4 2