aws / aws-extensions-for-dotnet-cli
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 479 units with 9,579 lines of code in units (63.5% of code).
    • 10 very long units (1,830 lines of code)
    • 23 long units (1,623 lines of code)
    • 105 medium size units (3,358 lines of code)
    • 107 small units (1,579 lines of code)
    • 234 very small units (1,189 lines of code)
19% | 16% | 35% | 16% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs19% | 17% | 34% | 16% | 12%
go0% | 0% | 73% | 26% | 0%
js0% | 0% | 0% | 46% | 53%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Amazon.Lambda.Tools20% | 19% | 37% | 14% | 8%
src/Amazon.ECS.Tools47% | 15% | 18% | 9% | 9%
src/Amazon.ElasticBeanstalk.Tools28% | 20% | 23% | 15% | 11%
src/Amazon.Common.DotNetCli.Tools0% | 13% | 50% | 23% | 12%
testapps/TestServerlessWebApp0% | 0% | 0% | 49% | 50%
testapps/MPDeployServerless0% | 0% | 0% | 22% | 77%
testapps/TestLayerAspNetCore0% | 0% | 0% | 27% | 72%
testapps/HelloWorldWebApp0% | 0% | 0% | 61% | 38%
testapps/TestBeanstalkWebApp0% | 0% | 0% | 61% | 38%
testapps/ServerlessWithYamlFunction0% | 0% | 0% | 78% | 21%
testapps/ImageBasedProjects0% | 0% | 0% | 0% | 100%
testapps/TestFunction0% | 0% | 0% | 0% | 100%
testapps/FlattenDependencyTestProjects0% | 0% | 0% | 0% | 100%
testapps/DependencyCheckTestProjects0% | 0% | 0% | 0% | 100%
testapps/TemplateSubstitutionTestProjects0% | 0% | 0% | 0% | 100%
testapps/TestLayerExample0% | 0% | 0% | 0% | 100%
testapps/TestLayerServerless0% | 0% | 0% | 0% | 100%
testapps/TestPowerShellParallelTest0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static async Task CreateOrUpdateTaskDefinition()
in src/Amazon.ECS.Tools/ECSUtilities.cs
425 104 6
protected override async Task PerformActionAsync()
in src/Amazon.Lambda.Tools/Commands/DeployFunctionCommand.cs
236 34 0
protected override async Task PerformActionAsync()
in src/Amazon.Lambda.Tools/Commands/DeployServerlessCommand.cs
200 40 0
private UpdateFunctionConfigurationRequest CreateConfigurationRequestIfDifferent()
in src/Amazon.Lambda.Tools/Commands/UpdateFunctionConfigCommand.cs
186 50 2
protected override async Task PerformActionAsync()
in src/Amazon.ElasticBeanstalk.Tools/Commands/DeployEnvironmentCommand.cs
176 30 0
public int Publish()
in src/Amazon.Lambda.Tools/LambdaDotNetCLIWrapper.cs
159 30 8
private async Task CreateOrUpdateService()
in src/Amazon.ECS.Tools/Commands/DeployServiceCommand.cs
120 23 4
private async Task CreateRuntimePackageStoreLayerZipFile()
in src/Amazon.Lambda.Tools/Commands/PublishLayerCommand.cs
113 18 2
private void AddAdditionalOptions()
in src/Amazon.ElasticBeanstalk.Tools/Commands/DeployEnvironmentCommand.cs
110 20 3
protected override async Task PerformActionAsync()
in src/Amazon.ECS.Tools/Commands/DeployScheduledTaskCommand.cs
105 10 0
private async Task CreateEnvironment()
in src/Amazon.ElasticBeanstalk.Tools/Commands/DeployEnvironmentCommand.cs
98 14 4
public static string ProcessTemplateSubstitions()
in src/Amazon.Lambda.Tools/LambdaUtilities.cs
94 19 4
protected override async Task PerformActionAsync()
in src/Amazon.Lambda.Tools/Commands/PackageCommand.cs
90 12 0
86 12 2
protected override async Task PerformActionAsync()
in src/Amazon.ECS.Tools/Commands/DeployTaskCommand.cs
83 10 0
public int Publish()
in src/Amazon.Common.DotNetCli.Tools/DotNetCLIWrapper.cs
80 15 5
public int Store()
in src/Amazon.Lambda.Tools/LambdaDotNetCLIWrapper.cs
76 12 7
public static FieldDefinition CreateFieldDefinitionForLambda()
in src/Amazon.Lambda.Tools/TemplateProcessor/UpdatableResourceDefinition.cs
75 10 1
public static bool CreateApplicationBundle()
in src/Amazon.Lambda.Tools/LambdaPackager.cs
74 17 12
private async Task ProcessUpdatableResourceAsync()
in src/Amazon.Lambda.Tools/TemplateProcessor/TemplateProcessorManager.cs
71 16 3