aws / aws-toolkit-common
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 48 units with 643 lines of code in units (41.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (92 lines of code)
    • 7 medium size units (263 lines of code)
    • 6 small units (91 lines of code)
    • 34 very small units (197 lines of code)
0% | 14% | 40% | 14% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 21% | 40% | 5% | 32%
ts0% | 0% | 48% | 29% | 21%
kt0% | 0% | 34% | 32% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
telemetry/csharp/AwsToolkit.Telemetry.Events.Generator0% | 27% | 51% | 0% | 21%
telemetry/vscode/src0% | 0% | 48% | 29% | 21%
telemetry/jetbrains/src/main0% | 0% | 34% | 32% | 33%
telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/Models0% | 0% | 0% | 100% | 0%
telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/Utils0% | 0% | 0% | 32% | 67%
telemetry/csharp/AwsToolkit.Telemetry.Events/Core0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private CodeMemberMethod CreateRecordMetricMethodByDataClass()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/DefinitionsBuilder.cs
92 3 1
private CodeTypeDeclaration GenerateEnumStruct()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/DefinitionsBuilder.cs
47 2 1
public string Build()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/DefinitionsBuilder.cs
45 3 0
static void Main()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/Program.cs
42 4 1
private CodeTypeDeclaration CreateMetricDataClass()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/DefinitionsBuilder.cs
40 4 1
fun parseFiles()
in telemetry/jetbrains/src/main/kotlin/software/aws/toolkits/telemetry/generator/TelemetryParser.kt
34 1 2
export async function generate()
in telemetry/vscode/src/generate.ts
30 1 1
function getArgsFromMetadata()
in telemetry/vscode/src/generate.ts
25 8 1
export function validateInput()
in telemetry/vscode/src/parser.ts
17 4 2
async function parseArguments()
in telemetry/vscode/src/generateTelemetry.ts
17 3 0
fun buildResultOverloadFunction()
in telemetry/jetbrains/src/main/kotlin/software/aws/toolkits/telemetry/generator/TelemetryGenerator.kt
17 2 3
fun generateTelemetryFromFiles()
in telemetry/jetbrains/src/main/kotlin/software/aws/toolkits/telemetry/generator/TelemetryGenerator.kt
15 1 3
public static TelemetryDefinitions Load()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/Models/TelemetryDefinitions.cs
13 2 1
public static string ToPascalCase()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/Utils/StringExtensionMethods.cs
12 3 1
function globalArgs()
in telemetry/vscode/src/generate.ts
10 1 0
private bool IsNullable()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/DefinitionsBuilder.cs
10 3 1
fun generate()
in telemetry/jetbrains/src/main/kotlin/software/aws/toolkits/telemetry/generator/gradle/GenerateTelemetry.kt
9 2 0
public static void AddMetadata()
in telemetry/csharp/AwsToolkit.Telemetry.Events/Core/MetricDatumExtensionMethods.cs
9 2 3
public static string GetGeneratedTypeName()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/Utils/MetricTypeExtensionMethods.cs
9 2 1
public DefinitionsBuilder AddMetricsTypes()
in telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/DefinitionsBuilder.cs
9 2 2