Improving benchmark measures

This commit is contained in:
David Négrier 2020-12-04 15:13:46 +01:00
parent ea6a8ff406
commit 10ee00e08a
1 changed files with 5 additions and 2 deletions

View File

@ -53,17 +53,20 @@ async function startOneUser(): Promise<void> {
await sleep(10000);
connection.closeConnection();
console.log('User moved count: '+userMovedCount);
}
(async () => {
connectionManager.initBenchmark();
const promises = [];
for (let userNo = 0; userNo < 160; userNo++) {
startOneUser();
const promise = startOneUser();
promises.push(promise);
// Wait 0.5s between adding users
await sleep(125);
}
await Promise.all(promises);
console.log('User moved count: '+userMovedCount);
})();