microsoft / BingMapsRESTToolkit
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 164 units with 3,787 lines of code in units (51.3% of code).
    • 5 very long units (769 lines of code)
    • 11 long units (783 lines of code)
    • 37 medium size units (1,274 lines of code)
    • 33 small units (519 lines of code)
    • 78 very small units (442 lines of code)
20% | 20% | 33% | 13% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs20% | 20% | 33% | 13% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Source/Requests19% | 29% | 33% | 10% | 7%
Source/Extensions/TSP Resources69% | 11% | 14% | 2% | 1%
Source/Internal12% | 8% | 49% | 16% | 12%
Source/Models0% | 23% | 28% | 13% | 34%
Source/Models/ResponseModels0% | 30% | 14% | 31% | 24%
Source0% | 0% | 61% | 32% | 5%
Source/Extensions0% | 0% | 0% | 70% | 29%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public override async Task Solve()
in Source/Extensions/TSP Resources/GeneticTspAlgorithm.cs
225 38 2
private string GetTruckPostRequestBody()
in Source/Requests/RouteRequest.cs
192 50 2
public override async Task Execute()
in Source/Requests/RouteRequest.cs
141 28 1
private static void Crossover()
in Source/Extensions/TSP Resources/GeneticTspAlgorithm.cs
106 29 8
public async Task Calculate()
in Source/Internal/TruckDistanceMatrixGenerator.cs
105 28 2
public string GetPostRequestUrl()
in Source/Requests/ImageryRequest.cs
100 32 0
internal string GetUrlParam()
in Source/Models/RouteOptions.cs
81 27 1
private Task MergeRoutes()
in Source/Requests/RouteRequest.cs
79 16 1
private void GenerateIndex()
in Source/Models/ResponseModels/DistanceMatrix.cs
77 19 0
public string GetPostRequestBody()
in Source/Requests/DistanceMatrixRequest.cs
74 15 0
internal static Task PostStringAsync()
in Source/Internal/ServiceHelper.cs
72 9 3
public List GetElevationCoordinates()
in Source/Requests/ElevationRequest.cs
67 14 0
public override string GetRequestUrl()
in Source/Requests/IsochroneRequest.cs
65 18 0
public async Task Solve()
in Source/Extensions/TSP Resources/BaseTspAlgorithm.cs
57 23 5
private string GetRequestUrl()
in Source/Requests/RouteRequest.cs
56 10 2
public override string GetRequestUrl()
in Source/Requests/GeocodeRequest.cs
55 11 0
public async Task GetEuclideanDistanceMatrix()
in Source/Requests/DistanceMatrixRequest.cs
47 9 0
public override string GetRequestUrl()
in Source/Requests/DistanceMatrixRequest.cs
47 13 0
public override string GetRequestUrl()
in Source/Requests/ImageryMetadataRequest.cs
47 15 0
private static void ExtractPropertyInfo()
in Source/CustomMapStyleManager.cs
46 10 3