microsoft / Service-Fabric-POA
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 261 units with 4,354 lines of code in units (70.9% of code).
    • 1 very long units (124 lines of code)
    • 16 long units (1,096 lines of code)
    • 45 medium size units (1,311 lines of code)
    • 69 small units (1,047 lines of code)
    • 130 very small units (776 lines of code)
2% | 25% | 30% | 24% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs2% | 25% | 30% | 24% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/PatchOrchestrationApplication/NodeAgentNTService/src5% | 20% | 29% | 28% | 16%
src/PatchOrchestrationApplication/NodeAgentSFUtility/src0% | 48% | 31% | 8% | 12%
src/PatchOrchestrationApplication/CoordinatorService/src0% | 26% | 31% | 22% | 18%
src/PatchOrchestrationApplication/NodeAgentService/src0% | 28% | 12% | 37% | 21%
src/PatchOrchestrationApplication/TelemetryLib/src0% | 0% | 57% | 10% | 31%
src/PatchOrchestrationApplication/Common0% | 0% | 36% | 16% | 48%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private bool HandleWUOperationStates()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Manager/WindowsUpdateManager.cs
124 22 1
public async Task UpdateInstallationStatusAsync()
in src/PatchOrchestrationApplication/NodeAgentSFUtility/src/CommandProcessor.cs
98 9 6
private void ScheduleTimer()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Manager/TimerManager.cs
89 14 0
public async Task GetWuOperationStateAsync()
in src/PatchOrchestrationApplication/NodeAgentSFUtility/src/CommandProcessor.cs
89 13 3
private void ParseWUFrequency()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Manager/ServiceSettings.cs
86 19 0
private DateTime GetNextSchedulingTime()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Manager/TimerManager.cs
80 15 0
public async Task UpdateSearchAndDownloadStatusAsync()
in src/PatchOrchestrationApplication/NodeAgentSFUtility/src/CommandProcessor.cs
76 6 7
private OperationResultCode DownloadUpdatesUtil()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Manager/WindowsUpdateManager.cs
67 11 1
internal async Task PrepareRepairTasks()
in src/PatchOrchestrationApplication/CoordinatorService/src/RepairManagerHelper.cs
65 13 1
public static void EnablePrivilege()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Utility/ShutdownUtility.cs
65 7 0
internal async Task TimeoutRepairTasks()
in src/PatchOrchestrationApplication/CoordinatorService/src/RepairManagerHelper.cs
63 10 1
internal async Task RunMonitoringAsync()
in src/PatchOrchestrationApplication/NodeAgentService/src/MonitorWindowsService.cs
56 6 1
public async Task PostClusterPatchingStatus()
in src/PatchOrchestrationApplication/CoordinatorService/src/RepairManagerHelper.cs
55 7 1
private void ModifySettings()
in src/PatchOrchestrationApplication/CoordinatorService/src/CoordinatorService.cs
54 10 1
private OperationResultCode InstallUpdatesUtil()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Manager/WindowsUpdateManager.cs
51 10 1
public async Task ProcessArguments()
in src/PatchOrchestrationApplication/NodeAgentSFUtility/src/CommandProcessor.cs
51 9 1
private static void ValidateNTServiceSettings()
in src/PatchOrchestrationApplication/NodeAgentService/src/NTServiceConfigurationUtility.cs
51 11 3
private void DisableWindowsUpdate()
in src/PatchOrchestrationApplication/NodeAgentNTService/src/Manager/TimerManager.cs
48 6 0
public async Task ClearOrphanEvents()
in src/PatchOrchestrationApplication/CoordinatorService/src/RepairManagerHelper.cs
44 9 1
private void PatchInstallationEvent()
in src/PatchOrchestrationApplication/TelemetryLib/src/TelemetryEvents.cs
42 1 11