aws-samples / saas-tenant-isolation-architecture
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 65 units with 400 lines of code in units (40.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (93 lines of code)
    • 8 small units (113 lines of code)
    • 53 very small units (194 lines of code)
0% | 0% | 23% | 28% | 48%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 23% | 28% | 48%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ExportTenantData/src/main/java/tenant/export0% | 0% | 69% | 16% | 13%
TokenVendingLayer/src/main/java/tenant/vendinglayer/token0% | 0% | 23% | 45% | 30%
AssumeRoleWatchDog/src/main/java/tenant/watchdog0% | 0% | 100% | 0% | 0%
TokenVendingLayer/src/main/java/tenant/vendinglayer0% | 0% | 0% | 91% | 8%
TokenVendingLayer/src/main/java/tenant/vendinglayer/template0% | 0% | 0% | 26% | 73%
ExportTenantData/src/main/java/tenant/export/models0% | 0% | 0% | 27% | 72%
ExportTenantData/src/main/java/tenant/export/errors0% | 0% | 0% | 0% | 100%
AssumeRoleWatchDog/src/main/java/tenant/watchdog/models0% | 0% | 0% | 0% | 100%
TokenVendingLayer/src/main/java/tenant/vendinglayer/policy0% | 0% | 0% | 0% | 100%
TokenVendingLayer/src/main/java/tenant/vendinglayer/exceptions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private String getBearerToken()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/token/JwtTokenVendor.java
24 7 1
public APIGatewayProxyResponseEvent handlePostRequest()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
23 2 2
public APIGatewayProxyResponseEvent handleGetRequest()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
23 2 2
public void handleRequest()
in AssumeRoleWatchDog/src/main/java/tenant/watchdog/WatchdogHandler.java
23 5 3
public AwsCredentialsProvider getCredentialsForTenant()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/token/JwtTokenVendor.java
18 4 2
public TokenVendor()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/TokenVendor.java
17 3 0
public AwsCredentialsProvider vendToken()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/token/JwtTokenVendor.java
17 3 0
public AwsCredentialsProvider vendTokenJwt()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/TokenVendor.java
16 1 1
private static String stringifyFile()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/template/PolicyLoader.java
12 3 1
public TenantProduct()
in ExportTenantData/src/main/java/tenant/export/models/TenantProduct.java
11 1 3
public APIGatewayProxyResponseEvent handleRequest()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
11 3 2
public JwtTokenVendor()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/token/JwtTokenVendor.java
11 1 1
public TenantProduct()
in ExportTenantData/src/main/java/tenant/export/models/TenantProduct.java
10 1 2
private String createBadRequestResponse()
in ExportTenantData/src/main/java/tenant/export/ApiGatewayHandler.java
9 2 2
public String generatePolicy()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/policy/FilePolicyGenerator.java
9 1 0
public GatewayError()
in ExportTenantData/src/main/java/tenant/export/errors/GatewayError.java
6 1 4
public static String assemblePolicyTemplates()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/template/PolicyLoader.java
6 1 1
private static Stream streamFiles()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/template/PolicyLoader.java
5 2 1
public String getTenantScopedPolicyTemplate()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/template/PolicyTemplateProcessor.java
5 1 0
public FilePolicyGenerator()
in TokenVendingLayer/src/main/java/tenant/vendinglayer/policy/FilePolicyGenerator.java
4 1 2