aws-samples / aws-xray-dotnet-webapp
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 57 units with 431 lines of code in units (43.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 12 small units (164 lines of code)
    • 45 very small units (267 lines of code)
0% | 0% | 0% | 38% | 61%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 0% | 0% | 38% | 61%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
DotNETCore/Controllers0% | 0% | 0% | 44% | 55%
DotNET/src0% | 0% | 0% | 40% | 59%
DotNETCore-Agent/Controllers0% | 0% | 0% | 32% | 67%
DotNET-Agent/src0% | 0% | 0% | 30% | 69%
DotNETCore0% | 0% | 0% | 42% | 57%
DotNETCore-Agent0% | 0% | 0% | 50% | 50%
DotNETCore/Models0% | 0% | 0% | 0% | 100%
DotNETCore-Agent/Models0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public string Get()
in DotNETCore/Controllers/ProductsController.cs
15 2 1
private void CustomSubsegment()
in DotNETCore/Controllers/ProductsController.cs
15 2 0
public void Configure()
in DotNETCore/Startup.cs
15 2 2
private void CustomSubsegment()
in DotNET/src/Controllers/ProductsController.cs
15 2 0
public void Configure()
in DotNETCore-Agent/Startup.cs
14 2 2
public IHttpActionResult GetProduct()
in DotNET/src/Controllers/ProductsController.cs
14 2 1
static ProductsController()
in DotNETCore/Controllers/ProductsController.cs
13 1 0
static ProductsController()
in DotNETCore-Agent/Controllers/ProductsController.cs
13 1 0
public string Get()
in DotNETCore-Agent/Controllers/ProductsController.cs
13 2 1
public IHttpActionResult GetProduct()
in DotNET-Agent/src/Controllers/ProductsController.cs
13 2 1
public IHttpActionResult PostProduct()
in DotNET/src/Controllers/ProductsController.cs
12 2 1
public IHttpActionResult PostProduct()
in DotNET-Agent/src/Controllers/ProductsController.cs
12 2 1
private void QuerySql()
in DotNETCore/Controllers/ProductsController.cs
10 1 1
private void QuerySql()
in DotNETCore-Agent/Controllers/ProductsController.cs
10 1 1
private void QuerySql()
in DotNET/src/Controllers/ProductsController.cs
10 1 1
private void QuerySql()
in DotNET-Agent/src/Controllers/ProductsController.cs
10 1 1
private Product QueryProduct()
in DotNETCore/Controllers/ProductsController.cs
9 2 1
private Product QueryProduct()
in DotNETCore-Agent/Controllers/ProductsController.cs
9 2 1
public static void Register()
in DotNET/src/App_Start/WebApiConfig.cs
9 1 1
private Product QueryProduct()
in DotNET/src/Controllers/ProductsController.cs
9 2 1