aws-samples / serverless-games-on-aws
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 8 units with 141 lines of code in units (82.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (53 lines of code)
    • 2 medium size units (56 lines of code)
    • 1 small units (11 lines of code)
    • 4 very small units (21 lines of code)
0% | 37% | 39% | 7% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 82% | 0% | 17% | 0%
cs0% | 0% | 72% | 0% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Serverless Data Analytics Lab0% | 82% | 0% | 17% | 0%
Cognito User Pools Authentication Lab0% | 0% | 72% | 0% | 27%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in Serverless Data Analytics Lab/lambda_function.py
53 2 2
private async Task SignUpMethodAsync()
in Cognito User Pools Authentication Lab/Cognito.cs
29 2 0
private async Task SignInUser()
in Cognito User Pools Authentication Lab/Cognito.cs
27 2 0
def lambda_handler()
in Serverless Data Analytics Lab/Kinesis_Lambda.py
11 1 2
void Start()
in Cognito User Pools Authentication Lab/Cognito.cs
6 1 0
void Update()
in Cognito User Pools Authentication Lab/Cognito.cs
5 2 0
public void on_signup_click()
in Cognito User Pools Authentication Lab/Cognito.cs
5 1 0
public void on_signin_click()
in Cognito User Pools Authentication Lab/Cognito.cs
5 1 0