@colyseus/loadtest
Advanced tools
Comparing version 0.15.1 to 0.15.2
@@ -141,2 +141,3 @@ var __create = Object.create; | ||
connected: 0, | ||
disconnected: 0, | ||
failed: 0 | ||
@@ -146,2 +147,3 @@ }; | ||
connected: 0, | ||
disconnected: 0, | ||
failed: 0, | ||
@@ -151,3 +153,4 @@ errors: 0 | ||
const successfulConnectionBox = import_blessed.default.text({ top: 2, left: 1, tags: true, content: `{yellow-fg}connected:{/yellow-fg} ${currentStats.connected}` }); | ||
const failedConnectionBox = import_blessed.default.text({ top: 3, left: 1, tags: true, content: `{yellow-fg}failed:{/yellow-fg} ${currentStats.failed}` }); | ||
const disconnectedClientsBox = import_blessed.default.text({ top: 3, left: 1, tags: true, content: `{yellow-fg}disconnected:{/yellow-fg} ${currentStats.disconnected}` }); | ||
const failedConnectionBox = import_blessed.default.text({ top: 4, left: 1, tags: true, content: `{yellow-fg}failed:{/yellow-fg} ${currentStats.failed}` }); | ||
const clientsBox = import_blessed.default.box({ | ||
@@ -161,2 +164,3 @@ label: " clients ", | ||
successfulConnectionBox, | ||
disconnectedClientsBox, | ||
failedConnectionBox | ||
@@ -173,3 +177,3 @@ ], | ||
label: " processing ", | ||
top: 6, | ||
top: 7, | ||
left: "70%", | ||
@@ -191,3 +195,3 @@ width: "30%", | ||
label: " networking ", | ||
top: 11, | ||
top: 12, | ||
left: "70%", | ||
@@ -388,2 +392,8 @@ width: "30%", | ||
screen.render(); | ||
room.onLeave(() => { | ||
currentStats.disconnected++; | ||
totalStats.disconnected++; | ||
disconnectedClientsBox.content = `{yellow-fg}disconnected:{/yellow-fg} ${currentStats.disconnected}`; | ||
screen.render(); | ||
}); | ||
connections.push(room); | ||
@@ -403,10 +413,2 @@ }; | ||
}; | ||
const _originalRoomLeave = import_colyseus.Room.prototype.leave; | ||
import_colyseus.Room.prototype.leave = async function() { | ||
const result = await _originalRoomLeave.apply(this, arguments); | ||
currentStats.connected--; | ||
successfulConnectionBox.content = `{yellow-fg}connected:{/yellow-fg} ${currentStats.connected}`; | ||
screen.render(); | ||
return result; | ||
}; | ||
try { | ||
@@ -413,0 +415,0 @@ (async () => { |
{ | ||
"name": "@colyseus/loadtest", | ||
"version": "0.15.1", | ||
"version": "0.15.2", | ||
"description": "Utility tool for load testing Colyseus.", | ||
@@ -45,3 +45,3 @@ "input": "./src/index.ts", | ||
}, | ||
"gitHead": "71bc771dfe7decce496784786e19899d93858436" | ||
"gitHead": "b73adea724d32e9b2f2023dea0b630bfc36855d5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
91170
935