Commit 5a77c24a authored by Benjamin Fischer's avatar Benjamin Fischer

[test/bench] process all available control inputs each loop

parent 4a62d232
......@@ -314,7 +314,6 @@ const loop = async ({
if (!password) throw new Error(`"password" is missing`);
if (!baseUrl) throw new Error(`"baseUrl" is missing`);
if (!wsId) throw new Error(`"wsId" is missing`);
if (!wsId) throw new Error(`"wsId" is missing`);
const users = new Set();
const stats = new Stats();
let bad = 0;
......@@ -367,22 +366,24 @@ const loop = async ({
await sleep(100);
switch (process.stdin.read(1) + "") {
case "n":
d = 0;
break;
case "+":
conc++;
break;
case "-":
conc && conc--;
break;
case "0":
conc = 0;
break;
case "q":
stop = true;
break;
for (let c; (c = process.stdin.read(1)); ) {
switch (c + "") {
case "n":
d = 0;
break;
case "+":
conc++;
break;
case "-":
conc && conc--;
break;
case "0":
conc = 0;
break;
case "q":
stop = true;
break;
}
}
}
process.stdout.write("\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment