Improving benchmark measures
This commit is contained in:
parent
ea6a8ff406
commit
10ee00e08a
@ -53,17 +53,20 @@ async function startOneUser(): Promise<void> {
|
|||||||
|
|
||||||
await sleep(10000);
|
await sleep(10000);
|
||||||
connection.closeConnection();
|
connection.closeConnection();
|
||||||
console.log('User moved count: '+userMovedCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
connectionManager.initBenchmark();
|
connectionManager.initBenchmark();
|
||||||
|
|
||||||
|
const promises = [];
|
||||||
|
|
||||||
for (let userNo = 0; userNo < 160; userNo++) {
|
for (let userNo = 0; userNo < 160; userNo++) {
|
||||||
startOneUser();
|
const promise = startOneUser();
|
||||||
|
promises.push(promise);
|
||||||
// Wait 0.5s between adding users
|
// Wait 0.5s between adding users
|
||||||
await sleep(125);
|
await sleep(125);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await Promise.all(promises);
|
||||||
|
console.log('User moved count: '+userMovedCount);
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user