aws-samples / amazon-qldb-dmv-sample-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 48 units with 600 lines of code in units (54.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 8 medium size units (249 lines of code)
    • 8 small units (117 lines of code)
    • 31 very small units (183 lines of code)
0% | 8% | 41% | 19% | 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% | 8% | 41% | 19% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Amazon.QLDB.DMVSample.Api/Functions0% | 16% | 54% | 6% | 23%
Amazon.QLDB.DMVSample.LedgerSetup0% | 0% | 31% | 37% | 31%
Amazon.QLDB.DMVSample.Api/Services0% | 0% | 0% | 0% | 100%
Amazon.QLDB.DMVSample.Model0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public APIGatewayProxyResponse FunctionHandler()
in Amazon.QLDB.DMVSample.Api/Functions/AddSecondaryOwnerFunction.cs
51 4 2
public APIGatewayProxyResponse FunctionHandler()
in Amazon.QLDB.DMVSample.Api/Functions/QueryVehicleRegistrationHistoryFunction.cs
47 3 2
public APIGatewayProxyResponse FunctionHandler()
in Amazon.QLDB.DMVSample.Api/Functions/AddVehicleRegistrationFunction.cs
35 3 2
public APIGatewayProxyResponse FunctionHandler()
in Amazon.QLDB.DMVSample.Api/Functions/FindVehiclesFunction.cs
31 2 2
private async Task InsertVehicleRegistrations()
in Amazon.QLDB.DMVSample.LedgerSetup/SampleData.cs
31 2 1
public APIGatewayProxyResponse FunctionHandler()
in Amazon.QLDB.DMVSample.Api/Functions/AddVehicleFunction.cs
27 2 2
public APIGatewayProxyResponse FunctionHandler()
in Amazon.QLDB.DMVSample.Api/Functions/AddPersonFunction.cs
27 2 2
private async Task InsertDriversLicenses()
in Amazon.QLDB.DMVSample.LedgerSetup/SampleData.cs
26 2 1
private async Task CheckIndexExistsAsync()
in Amazon.QLDB.DMVSample.LedgerSetup/CreateIndexes.cs
25 4 2
private IEnumerable GetSecondaryOwners()
in Amazon.QLDB.DMVSample.Api/Functions/AddSecondaryOwnerFunction.cs
19 3 2
private async Task InsertVehicles()
in Amazon.QLDB.DMVSample.LedgerSetup/SampleData.cs
18 1 0
public async Task Run()
in Amazon.QLDB.DMVSample.LedgerSetup/SampleData.cs
15 1 0
private async Task CheckIfLedgerActiveAsync()
in Amazon.QLDB.DMVSample.LedgerSetup/CreateLedger.cs
15 2 0
private static async Task PerformSetup()
in Amazon.QLDB.DMVSample.LedgerSetup/Program.cs
14 1 0
private async Task CreateTableAsync()
in Amazon.QLDB.DMVSample.LedgerSetup/CreateTables.cs
12 2 1
public async Task Run()
in Amazon.QLDB.DMVSample.LedgerSetup/CreateIndexes.cs
12 1 0
private async Task CreateIndexAsync()
in Amazon.QLDB.DMVSample.LedgerSetup/CreateIndexes.cs
12 2 2
public async Task Run()
in Amazon.QLDB.DMVSample.LedgerSetup/CreateTables.cs
10 1 0
private async Task DeleteDataFromTable()
in Amazon.QLDB.DMVSample.LedgerSetup/SampleData.cs
9 1 1
public async Task Run()
in Amazon.QLDB.DMVSample.LedgerSetup/CreateLedger.cs
9 2 0