aws-samples / aws-netcoreapi-aurora-cdk
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 28 units with 419 lines of code in units (56.3% of code).
    • 1 very long units (141 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (118 lines of code)
    • 5 small units (80 lines of code)
    • 18 very small units (80 lines of code)
33% | 0% | 28% | 19% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs33% | 0% | 28% | 19% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cdk/src/Todo95% | 0% | 0% | 0% | 4%
cdk/src/Todo/Modules0% | 0% | 67% | 32% | 0%
cdk/src/Todo/Utilities0% | 0% | 100% | 0% | 0%
webapi/Models0% | 0% | 33% | 53% | 13%
webapi0% | 0% | 0% | 42% | 57%
webapi/Controllers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public TodoInfraStack()
in cdk/src/Todo/TodoInfraStack.cs
141 2 3
public static Role GetRole()
in cdk/src/Todo/Utilities/ServiceProvider.cs
32 4 7
public Role GetRole()
in cdk/src/Todo/Modules/FargateTaskRole.cs
32 4 7
public Role GetRole()
in cdk/src/Todo/Modules/FargateExecutionRole.cs
32 4 7
public List GetAllTodos()
in webapi/Models/TodoContext.cs
22 2 0
public void CreateToDosTable()
in webapi/Models/TodoContext.cs
20 1 0
public FargateTaskRole()
in cdk/src/Todo/Modules/FargateTaskRole.cs
16 1 2
public FargateExecutionRole()
in cdk/src/Todo/Modules/FargateExecutionRole.cs
15 1 2
public void SaveTodo()
in webapi/Models/TodoContext.cs
15 1 2
public void Configure()
in webapi/Startup.cs
14 2 2
public void Post()
in webapi/Controllers/TodoController.cs
10 4 1
static void Main()
in cdk/src/Todo/Program.cs
6 1 1
6 1 1
public TodoController()
in webapi/Controllers/TodoController.cs
5 1 1
public TodoContext()
in webapi/Models/TodoContext.cs
5 1 1
5 1 1
public List Get()
in webapi/Controllers/TodoController.cs
4 1 0
public string Get()
in webapi/Controllers/TodoController.cs
4 1 1
public IEnumerable Get()
in webapi/Controllers/ValuesController.cs
4 1 0
public string Get()
in webapi/Controllers/ValuesController.cs
4 1 1