aws-samples / containerized-game-servers
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 11 units with 144 lines of code in units (6.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (53 lines of code)
    • 0 medium size units (0 lines of code)
    • 4 small units (56 lines of code)
    • 6 very small units (35 lines of code)
0% | 36% | 0% | 38% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 36% | 0% | 38% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lumberyard-sample/ci0% | 64% | 0% | 31% | 3%
lumberyard-sample/infra0% | 0% | 0% | 100% | 0%
NodePortController/src0% | 0% | 0% | 30% | 69%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def __init__()
in lumberyard-sample/ci/ec2-build/ec2_build/ec2_build_stack.py
53 1 4
def lambda_handler()
in lumberyard-sample/infra/stk-player-events-filter/lambda_function.py
16 2 2
def create_fn()
in NodePortController/src/main.py
14 5 6
def publish_game_server_status()
in lumberyard-sample/ci/eks-artifacts/start.py
13 3 2
def get_rand_port()
in lumberyard-sample/ci/eks-artifacts/start.py
13 3 0
def get_instance_id()
in NodePortController/src/main.py
10 2 1
def add_game_server()
in NodePortController/src/main.py
8 3 3
def delete_fn()
in NodePortController/src/main.py
6 1 5
def create_node_port_service()
in NodePortController/src/main.py
6 1 3
def sigterm_handler()
in lumberyard-sample/ci/eks-artifacts/start.py
3 1 2
def my_handler()
in NodePortController/src/main.py
2 1 2