aws / porting-assistant-dotnet-ui
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 128 units with 1,963 lines of code in units (14.3% of code).
    • 3 very long units (334 lines of code)
    • 3 long units (173 lines of code)
    • 20 medium size units (681 lines of code)
    • 29 small units (402 lines of code)
    • 73 very small units (373 lines of code)
17% | 8% | 34% | 20% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs35% | 11% | 18% | 25% | 8%
ts0% | 8% | 48% | 13% | 30%
tsx0% | 0% | 55% | 22% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
packages/csharp/PortingAssistant/PortingAssistant.Common29% | 0% | 23% | 31% | 14%
packages/csharp/PortingAssistant/PortingAssistant.Telemetry58% | 0% | 41% | 0% | 0%
packages/csharp/PortingAssistant/PortingAssistant.Api39% | 22% | 0% | 32% | 5%
packages/electron/src0% | 28% | 36% | 12% | 22%
packages/csharp/PortingAssistant/PortingAssistant.VisualStudio0% | 53% | 0% | 35% | 11%
packages/react/src/store0% | 0% | 61% | 14% | 24%
packages/react/src/components0% | 0% | 43% | 22% | 34%
packages/electron/src/telemetry0% | 0% | 100% | 0% | 0%
packages/integration-test/src0% | 0% | 0% | 0% | 100%
packages/react/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public Response AnalyzeSolution()
in packages/csharp/PortingAssistant/PortingAssistant.Common/Services/AssesmentService.cs
117 9 1
public static void OnTimedEvent()
in packages/csharp/PortingAssistant/PortingAssistant.Telemetry/Utils/LogUploadUtils.cs
113 22 6
public void SetupConnection()
in packages/csharp/PortingAssistant/PortingAssistant.Api/Application.cs
104 8 1
function createWindow()
in packages/electron/src/electron.ts
62 3 0
static void Main()
in packages/csharp/PortingAssistant/PortingAssistant.Api/Program.cs
59 6 1
private static ISetupInstance2 GetLatestPath()
in packages/csharp/PortingAssistant/PortingAssistant.VisualStudio/VisualStudioFinder.cs
52 14 0
messageId: uuid()
in packages/react/src/components/AssessSolution/SolutionSummary.tsx
50 5 0
the solution()
in packages/react/src/components/MainContent.tsx
45 7 1
portedProjects: portedProjects()
in packages/react/src/store/selectors/tableSelectors.ts
42 9 3
incompatiblePackages: getIncompatibleNugets()
in packages/react/src/store/selectors/tableSelectors.ts
42 14 2
id: String()
in packages/react/src/components/Setup/ProfileSelection.tsx
41 3 1
buildErrors: getErrorCounts()
in packages/react/src/store/selectors/tableSelectors.ts
38 11 3
portingActions: getActionCounts()
in packages/react/src/store/selectors/tableSelectors.ts
37 11 3
public static void Main()
in packages/csharp/PortingAssistant/PortingAssistant.Telemetry/Program.cs
37 2 1
public static Response FeedbackUpload()
in packages/csharp/PortingAssistant/PortingAssistant.Common/Utils/CustomerContributionUtils.cs
37 4 3
ported: isPortingCompleted()
in packages/react/src/store/selectors/tableSelectors.ts
36 11 3
public static Response RuleContributionUpload()
in packages/csharp/PortingAssistant/PortingAssistant.Common/Utils/CustomerContributionUtils.cs
35 3 3
portability: getPercent()
in packages/react/src/store/selectors/tableSelectors.ts
34 13 2
portabilityNumber: getPercentNumber()
in packages/react/src/store/selectors/tableSelectors.ts
33 13 2
async getLatestVersion()
in packages/electron/src/LocalProvider.ts
31 5 0