aws / amazon-gamelift-plugin-unity
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 700 units with 9,211 lines of code in units (34.9% of code).
    • 2 very long units (441 lines of code)
    • 14 long units (948 lines of code)
    • 105 medium size units (3,085 lines of code)
    • 164 small units (2,335 lines of code)
    • 415 very small units (2,402 lines of code)
4% | 10% | 33% | 25% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs5% | 5% | 34% | 25% | 28%
py0% | 51% | 21% | 20% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Runtime/Core23% | 15% | 35% | 9% | 15%
Editor/Resources0% | 48% | 28% | 15% | 7%
Editor/Deployment0% | 14% | 28% | 29% | 27%
Samples~/SampleGame0% | 0% | 32% | 29% | 37%
Editor/CoreAPI0% | 0% | 34% | 29% | 36%
Editor/Bootstrap0% | 0% | 46% | 27% | 26%
Editor/PluginSettings0% | 0% | 46% | 26% | 26%
Editor/Credentials0% | 0% | 50% | 23% | 26%
Editor0% | 0% | 20% | 47% | 32%
Editor/LocalTest0% | 0% | 49% | 21% | 28%
Editor/Controls0% | 0% | 9% | 27% | 63%
Runtime0% | 0% | 0% | 93% | 6%
Samples~/CustomScenario0% | 0% | 0% | 88% | 11%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public CreateBucketResponse CreateBucket()
in Runtime/Core/BucketManagement/BucketStore.cs
306 29 1
public CreateChangeSetResponse CreateChangeSet()
in Runtime/Core/DeploymentManagement/DeploymentManager.cs
135 13 1
def handler()
in Editor/Resources/CloudFormation/scenario5_flexmatch/lambda/flexmatch_status_poller.py
89 12 2
def handler()
in Editor/Resources/CloudFormation/scenario4_spot_fleets/lambda/game_request.py
81 6 2
def handler()
in Editor/Resources/CloudFormation/scenario3_mrf_queue/lambda/game_request.py
81 6 2
public async Task StartDeployment()
in Editor/Deployment/DeploymentSettings.cs
78 11 1
def handler()
in Editor/Resources/CloudFormation/scenario5_flexmatch/lambda/matchmaker_event_handler.py
71 7 2
def handler()
in Editor/Resources/CloudFormation/scenario5_flexmatch/lambda/game_request.py
66 6 2
def handler()
in Editor/Resources/CloudFormation/scenario4_spot_fleets/lambda/results_request.py
65 11 2
def handler()
in Editor/Resources/CloudFormation/scenario3_mrf_queue/lambda/results_request.py
65 11 2
public async Task StartGame()
in Runtime/Core/ApiGatewayManagement/ApiGateway.cs
65 7 1
public async Task GetGameConnection()
in Runtime/Core/ApiGatewayManagement/ApiGateway.cs
59 6 1
private void OnGUI()
in Editor/Deployment/DeploymentWindow.cs
58 6 0
public StartResponse Start()
in Runtime/Core/GameLiftLocalTesting/GameLiftProcess.cs
58 5 1
public ExecuteChangeSetResponse ExecuteChangeSet()
in Runtime/Core/DeploymentManagement/DeploymentManager.cs
58 6 1
public RunLocalServerResponse RunLocalServer()
in Runtime/Core/GameLiftLocalTesting/GameLiftProcess.cs
54 6 1
def handler()
in Editor/Resources/CloudFormation/scenario5_flexmatch/lambda/results_request.py
46 6 2
public virtual async Task StartDeployment()
in Editor/CoreAPI/DeployerBase.cs
46 9 5
internal DeploymentRequestFactory()
in Editor/CoreAPI/DeploymentRequestFactory.cs
46 6 1
public CancelDeploymentResponse CancelDeployment()
in Runtime/Core/DeploymentManagement/DeploymentManager.cs
46 5 1