From c33a2a207f0f6524336f4a50b7e70a04cf2ab760 Mon Sep 17 00:00:00 2001 From: Joshua Coles Date: Mon, 20 Feb 2023 09:39:12 +0000 Subject: [PATCH] Add call harness to generate data --- harness.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 harness.ts diff --git a/harness.ts b/harness.ts new file mode 100755 index 0000000..9de8d02 --- /dev/null +++ b/harness.ts @@ -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 { + 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);