microsoft / StoreBroker
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 27 units with 696 lines of code in units (4.5% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (270 lines of code)
    • 10 medium size units (307 lines of code)
    • 4 small units (60 lines of code)
    • 9 very small units (59 lines of code)
0% | 38% | 44% | 8% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 38% | 44% | 8% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
RESTProxy/Models0% | 36% | 49% | 7% | 6%
RESTProxy/Controllers0% | 100% | 0% | 0% | 0%
RESTProxy/App_Start0% | 0% | 45% | 26% | 28%
RESTProxy0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private static bool TryGetEndpoint()
in RESTProxy/Models/ProxyManager.cs
88 12 5
public async Task RouteRequest()
in RESTProxy/Controllers/RootController.cs
64 7 20
public async Task PerformRequestAsync()
in RESTProxy/Models/Endpoint.cs
59 7 7
public static async Task PerformRequestAsync()
in RESTProxy/Models/ProxyManager.cs
59 5 10
private bool TryHasPermission()
in RESTProxy/Models/Endpoint.cs
40 7 3
38 8 1
public static void Configure()
in RESTProxy/Models/ProxyManager.cs
35 5 2
private async Task RefreshAccessTokenAsync()
in RESTProxy/Models/Endpoint.cs
34 1 0
private static void LogTelemetryEvent()
in RESTProxy/Models/ProxyManager.cs
32 1 12
public Endpoint GetNextEndpoint()
in RESTProxy/Models/TenantEndpointCollection.cs
31 3 1
public static void Register()
in RESTProxy/App_Start/WebApiConfig.cs
29 1 1
public void Add()
in RESTProxy/Models/TenantEndpointCollection.cs
25 2 1
public Endpoint()
in RESTProxy/Models/Endpoint.cs
22 1 8
21 2 1
private static void ConfigureTelemetry()
in RESTProxy/App_Start/WebApiConfig.cs
17 3 1
public Task LockAsync()
in RESTProxy/Models/AsyncLock.cs
17 2 0
private async Task GetAccessTokenAsync()
in RESTProxy/Models/Endpoint.cs
14 3 0
public Endpoint Duplicate()
in RESTProxy/Models/Endpoint.cs
12 1 0
private static void ConfigureProxyManager()
in RESTProxy/App_Start/WebApiConfig.cs
10 2 0
public static string EncryptSecret()
in RESTProxy/Models/Encryption.cs
9 1 2