mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
nits
This commit is contained in:
+6
-1
@@ -239,8 +239,10 @@ await new Command()
|
||||
|
||||
clearInterval(updateState);
|
||||
|
||||
await Deno.stdout.write(enc(" ".padStart(30) + `\rduration: ${seconds} | jobs sent: ${JSON.stringify(jobsSent)}\n`));
|
||||
const sum = jobsSent.reduce((a, b) => a + b, 0)
|
||||
await Deno.stdout.write(enc(" ".padStart(30) + `\rduration: ${seconds} | jobs sent: ${sum}\n`));
|
||||
|
||||
const shutdown_start = Date.now();
|
||||
let zombie_jobs = 0;
|
||||
let incorrect_results = 0;
|
||||
workers.forEach((worker) => {
|
||||
@@ -263,6 +265,9 @@ await new Command()
|
||||
while (workers.length > 0) {
|
||||
await sleep(0.1);
|
||||
}
|
||||
const tts = (Date.now() - shutdown_start) / 1000;
|
||||
console.log("time to shutdown:", tts);
|
||||
console.log("throughput /s", sum / (seconds + tts));
|
||||
|
||||
console.log("zombie jobs: ", zombie_jobs);
|
||||
console.log("incorrect results: ", incorrect_results);
|
||||
|
||||
@@ -104,6 +104,8 @@ clearInterval(updateStatusInterval);
|
||||
|
||||
const end_time = Date.now() + complete_timeout;
|
||||
let incorrect_results = 0;
|
||||
const enc = (s: string) => new TextEncoder().encode(s);
|
||||
|
||||
while (outstanding.length > 0 && Date.now() < end_time) {
|
||||
const uuid = outstanding.shift()!;
|
||||
|
||||
@@ -116,7 +118,8 @@ while (outstanding.length > 0 && Date.now() < end_time) {
|
||||
}
|
||||
if (r.type == 'QueuedJob') {
|
||||
outstanding.push(uuid);
|
||||
console.log(uuid, (await windmill.JobService.listQueue({ workspace: config.workspace_id })).length)
|
||||
await Deno.stdout.write(enc(`uuid: ${uuid}, queue length: ${(await windmill.JobService.listQueue({ workspace: config.workspace_id })).length} \r`));
|
||||
|
||||
} else if (!config.useFlows) {
|
||||
r = r as api.CompletedJob;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user