aws-samples / aws-gamelift-and-serverless-backend-sample
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 97 units with 1,410 lines of code in units (23.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (131 lines of code)
    • 5 simple units (156 lines of code)
    • 90 very simple units (1,123 lines of code)
0% | 0% | 9% | 11% | 79%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs0% | 0% | 11% | 13% | 74%
cpp0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
GameLiftExampleUnityProject/Assets/Scripts/Server0% | 0% | 14% | 13% | 71%
GameLiftExampleUnityProject/Assets/Scripts/Client0% | 0% | 11% | 17% | 71%
CppServerAndClient/Server0% | 0% | 0% | 0% | 100%
GameLiftExampleUnityProject/Assets/Scripts/NetworkingShared0% | 0% | 0% | 0% | 100%
CppServerAndClient/Client0% | 0% | 0% | 0% | 100%
GameLiftExampleUnityProject/Assets/Scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void Update()
in GameLiftExampleUnityProject/Assets/Scripts/Server/Server.cs
77 15 0
void ProcessMessages()
in GameLiftExampleUnityProject/Assets/Scripts/Client/Client.cs
54 14 0
void FixedUpdate()
in GameLiftExampleUnityProject/Assets/Scripts/Client/SimpleController.cs
21 9 0
private void ProcessMessages()
in GameLiftExampleUnityProject/Assets/Scripts/Server/Server.cs
54 8 0
private void HandleMessage()
in GameLiftExampleUnityProject/Assets/Scripts/Client/NetworkClient.cs
16 7 1
HttpRequestMessage generateSignedRequest()
in GameLiftExampleUnityProject/Assets/Scripts/Client/MatchmakingClient.cs
46 6 1
private bool HandleMessage()
in GameLiftExampleUnityProject/Assets/Scripts/Server/Server.cs
19 6 3
public IEnumerator DoMatchMakingAndConnect()
in GameLiftExampleUnityProject/Assets/Scripts/Client/NetworkClient.cs
49 5 1
public void TransmitMessage()
in GameLiftExampleUnityProject/Assets/Scripts/Server/Server.cs
18 5 2
int SetupTcpServerAndAcceptTwoPlayer()
in CppServerAndClient/Server/Server.cpp
34 5 2
public MatchMakingRequestInfo RequestMatchMaking()
in GameLiftExampleUnityProject/Assets/Scripts/Client/MatchmakingClient.cs
26 4 1
public void Update()
in GameLiftExampleUnityProject/Assets/Scripts/Server/GameLift.cs
14 4 0
public void TransmitMessage()
in GameLiftExampleUnityProject/Assets/Scripts/Server/Server.cs
18 4 2
int ConnectToServer()
in CppServerAndClient/Client/Client.cpp
30 4 3
int main()
in CppServerAndClient/Client/Client.cpp
67 4 0
bool Server::InitializeGameLift()
in CppServerAndClient/Server/Server.cpp
34 4 2
private bool EnemyPlayerExists()
in GameLiftExampleUnityProject/Assets/Scripts/Client/Client.cs
11 3 1
private NetworkPlayer GetEnemyPlayer()
in GameLiftExampleUnityProject/Assets/Scripts/Client/Client.cs
11 3 1
void Update()
in GameLiftExampleUnityProject/Assets/Scripts/Client/Client.cs
15 3 0
public void Update()
in GameLiftExampleUnityProject/Assets/Scripts/Client/NetworkClient.cs
9 3 0