Skip to content

Commit

Permalink
configure sample-game-server loadtest
Browse files Browse the repository at this point in the history
  • Loading branch information
huseyindeniz committed Jan 11, 2025
1 parent 564827e commit 51d29ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions apps/sample-game/server/loadtest/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { EGameState, GameState, TestRoomState } from "./types";

export async function main(options: Options) {
const client = new Client(options.endpoint);

console.log(options);

const room: Room = await client.joinOrCreate(options.roomName, {
// your join options here...
});
Expand Down
1 change: 1 addition & 0 deletions apps/sample-game/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"start": "tsx watch src/index.ts",
"loadtest": "tsx loadtest/example.ts --room test_room --numClients 4",
"loadtest:cluster": "tsx loadtest/example.ts --room test_room --numClients 500 --endpoint ws://sample-game-server-staging.local",
"build": "npm run clean && tsc",
"clean": "rimraf build",
"test": "mocha -r tsx test/**_test.ts --exit --timeout 15000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ingress:

autoscaling:
enabled: true
minReplicas: 2
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 60
targetMemoryUtilizationPercentage: 80

0 comments on commit 51d29ca

Please sign in to comment.