aws-samples / i-love-my-local-farmer
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 381 units with 3,743 lines of code in units (60.4% of code).
    • 3 very long units (357 lines of code)
    • 7 long units (468 lines of code)
    • 23 medium size units (730 lines of code)
    • 62 small units (903 lines of code)
    • 286 very small units (1,285 lines of code)
9% | 12% | 19% | 24% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java9% | 12% | 19% | 24% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
DeliveryApi/cdk/src18% | 48% | 21% | 8% | 2%
WorkingFromHome/ClientConnection/src52% | 0% | 20% | 25% | 1%
FlywayLambdaService/src/main10% | 0% | 20% | 10% | 58%
JavaSpringMigration/cdk/src0% | 44% | 18% | 35% | 2%
DeliveryApi/ApiHandlers/src0% | 0% | 30% | 41% | 28%
WorkingFromHome/ClientConnection/AdConnectorCustomResource0% | 0% | 65% | 34% | 0%
DeliveryApi/ApiHandlers/tst0% | 0% | 7% | 52% | 39%
JavaSpringMigration/app/src0% | 0% | 0% | 8% | 91%
WorkingFromHome/SiteToSiteConnection/src0% | 0% | 0% | 82% | 17%
WorkingFromHome/CustomResourceUtils/src0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void createApiGateway()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/api/ApiStack.java
133 3 1
public AdConnectorConstruct()
in WorkingFromHome/ClientConnection/src/main/java/com/ilmlf/clientconnection/AdConnectorConstruct.java
115 1 3
public Flyway configure()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/FlywayService.java
109 33 0
private void createBookDeliveryWidgetsAndAlarms()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/api/FunctionDashboard.java
88 1 1
public DbStack()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/db/DbStack.java
82 2 3
private void createCreateSlotsWidgetsAndAlarms()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/api/FunctionDashboard.java
67 1 1
public FlywayRunner()
in JavaSpringMigration/cdk/src/main/java/com/ilmlf/product/db/schemaManager/FlywayRunner.java
63 2 3
private void createGetSlotsWidgetsAndAlarms()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/api/FunctionDashboard.java
59 1 1
public DbStack()
in JavaSpringMigration/cdk/src/main/java/com/ilmlf/product/db/DbStack.java
56 2 3
public ApiFunction defaultLambdaRdsProxy()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/api/ApiStack.java
53 2 3
public APIGatewayProxyResponseEvent handleRequest()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/BookDelivery.java
47 6 2
public ClientVpnConstruct()
in WorkingFromHome/ClientConnection/src/main/java/com/ilmlf/clientconnection/ClientVpnConstruct.java
46 1 3
public HashMap handleRequest()
in WorkingFromHome/ClientConnection/AdConnectorCustomResource/src/main/java/com/ilmlf/adconnector/customresource/OnEventHandler.java
44 4 2
public static GitRequest build()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/request/GitRequest.java
39 3 1
private void createCommonWidgetsAndAlarms()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/api/FunctionDashboard.java
38 1 3
public Response handleRequest()
in FlywayLambdaService/src/main/java/com/geekoosh/flyway/FlywayHandler.java
36 7 2
public static void main()
in DeliveryApi/cdk/src/main/java/com/ilmlf/delivery/DeliveryApp.java
35 3 1
public APIGatewayProxyResponseEvent handleRequest()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/CreateSlots.java
35 5 2
public void testParseAndCreateSlotInvalidArgs()
in DeliveryApi/ApiHandlers/tst/com/ilmlf/delivery/api/handlers/CreateSlotsTest.java
34 2 0
public APIGatewayProxyResponseEvent handleRequest()
in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/GetSlots.java
33 4 2