aws-samples / cycle-store-core-mvc-app
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 19 units with 182 lines of code in units (7.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (74 lines of code)
    • 0 medium size units (0 lines of code)
    • 2 small units (31 lines of code)
    • 16 very small units (77 lines of code)
0% | 40% | 0% | 17% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 40% | 0% | 17% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AdventureWorksMVCCore.Web/Models0% | 77% | 0% | 0% | 22%
AdventureWorksMVCCore.Web0% | 0% | 0% | 68% | 31%
AdventureWorksMVCCore.Web/Views/Shared0% | 0% | 0% | 0% | 100%
AdventureWorksMVCCore.Web/Controllers0% | 0% | 0% | 0% | 100%
AdventureWorksMVCCore.Web/Service/Implementation0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
protected override void OnModelCreating()
in AdventureWorksMVCCore.Web/Models/CYCLE_STOREContext.cs
74 1 1
public void Configure()
in AdventureWorksMVCCore.Web/Startup.cs
20 2 2
public void ConfigureServices()
in AdventureWorksMVCCore.Web/Startup.cs
11 1 1
protected override void OnConfiguring()
in AdventureWorksMVCCore.Web/Models/CYCLE_STOREContext.cs
10 2 1
public List GetCategoriesWithSubCategory()
in AdventureWorksMVCCore.Web/Service/Implementation/CategoryService.cs
6 1 0
public ContentViewComponent()
in AdventureWorksMVCCore.Web/Views/Shared/Components/Content/ContentLayout.cs
6 1 2
public IViewComponentResult Invoke()
in AdventureWorksMVCCore.Web/Views/Shared/Components/Content/ContentLayout.cs
6 1 0
public static IHostBuilder CreateHostBuilder()
in AdventureWorksMVCCore.Web/Program.cs
6 1 1
public CategoryService()
in AdventureWorksMVCCore.Web/Service/Implementation/CategoryService.cs
4 1 1
public IViewComponentResult Invoke()
in AdventureWorksMVCCore.Web/Views/Shared/Components/Header/HeaderLayout.cs
4 1 0
public HomeController()
in AdventureWorksMVCCore.Web/Controllers/HomeController.cs
4 1 1
public IActionResult Index()
in AdventureWorksMVCCore.Web/Controllers/HomeController.cs
4 1 0
public IActionResult Privacy()
in AdventureWorksMVCCore.Web/Controllers/HomeController.cs
4 1 0
public IActionResult Error()
in AdventureWorksMVCCore.Web/Controllers/HomeController.cs
4 1 0
public ProductCategory()
in AdventureWorksMVCCore.Web/Models/ProductCategory.cs
4 1 0
public CYCLE_STOREContext()
in AdventureWorksMVCCore.Web/Models/CYCLE_STOREContext.cs
4 1 1
public Startup()
in AdventureWorksMVCCore.Web/Startup.cs
4 1 1
public static void Main()
in AdventureWorksMVCCore.Web/Program.cs
4 1 1
public CYCLE_STOREContext()
in AdventureWorksMVCCore.Web/Models/CYCLE_STOREContext.cs
3 1 0