Add call harness to generate data
This commit is contained in:
parent
e47864752a
commit
c33a2a207f
25
harness.ts
Executable file
25
harness.ts
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env -S deno run --allow-env --allow-run
|
||||||
|
|
||||||
|
const execPath = Deno.args[0];
|
||||||
|
|
||||||
|
function* range(min, max, incr = 1): Generator<number> {
|
||||||
|
let i = min;
|
||||||
|
do {
|
||||||
|
yield i
|
||||||
|
i += incr;
|
||||||
|
} while (i < max)
|
||||||
|
}
|
||||||
|
|
||||||
|
let ps = []
|
||||||
|
|
||||||
|
for (let seed of range(0, 10)) {
|
||||||
|
for (let prob of (range(0, 1, 0.05))) {
|
||||||
|
const p = Deno.run({
|
||||||
|
cmd: [execPath, seed, prob, 1000],
|
||||||
|
});
|
||||||
|
|
||||||
|
ps.push(p)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await Promise.all(ps);
|
||||||
Loading…
Reference in New Issue
Block a user