MoveLoadTester (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kenzz55/ue5-iocp-mmo-server/llms.txt
Use this file to discover all available pages before exploring further.
ServerSolution/Tools/MoveLoadTester/) is a .NET console application that spawns N concurrent clients, each executing the complete game connection flow: HTTP login and server selection, TCP EnterGameReq, UDP hello handshake, and then a continuous stream of C_MoveReq UDP packets. Warm-up traffic is excluded from the final statistics, and the tool writes a structured JSON result file that the PerformanceReport tool can consume directly.
MoveLoadTester flags
All options are parsed by aswitch statement in Program.cs. Every flag takes a single value argument.
| Flag | Default | Description |
|---|---|---|
--auth-url | http://localhost:5000 | Base URL of the Auth HTTP service |
--clients | 10 | Number of concurrent simulated clients |
--duration | 60 | Measurement duration in seconds (after warm-up) |
--warmup | 0 | Warm-up period in seconds; this traffic is excluded from RTT stats |
--connect-rate | 0 | Maximum new TCP connections per second; 0 means connect all clients immediately |
--move-hz | 20 | Movement input packets per second per client |
--echo-hz | 1 | TCP echo request packets per second per client |
--account-prefix | load | Account name prefix; accounts are named {prefix}{index:D5} |
--account-start | 0 | First account index |
--password | 12345678 | Password used for all test accounts |
--server-id | 1 | Game server ID sent to /auth/select-server |
--game-host | (from select-server) | Override the game server IP returned by the auth service |
--game-port | (from select-server) | Override the game server TCP port |
--output | (none) | Path for the final JSON result file |
--series-output | (none) | Path for the per-second time-series CSV |
--run-id | (auto-generated) | Identifier embedded in the result JSON |
--scenario | (auto-generated) | Scenario label; auto-derived from --move-hz and --echo-hz if omitted |
Example invocation
What each client does
Each simulated client runs the following sequence in order:Register (best-effort)
POST /auth/register with the account credentials. Errors are silently ignored — the account may already exist from a previous run.Select server
POST /auth/select-server with the accessToken and --server-id. The response provides gameServerIp, gameServerPort, enterToken, and characterId.TCP connect
Opens a TCP connection to the game server and sends
EnterGameReq (packet ID 0x0201) containing the enterToken and characterId. Waits for EnterGameRes (packet ID 0x0202) which carries a udpToken and UDP port.UDP hello
Sends
UdpHelloReq (packet ID 0x0204) over UDP carrying the udpToken, accountId, and characterId. The server binds the UDP endpoint for this session.Move loop
At
--move-hz packets per second, sends C_MoveReq (packet ID 0x0211) with a rotating direction vector. The client cycles through four cardinal directions every 120 packets. Latency is measured from the send timestamp to the arrival of the corresponding S_MoveNotify or S_MoveBatchNotify that echoes back lastProcessedInputSequence.LoadMetrics and final report
TheLoadMetrics class records all events via lock-free atomics and a LatencyHistogram with 0.25 ms buckets capped at 60 000 ms. During the warm-up phase no latency samples are recorded and the measured send/receive counters are not incremented. After the run ends, BuildFinal produces a LoadTestResult record that is written to --output:
PowerShell test scripts
ServerSolution/Tools/ includes lightweight PowerShell scripts for smoke-testing individual flows without running the full load tester.
TestAuthFlow.ps1 first to obtain an EnterToken, then pass it to TestEnterGame.ps1 to verify the full TCP game-entry path:
Load-test spawn spread
When running many clients on a single server instance, all spawned characters would land on the same map position by default, placing every player in every other player’s Area of Interest and generating worst-case fanout. The flagEnableLoadTestSpawnSpread avoids this:
MovementAoiViewDistance is 3000 UU, adjacent cells are just outside each other’s AoI, preventing cross-client movement notifications and giving a cleaner measurement of per-client throughput rather than AoI fanout overhead.