microsoft / service-fabric-services-and-actors-dotnet
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 2,061 units with 25,927 lines of code in units (65.3% of code).
    • 3 very long units (350 lines of code)
    • 39 long units (2,532 lines of code)
    • 271 medium size units (8,083 lines of code)
    • 562 small units (8,157 lines of code)
    • 1,186 very small units (6,805 lines of code)
1% | 9% | 31% | 31% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs1% | 9% | 31% | 31% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Microsoft.ServiceFabric.Actors1% | 7% | 30% | 31% | 29%
src/Microsoft.ServiceFabric.Services3% | 19% | 27% | 27% | 21%
src/FabActUtil4% | 13% | 36% | 28% | 15%
src/Microsoft.ServiceFabric.Services.Remoting0% | 9% | 30% | 32% | 26%
src/Microsoft.ServiceFabric.Services.Wcf0% | 0% | 44% | 31% | 23%
src/Microsoft.ServiceFabric.Actors.Wcf0% | 0% | 0% | 51% | 48%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public async Task DeleteActorAsync()
in src/Microsoft.ServiceFabric.Actors/Runtime/ActorManager.cs
123 9 3
protected abstract void AbortClient()
in src/Microsoft.ServiceFabric.Services/Communication/Client/CommunicationClientFactoryBase.cs
123 14 1
private bool LexFileArguments()
in src/FabActUtil/CommandLineParser/CommandLineArgumentParser.cs
104 18 2
internal async Task ExecuteWithRetriesAsync()
in src/Microsoft.ServiceFabric.Actors/Runtime/ActorStateProviderHelper.cs
100 19 3
private async Task ResolveHelperAsync()
in src/Microsoft.ServiceFabric.Services/Client/ServicePartitionResolver.cs
92 17 10
public async Task InvokeWithRetryAsync()
in src/Microsoft.ServiceFabric.Services/Communication/Client/ServicePartitionClient.cs
89 10 3
public async Task InvokeAsync()
in src/Microsoft.ServiceFabric.Services.Remoting/V2/Client/ServiceRemotingPartitionClient.cs
82 8 3
public async Task Acquire()
in src/Microsoft.ServiceFabric.Actors/Runtime/ActorConcurrencyLock.cs
79 10 4
protected virtual void AddAsyncMethodImplementation()
in src/Microsoft.ServiceFabric.Services.Remoting/Builder/ProxyGeneratorBuilder.cs
76 8 4
private bool ParseArgumentList()
in src/FabActUtil/CommandLineParser/CommandLineArgumentParser.cs
75 13 2
public static ActorTypeInformation Get()
in src/Microsoft.ServiceFabric.Actors/Runtime/ActorTypeInformation.cs
75 12 1
private Task OnDispatch()
in src/Microsoft.ServiceFabric.Services.Remoting/V1/Runtime/ServiceRemotingDispatcher.cs
73 6 3
protected abstract TProxyGenerator CreateProxyGenerator()
in src/Microsoft.ServiceFabric.Services.Remoting/V2/Builder/ProxyGeneratorBuilder.cs
72 7 2
public async Task DispatchToActorAsync()
in src/Microsoft.ServiceFabric.Actors/Runtime/ActorManager.cs
70 6 7
private void CreateActorCounterWriters()
in src/Microsoft.ServiceFabric.Actors/Diagnostics/PerformanceCounterProvider.cs
69 2 1
public TServiceInterface CreateServiceProxy()
in src/Microsoft.ServiceFabric.Services.Remoting/Client/ServiceProxyFactory.cs
69 9 4
private static string InsertXmlComments()
in src/FabActUtil/Generator/XmlSerializationUtility.cs
67 15 2
public async Task FireReminderAsync()
in src/Microsoft.ServiceFabric.Actors/Runtime/ActorManager.cs
66 9 1
private Task OnDispatch()
in src/Microsoft.ServiceFabric.Services.Remoting/V2/Runtime/ServiceRemotingMessageDispatcher.cs
66 4 3
public async Task ReportOperationExceptionAsync()
in src/Microsoft.ServiceFabric.Services/Communication/Client/CommunicationClientFactoryBase.cs
66 9 4