Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions js/viewer/page-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@ function runShard(workerUrl, config, shard, onRow) {
}

/**
* Run every configured suite and report. `suites` entries carry the
* browser-worker run message minus `shard` (moduleUrl, coreUrls,
* importsUrl, contextUrl?, env?, missing?, caseTimeoutMs?) plus
* `suite` (the results identity) and `target`. `jobs` defaults to the
* capped hardware parallelism; pass 1 for sequential corpora.
* Run every configured suite and report, keyed by `target` — the one
* identity unique per run (several targets may run one suite, e.g. a
* plain and a delegated composition of the same corpus). `suites`
* entries carry the browser-worker run message minus `shard`
* (moduleUrl, coreUrls, importsUrl, contextUrl?, env?, missing?,
* caseTimeoutMs?) plus `suite` (the results identity in the envelope)
* and `target`. `jobs` defaults to the capped hardware parallelism;
* pass 1 for sequential corpora.
*/
export async function runSuitesInPage({ workerUrl, suites, jobs }) {
const pool = jobs ?? workerCount(navigator.hardwareConcurrency ?? 4);
Expand All @@ -68,7 +71,7 @@ export async function runSuitesInPage({ workerUrl, suites, jobs }) {
);
const events = shards.flatMap((s) => s.events);
events.sort((a, b) => a.index - b.index);
out[suite] = {
out[target] = {
lines: [
JSON.stringify(envelope(target, suite)),
...events.map((e) => JSON.stringify(e.event)),
Expand Down
Loading