microsoft / Bing-Maps-Fleet-Tracker
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 807 units with 9,086 lines of code in units (46.3% of code).
    • 5 very long units (655 lines of code)
    • 10 long units (671 lines of code)
    • 79 medium size units (2,498 lines of code)
    • 187 small units (2,608 lines of code)
    • 526 very small units (2,654 lines of code)
7% | 7% | 27% | 28% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs7% | 8% | 29% | 28% | 26%
ts6% | 4% | 21% | 29% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Backend/src/Trackable.Web29% | 0% | 17% | 20% | 32%
Frontend/src/app8% | 5% | 24% | 25% | 35%
Backend/src/Trackable.Repositories16% | 0% | 9% | 31% | 42%
Backend/src/Trackable.Services12% | 0% | 30% | 37% | 19%
Backend/src/Trackable.EntityFramework0% | 29% | 26% | 24% | 19%
Backend/src/System.Device0% | 10% | 37% | 27% | 25%
Backend/src/Trackable.TripDetection0% | 6% | 38% | 38% | 16%
Backend/src/Trackable.Func0% | 0% | 68% | 13% | 18%
Backend/src/Trackable.Configurations0% | 0% | 87% | 0% | 12%
MobileClient/src/pages0% | 0% | 10% | 36% | 53%
MobileClient/src/providers0% | 0% | 0% | 59% | 40%
Backend/src/Trackable.Models0% | 0% | 0% | 34% | 65%
Backend/src/Trackable.Common0% | 0% | 0% | 8% | 91%
MobileClient/src/app0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
protected async override Task HandleRequirementAsync()
in Backend/src/Trackable.Web/Auth/RoleRequirementHandler.cs
157 45 2
ngOnInit()
in Frontend/src/app/maps/maps/maps.component.ts
145 5 0
public ModelMappingProfile()
in Backend/src/Trackable.Repositories/AutoMapper/ModelMappingProfile.cs
129 19 0
public void ConfigureServices()
in Backend/src/Trackable.Web/Startup.cs
119 4 1
public string GenerateURL()
in Backend/src/Trackable.Services/Services/DispatchingService.cs
105 27 3
public override void Up()
in Backend/src/Trackable.EntityFramework/Migrations/201803071221497_ResourceIdToString.cs
80 1 0
protected override Task ProcessInternal()
in Backend/src/Trackable.TripDetection/Modules/ClusteredStopDetectorModule.cs
80 15 1
private void HandleLocationChangedEvent()
in Backend/src/System.Device/Location/GeoCoordinateWatcherInternal.cs
76 20 1
private void HandleLocationChangedEvent()
in Backend/src/System.Device/Location/LocationProviderInternal.cs
72 18 1
public override void Up()
in Backend/src/Trackable.EntityFramework/Migrations/201701181247597_Initial.cs
71 1 0
private static async Task UpdateAsync()
in Backend/src/Trackable.EntityFramework/DbContextBulkOperations.cs
67 10 5
public override void Down()
in Backend/src/Trackable.EntityFramework/Migrations/201803071221497_ResourceIdToString.cs
62 1 0
public override void Up()
in Backend/src/Trackable.EntityFramework/Migrations/201702091023341_AddTripsDestinationConfigs.cs
56 1 0
private showDetailedTrip()
in Frontend/src/app/maps/bing-maps.service.ts
55 9 1
private showSimplifiedTrip()
in Frontend/src/app/maps/bing-maps.service.ts
52 7 2
public CivicAddress()
in Backend/src/System.Device/Location/CivicAddress.cs
49 18 8
public CivicAddress()
in Backend/src/System.Device/Location/CivicAddressResolver.cs
49 18 8
public async static Task Executor()
in Backend/src/Trackable.Func/PipelineFunction.cs
47 2 1
public async override Task Process()
in Backend/src/Trackable.TripDetection/Modules/TripExtractorBase.cs
47 5 2
public override Task Process()
in Backend/src/Trackable.TripDetection/Modules/NoiseRemovalModule.cs
46 12 2