@ac-bench/gate 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +31 -2
- package/dist/baseline/compare-environments.d.ts +5 -4
- package/dist/baseline/compare-environments.d.ts.map +1 -1
- package/dist/baseline/compare-environments.js +7 -4
- package/dist/baseline/compare-environments.js.map +1 -1
- package/dist/baseline/fingerprint.d.ts +38 -0
- package/dist/baseline/fingerprint.d.ts.map +1 -0
- package/dist/baseline/fingerprint.js +44 -0
- package/dist/baseline/fingerprint.js.map +1 -0
- package/dist/baseline/runtime-flags.d.ts +30 -0
- package/dist/baseline/runtime-flags.d.ts.map +1 -0
- package/dist/baseline/runtime-flags.js +120 -0
- package/dist/baseline/runtime-flags.js.map +1 -0
- package/dist/evaluate-archives.d.ts +12 -1
- package/dist/evaluate-archives.d.ts.map +1 -1
- package/dist/evaluate-archives.js +45 -22
- package/dist/evaluate-archives.js.map +1 -1
- package/dist/exit-code.d.ts +3 -3
- package/dist/exit-code.d.ts.map +1 -1
- package/dist/exit-code.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @ac-bench/gate
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5c203e7: `baselineFingerprintId(environment)` is a 12-digit hash of what a direct
|
|
8
|
+
baseline comparison requires equal — CPU model, logical cores, architecture,
|
|
9
|
+
OS, the mode (or the pinned plan), each runtime's product, major version and
|
|
10
|
+
flags — and `baselineFingerprint` the fields themselves: where a named baseline is
|
|
11
|
+
filed, so a run finds its own environment's. A run without flags keeps the
|
|
12
|
+
id it had without them. `compareEnvironments` requires the runtime flags
|
|
13
|
+
equal too (`runtime.flags`), as `normalizeRuntimeFlags` reads them: in order
|
|
14
|
+
and with their repetitions (`--import`, `--require`, … act once each, in
|
|
15
|
+
order), except the flags of an explicit list proven commutative
|
|
16
|
+
(`--jitless`, `--expose-gc`, `--max-old-space-size`, …), sorted and kept once
|
|
17
|
+
while all their occurrences agree; `--name value` joined, `_` read as `-` in
|
|
18
|
+
Node and V8 flag
|
|
19
|
+
names, a browser's `--js-flags` split into one per V8 flag, and the switches
|
|
20
|
+
that change no measurement (`--no-warnings`, `--title`, a browser's
|
|
21
|
+
`--user-data-dir`, …) left out. `evaluateArchives` counts a `runtime-failed`
|
|
22
|
+
diagnostic as a failed scope, like a `load-error`: a runtime that could not
|
|
23
|
+
start makes the exit code 3, not 5 or 0. `effectiveGateDeclarations` and
|
|
24
|
+
`baselineCases` are the baseline expansion `evaluateArchives` applies (a
|
|
25
|
+
default `normalizeBy`, and one baseline gate over every case when none is
|
|
26
|
+
declared), for a run that checks its gates before measuring.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 5c203e7: The `homepage` points at the @ac-bench documentation site: `measure(1)` for the CLI, the API reference for `core`, `lib` and `gate`, the site's home for the others.
|
|
31
|
+
- Updated dependencies [5c203e7]
|
|
32
|
+
- Updated dependencies [5c203e7]
|
|
33
|
+
- Updated dependencies [5c203e7]
|
|
34
|
+
- Updated dependencies [5c203e7]
|
|
35
|
+
- Updated dependencies [5c203e7]
|
|
36
|
+
- Updated dependencies [5c203e7]
|
|
37
|
+
- Updated dependencies [5c203e7]
|
|
38
|
+
- Updated dependencies [5c203e7]
|
|
39
|
+
- Updated dependencies [5c203e7]
|
|
40
|
+
- Updated dependencies [5c203e7]
|
|
41
|
+
- Updated dependencies [5c203e7]
|
|
42
|
+
- Updated dependencies [5c203e7]
|
|
43
|
+
- Updated dependencies [5c203e7]
|
|
44
|
+
- Updated dependencies [5c203e7]
|
|
45
|
+
- Updated dependencies [5c203e7]
|
|
46
|
+
- Updated dependencies [5c203e7]
|
|
47
|
+
- Updated dependencies [5c203e7]
|
|
48
|
+
- Updated dependencies [5c203e7]
|
|
49
|
+
- Updated dependencies [5c203e7]
|
|
50
|
+
- @ac-bench/core@0.5.0
|
|
51
|
+
- @ac-kit/crypto-hash@0.2.0
|
|
52
|
+
- @ac-kit/core@0.14.0
|
|
53
|
+
- @ac-kit/math-stats@0.7.0
|
|
54
|
+
- @ac-kit/format-glob@0.3.4
|
|
55
|
+
|
|
3
56
|
## 0.1.1
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -67,13 +67,42 @@ is judged on the runs that selected it, and `skipped` only when none did.
|
|
|
67
67
|
## Baselines
|
|
68
68
|
|
|
69
69
|
A baseline is an archive. It is compared directly when it comes from the same
|
|
70
|
-
machine, runtime major version and mode (`compareEnvironments`
|
|
71
|
-
differs); otherwise it is `incomparable`, unless `allowForeignBaseline` and a
|
|
70
|
+
machine, runtime major version, runtime flags and mode (`compareEnvironments`
|
|
71
|
+
lists what differs); otherwise it is `incomparable`, unless `allowForeignBaseline` and a
|
|
72
72
|
`normalizeBy` case let `(case / normalizer)` now be compared with the same ratio
|
|
73
73
|
in the baseline, which cancels machine speed to first order. Only the archives,
|
|
74
74
|
current or baseline, that hold executions of a gate's cases are compared for
|
|
75
75
|
that gate.
|
|
76
76
|
|
|
77
|
+
Runtime flags are compared as `normalizeRuntimeFlags` reads them: `--name
|
|
78
|
+
value` against `--name=value`, `_` against `-` in a Node or V8 flag name, and
|
|
79
|
+
how a browser's V8 flags are spread over `--js-flags` make no difference. Nor
|
|
80
|
+
do the switches that change no measurement: `--no-warnings`,
|
|
81
|
+
`--disable-warning`, `--no-deprecation`, `--title`, and a browser's
|
|
82
|
+
`--user-data-dir`, `--crash-dumps-dir`, `--remote-debugging-port`,
|
|
83
|
+
`--remote-debugging-pipe`, `--no-first-run` and `--no-default-browser-check`.
|
|
84
|
+
|
|
85
|
+
Order and repetition count by default: `--import=a --import=b` is not
|
|
86
|
+
`--import=b --import=a`, nor `--require=a` twice the same as once — and so for
|
|
87
|
+
`--loader`, `--env-file`, `--conditions` and any flag not on the list below.
|
|
88
|
+
Only the flags proven commutative are sorted and kept once, as long as every
|
|
89
|
+
occurrence has one value: the single-valued `--jitless`, `--expose-gc`,
|
|
90
|
+
`--allow-natives-syntax`, `--max-old-space-size`, `--max-semi-space-size`,
|
|
91
|
+
`--stack-size`, `--[no-]opt`, `--[no-]turbofan`, `--[no-]maglev`,
|
|
92
|
+
`--[no-]sparkplug`, `--predictable`, `--single-threaded`,
|
|
93
|
+
`--single-threaded-gc`, and the browser switches `--disable-gpu`,
|
|
94
|
+
`--disable-extensions` and `--enable-precise-memory-info`. One given two values
|
|
95
|
+
(`--max-old-space-size=1 --max-old-space-size=2`, `--opt --no-opt`) keeps its
|
|
96
|
+
order, since the last wins.
|
|
97
|
+
|
|
98
|
+
Any other difference — a flag on one side only or with another value
|
|
99
|
+
(`--jitless`, `--no-opt`, a heap size, `--expose-gc`, `--disable-gpu`), or the
|
|
100
|
+
order or count of the others — makes the runs incomparable, and gives another
|
|
101
|
+
fingerprint (a run without flags keeps the id it always had). A runtime's
|
|
102
|
+
flags include those of the measures that ran there (resource adds
|
|
103
|
+
`--expose-gc`), so a run that ran another set of measures in a runtime is
|
|
104
|
+
another environment.
|
|
105
|
+
|
|
77
106
|
## Exit codes
|
|
78
107
|
|
|
79
108
|
`BENCH_EXIT_CODES` and `benchExitCode`: `0` success, `1` a gate failed, `2`
|
|
@@ -15,10 +15,11 @@ type Environment_ = Pick<BenchArchive, "machine" | "runtimes" | "run">;
|
|
|
15
15
|
/**
|
|
16
16
|
* Whether a baseline's measurements can be compared directly with this run's.
|
|
17
17
|
*
|
|
18
|
-
* Required equal: CPU model, logical cores, architecture, OS, the runtime
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* Required equal: CPU model, logical cores, architecture, OS, the runtime, its
|
|
19
|
+
* major version and its flags as {@link normalizeRuntimeFlags} reads them (a
|
|
20
|
+
* browser's launch switches and V8 flags included), and the mode (or, when the
|
|
21
|
+
* plan was pinned, the plan). Warned but compared: kernel release, the
|
|
22
|
+
* runtime's minor version, CPU governor, memory and available parallelism.
|
|
22
23
|
*
|
|
23
24
|
* @param runtime The runtime id the comparison concerns.
|
|
24
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare-environments.d.ts","sourceRoot":"","sources":["../../src/baseline/compare-environments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"compare-environments.d.ts","sourceRoot":"","sources":["../../src/baseline/compare-environments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,MAAM,MAAM,qBAAqB,GAAG;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACtD,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACpD,CAAC;AAEF,KAAK,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC,CAAC;AAMvE;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,MAAM,GACb,qBAAqB,CA2GvB"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { isDeepEqual } from "@ac-kit/core";
|
|
2
|
+
import { normalizeRuntimeFlags } from "./runtime-flags.js";
|
|
2
3
|
function versionPart_(version, index) {
|
|
3
4
|
return version.split(".")[index] ?? "";
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* Whether a baseline's measurements can be compared directly with this run's.
|
|
7
8
|
*
|
|
8
|
-
* Required equal: CPU model, logical cores, architecture, OS, the runtime
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Required equal: CPU model, logical cores, architecture, OS, the runtime, its
|
|
10
|
+
* major version and its flags as {@link normalizeRuntimeFlags} reads them (a
|
|
11
|
+
* browser's launch switches and V8 flags included), and the mode (or, when the
|
|
12
|
+
* plan was pinned, the plan). Warned but compared: kernel release, the
|
|
13
|
+
* runtime's minor version, CPU governor, memory and available parallelism.
|
|
12
14
|
*
|
|
13
15
|
* @param runtime The runtime id the comparison concerns.
|
|
14
16
|
*/
|
|
@@ -37,6 +39,7 @@ export function compareEnvironments(current, baseline, runtime) {
|
|
|
37
39
|
compare(mismatches, "runtime.product", now.product, then.product);
|
|
38
40
|
compare(mismatches, "runtime.version (major)", versionPart_(now.version, 0), versionPart_(then.version, 0));
|
|
39
41
|
compare(warnings, "runtime.version (minor)", versionPart_(now.version, 1), versionPart_(then.version, 1));
|
|
42
|
+
compare(mismatches, "runtime.flags", normalizeRuntimeFlags(now).join(" "), normalizeRuntimeFlags(then).join(" "));
|
|
40
43
|
}
|
|
41
44
|
if (current.run.mode === null || baseline.run.mode === null) {
|
|
42
45
|
if (current.run.mode !== baseline.run.mode ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare-environments.js","sourceRoot":"","sources":["../../src/baseline/compare-environments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"compare-environments.js","sourceRoot":"","sources":["../../src/baseline/compare-environments.ts"],"names":[],"mappings":"AACA,O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tE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { BenchArchive } from "@ac-bench/core/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* What two runs must share for one to be the other's baseline directly: the
|
|
4
|
+
* fields `compareEnvironments` requires equal, in a fixed order.
|
|
5
|
+
*/
|
|
6
|
+
export type BaselineFingerprint = {
|
|
7
|
+
readonly cpuModel: string;
|
|
8
|
+
readonly logicalCores: number;
|
|
9
|
+
readonly architecture: string;
|
|
10
|
+
readonly os: string;
|
|
11
|
+
/** The mode, or the pinned plan when there is none. */
|
|
12
|
+
readonly plan: string;
|
|
13
|
+
/**
|
|
14
|
+
* Each runtime of the run, by id: its product, major version and
|
|
15
|
+
* {@link normalizeRuntimeFlags normalised flags} (absent when there are none,
|
|
16
|
+
* so a run without flags keeps the id it always had).
|
|
17
|
+
*/
|
|
18
|
+
readonly runtimes: readonly {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly product: string;
|
|
21
|
+
readonly major: string;
|
|
22
|
+
readonly flags?: readonly string[];
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The comparability fields of a run, as {@link baselineFingerprintId} hashes
|
|
27
|
+
* them.
|
|
28
|
+
*/
|
|
29
|
+
export declare function baselineFingerprint(environment: Pick<BenchArchive, "machine" | "runtimes" | "run">): BaselineFingerprint;
|
|
30
|
+
/**
|
|
31
|
+
* A short hash of a run's comparability fields: where its baselines are filed,
|
|
32
|
+
* so a run finds the baseline of its own environment by name and never one of
|
|
33
|
+
* another machine, mode, major runtime version or set of runtime flags by
|
|
34
|
+
* accident. Kernel, governor, memory and runtime minor version are left out:
|
|
35
|
+
* they are compared with a warning, not required equal.
|
|
36
|
+
*/
|
|
37
|
+
export declare function baselineFingerprintId(environment: Pick<BenchArchive, "machine" | "runtimes" | "run">): string;
|
|
38
|
+
//# sourceMappingURL=fingerprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../src/baseline/fingerprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAS1D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACnC,EAAE,CAAC;CACJ,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CAClC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC,GAC7D,mBAAmB,CAsBrB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACpC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC,GAC7D,MAAM,CAMR"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { compareNaturalAscending } from "@ac-kit/core";
|
|
2
|
+
import { sha256Ts } from "@ac-kit/crypto-hash";
|
|
3
|
+
import { normalizeRuntimeFlags } from "./runtime-flags.js";
|
|
4
|
+
/** Hex digits of a fingerprint id: short enough for a directory name. */
|
|
5
|
+
const ID_LENGTH_ = 12;
|
|
6
|
+
/**
|
|
7
|
+
* The comparability fields of a run, as {@link baselineFingerprintId} hashes
|
|
8
|
+
* them.
|
|
9
|
+
*/
|
|
10
|
+
export function baselineFingerprint(environment) {
|
|
11
|
+
const { machine, run } = environment;
|
|
12
|
+
return {
|
|
13
|
+
cpuModel: machine.cpuModel,
|
|
14
|
+
logicalCores: machine.logicalCores,
|
|
15
|
+
architecture: machine.architecture,
|
|
16
|
+
os: machine.os,
|
|
17
|
+
plan: run.mode ?? JSON.stringify(run.plan),
|
|
18
|
+
runtimes: environment.runtimes
|
|
19
|
+
.map((runtime) => {
|
|
20
|
+
const flags = normalizeRuntimeFlags(runtime);
|
|
21
|
+
return {
|
|
22
|
+
id: runtime.id,
|
|
23
|
+
product: runtime.product,
|
|
24
|
+
major: runtime.version.split(".")[0] ?? "",
|
|
25
|
+
...(flags.length === 0 ? {} : { flags }),
|
|
26
|
+
};
|
|
27
|
+
})
|
|
28
|
+
.toSorted((left, right) => compareNaturalAscending(left.id, right.id)),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A short hash of a run's comparability fields: where its baselines are filed,
|
|
33
|
+
* so a run finds the baseline of its own environment by name and never one of
|
|
34
|
+
* another machine, mode, major runtime version or set of runtime flags by
|
|
35
|
+
* accident. Kernel, governor, memory and runtime minor version are left out:
|
|
36
|
+
* they are compared with a warning, not required equal.
|
|
37
|
+
*/
|
|
38
|
+
export function baselineFingerprintId(environment) {
|
|
39
|
+
const fields = baselineFingerprint(environment);
|
|
40
|
+
return sha256Ts(new TextEncoder().encode(JSON.stringify(fields)))
|
|
41
|
+
.toHex()
|
|
42
|
+
.slice(0, ID_LENGTH_);
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=fingerprint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../../src/baseline/fingerprint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EA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C,CAAC;IAEhD,OAAO,QAAQ,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;SAC/D,KAAK,EAAE;SACP,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { RuntimeDescription } from "@ac-bench/core/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* A runtime's switches as a baseline comparison reads them:
|
|
4
|
+
*
|
|
5
|
+
* - A switch and its value given as two arguments (`--max-old-space-size 4096`)
|
|
6
|
+
* become one (`--max-old-space-size=4096`);
|
|
7
|
+
* - A browser's `--js-flags=--a --b` becomes one `--js-flags=--a` per V8 flag,
|
|
8
|
+
* however many `--js-flags` carried them;
|
|
9
|
+
* - In the name of a Node or V8 flag, `_` reads as `-` (`--expose_gc` is
|
|
10
|
+
* `--expose-gc`), as both read it; a browser's own switches are kept as
|
|
11
|
+
* written;
|
|
12
|
+
* - The switches that change no measurement are left out: `--no-warnings`,
|
|
13
|
+
* `--disable-warning`, `--no-deprecation`, `--title`, and a browser's
|
|
14
|
+
* `--user-data-dir`, `--crash-dumps-dir`, `--remote-debugging-port`,
|
|
15
|
+
* `--remote-debugging-pipe`, `--no-first-run` and
|
|
16
|
+
* `--no-default-browser-check`;
|
|
17
|
+
* - A flag proven commutative — single-valued, on an explicit list (`--jitless`,
|
|
18
|
+
* `--expose-gc`, `--max-old-space-size`, `--[no-]opt`, …) — is kept once,
|
|
19
|
+
* sorted first, when every occurrence of it has one value. Any other flag
|
|
20
|
+
* keeps its order and its repetitions (`--import`, `--require`, `--loader`,
|
|
21
|
+
* `--env-file`, `--conditions`, …: each occurrence acts, in order), and so
|
|
22
|
+
* does a commutative one given two values (`--max-old-space-size=1
|
|
23
|
+
* --max-old-space-size=2`: the last wins).
|
|
24
|
+
*
|
|
25
|
+
* Any other difference — a V8 flag such as `--jitless` or `--no-opt`, a heap
|
|
26
|
+
* limit, `--expose-gc`, a browser switch such as `--disable-gpu`, the order or
|
|
27
|
+
* the count of `--import` — makes two runs incomparable.
|
|
28
|
+
*/
|
|
29
|
+
export declare function normalizeRuntimeFlags(runtime: Pick<RuntimeDescription, "kind" | "flags">): string[];
|
|
30
|
+
//# sourceMappingURL=runtime-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-flags.d.ts","sourceRoot":"","sources":["../../src/baseline/runtime-flags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAyDhE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,GACjD,MAAM,EAAE,CA2DV"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { compareNaturalAscending } from "@ac-kit/core";
|
|
2
|
+
/**
|
|
3
|
+
* Switches that change no measurement: warnings and their wording, the process
|
|
4
|
+
* title, and where a browser keeps its profile, dumps and debugging endpoint.
|
|
5
|
+
*/
|
|
6
|
+
const IGNORED_FLAGS_ = new Set([
|
|
7
|
+
"--no-warnings",
|
|
8
|
+
"--disable-warning",
|
|
9
|
+
"--no-deprecation",
|
|
10
|
+
"--title",
|
|
11
|
+
"--user-data-dir",
|
|
12
|
+
"--crash-dumps-dir",
|
|
13
|
+
"--remote-debugging-port",
|
|
14
|
+
"--remote-debugging-pipe",
|
|
15
|
+
"--no-first-run",
|
|
16
|
+
"--no-default-browser-check",
|
|
17
|
+
]);
|
|
18
|
+
const JS_FLAGS_ = "--js-flags=";
|
|
19
|
+
/**
|
|
20
|
+
* Node and V8 flags proven commutative: each takes one value (or none), so
|
|
21
|
+
* where it stands among the other flags, and how often it is repeated with that
|
|
22
|
+
* value, change nothing. Named without a `--no-` prefix, which belongs to the
|
|
23
|
+
* same flag.
|
|
24
|
+
*/
|
|
25
|
+
const COMMUTATIVE_ENGINE_FLAGS_ = new Set([
|
|
26
|
+
"--allow-natives-syntax",
|
|
27
|
+
"--expose-gc",
|
|
28
|
+
"--jitless",
|
|
29
|
+
"--maglev",
|
|
30
|
+
"--max-old-space-size",
|
|
31
|
+
"--max-semi-space-size",
|
|
32
|
+
"--opt",
|
|
33
|
+
"--predictable",
|
|
34
|
+
"--single-threaded",
|
|
35
|
+
"--single-threaded-gc",
|
|
36
|
+
"--sparkplug",
|
|
37
|
+
"--stack-size",
|
|
38
|
+
"--turbofan",
|
|
39
|
+
]);
|
|
40
|
+
/** Browser switches proven commutative, as above. */
|
|
41
|
+
const COMMUTATIVE_BROWSER_SWITCHES_ = new Set([
|
|
42
|
+
"--disable-extensions",
|
|
43
|
+
"--disable-gpu",
|
|
44
|
+
"--enable-precise-memory-info",
|
|
45
|
+
]);
|
|
46
|
+
/**
|
|
47
|
+
* A runtime's switches as a baseline comparison reads them:
|
|
48
|
+
*
|
|
49
|
+
* - A switch and its value given as two arguments (`--max-old-space-size 4096`)
|
|
50
|
+
* become one (`--max-old-space-size=4096`);
|
|
51
|
+
* - A browser's `--js-flags=--a --b` becomes one `--js-flags=--a` per V8 flag,
|
|
52
|
+
* however many `--js-flags` carried them;
|
|
53
|
+
* - In the name of a Node or V8 flag, `_` reads as `-` (`--expose_gc` is
|
|
54
|
+
* `--expose-gc`), as both read it; a browser's own switches are kept as
|
|
55
|
+
* written;
|
|
56
|
+
* - The switches that change no measurement are left out: `--no-warnings`,
|
|
57
|
+
* `--disable-warning`, `--no-deprecation`, `--title`, and a browser's
|
|
58
|
+
* `--user-data-dir`, `--crash-dumps-dir`, `--remote-debugging-port`,
|
|
59
|
+
* `--remote-debugging-pipe`, `--no-first-run` and
|
|
60
|
+
* `--no-default-browser-check`;
|
|
61
|
+
* - A flag proven commutative — single-valued, on an explicit list (`--jitless`,
|
|
62
|
+
* `--expose-gc`, `--max-old-space-size`, `--[no-]opt`, …) — is kept once,
|
|
63
|
+
* sorted first, when every occurrence of it has one value. Any other flag
|
|
64
|
+
* keeps its order and its repetitions (`--import`, `--require`, `--loader`,
|
|
65
|
+
* `--env-file`, `--conditions`, …: each occurrence acts, in order), and so
|
|
66
|
+
* does a commutative one given two values (`--max-old-space-size=1
|
|
67
|
+
* --max-old-space-size=2`: the last wins).
|
|
68
|
+
*
|
|
69
|
+
* Any other difference — a V8 flag such as `--jitless` or `--no-opt`, a heap
|
|
70
|
+
* limit, `--expose-gc`, a browser switch such as `--disable-gpu`, the order or
|
|
71
|
+
* the count of `--import` — makes two runs incomparable.
|
|
72
|
+
*/
|
|
73
|
+
export function normalizeRuntimeFlags(runtime) {
|
|
74
|
+
const flags = [];
|
|
75
|
+
const isNode = runtime.kind === "node";
|
|
76
|
+
const add = (flag, engine, prefix) => {
|
|
77
|
+
const separator = flag.indexOf("=");
|
|
78
|
+
const name = separator < 0 ? flag : flag.slice(0, separator);
|
|
79
|
+
const canonical = engine ? name.replaceAll("_", "-") : name;
|
|
80
|
+
if (IGNORED_FLAGS_.has(canonical)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const base = engine ? canonical.replace(/^--no-/u, "--") : canonical;
|
|
84
|
+
const commutative = (engine ? COMMUTATIVE_ENGINE_FLAGS_ : COMMUTATIVE_BROWSER_SWITCHES_).has(base);
|
|
85
|
+
flags.push({
|
|
86
|
+
flag: `${prefix}${canonical}${separator < 0 ? "" : flag.slice(separator)}`,
|
|
87
|
+
family: commutative ? `${prefix}${base}` : null,
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
for (let index = 0; index < runtime.flags.length; index += 1) {
|
|
91
|
+
let flag = runtime.flags[index];
|
|
92
|
+
const next = runtime.flags[index + 1];
|
|
93
|
+
if (!flag.includes("=") && next !== undefined && !next.startsWith("-")) {
|
|
94
|
+
flag = `${flag}=${next}`;
|
|
95
|
+
index += 1;
|
|
96
|
+
}
|
|
97
|
+
if (!isNode && flag.startsWith(JS_FLAGS_)) {
|
|
98
|
+
for (const v8Flag of flag.slice(JS_FLAGS_.length).split(/\s+/u)) {
|
|
99
|
+
if (v8Flag !== "") {
|
|
100
|
+
add(v8Flag, true, JS_FLAGS_);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
add(flag, isNode, "");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// A family is commutative only while all its occurrences agree.
|
|
109
|
+
const values = new Map();
|
|
110
|
+
for (const { flag, family } of flags) {
|
|
111
|
+
if (family !== null) {
|
|
112
|
+
values.set(family, (values.get(family) ?? new Set()).add(flag));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const settled = (entry) => entry.family !== null && values.get(entry.family).size === 1;
|
|
116
|
+
return [...new Set(flags.filter(settled).map((entry) => entry.flag)).values()]
|
|
117
|
+
.toSorted(compareNaturalAscending)
|
|
118
|
+
.concat(flags.filter((entry) => !settled(entry)).map((entry) => entry.flag));
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=runtime-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-flags.js","sourceRoot":"","sources":["../../src/baseline/runtime-flags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;GAGG;AACH,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IACnD,eAAe;IACf,mBAAmB;IACnB,kBAAkB;IAClB,SAAS;IACT,iBAAiB;IACjB,mBAAmB;IACnB,yBAAyB;IACzB,yBAAyB;IACzB,gBAAgB;IAChB,4BAA4B;CAC5B,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,aAAa,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC;IAC9D,wBAAwB;IACxB,aAAa;IACb,WAAW;IACX,UAAU;IACV,sBAAsB;IACtB,uBAAuB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IAC9C,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC;QACtC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YACrB,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QACjE,CAAC;IACF,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,KAAY,EAAW,EAAE,CACzC,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAE,CAAC,IAAI,KAAK,CAAC,CAAC;IAE/D,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAC5E,QAAQ,CAAC,uBAAuB,CAAC;SACjC,MAAM,CACN,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CACnE,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BenchArchive, CaseReference, ConfigGateDeclaration, GateReferenceError, GateVerdict } from "@ac-bench/core/plugin";
|
|
1
|
+
import type { BenchArchive, CaseKey, CaseReference, ConfigGateDeclaration, GateReferenceError, GateVerdict, LocatedGateDeclaration } from "@ac-bench/core/plugin";
|
|
2
2
|
import type { GateOptions } from "./declaration/options.js";
|
|
3
3
|
import type { BenchExitCode } from "./exit-code.js";
|
|
4
4
|
export type ArchiveEvaluationOptions = GateOptions & {
|
|
@@ -16,6 +16,17 @@ export type ArchiveEvaluationOptions = GateOptions & {
|
|
|
16
16
|
/** Exit 0 instead of 2 on an undecided gate. Default on for `quick` archives. */
|
|
17
17
|
readonly allowInconclusive?: boolean;
|
|
18
18
|
};
|
|
19
|
+
/** Every case the baselines selected: what a subject-less baseline gate covers. */
|
|
20
|
+
export declare function baselineCases(baselines: readonly BenchArchive[]): CaseKey[];
|
|
21
|
+
/**
|
|
22
|
+
* The declarations a run with baselines evaluates: `declarations`, each
|
|
23
|
+
* baseline gate given the default `normalizeBy` it lacks, plus — when there are
|
|
24
|
+
* baselines and no declaration is a baseline gate — one baseline gate over
|
|
25
|
+
* every case (`maxRegression` its threshold, if any), duplicates removed. What
|
|
26
|
+
* the run checks before measuring and `evaluateArchives` evaluates afterwards,
|
|
27
|
+
* so both instantiate the same gates.
|
|
28
|
+
*/
|
|
29
|
+
export declare function effectiveGateDeclarations(declarations: readonly LocatedGateDeclaration[], options: Pick<ArchiveEvaluationOptions, "baselines" | "maxRegression" | "normalizeBy">): LocatedGateDeclaration[];
|
|
19
30
|
/**
|
|
20
31
|
* Offline: `measure gate run-1.json run-2.json run-3.json`. Pools the archives
|
|
21
32
|
* as more executions and re-evaluates every gate they recorded plus `extra`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-archives.d.ts","sourceRoot":"","sources":["../src/evaluate-archives.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,
|
|
1
|
+
{"version":3,"file":"evaluate-archives.d.ts","sourceRoot":"","sources":["../src/evaluate-archives.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,OAAO,EACP,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAKpD,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG;IACpD,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,oDAAoD;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC;IACrC,2EAA2E;IAC3E,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC,iFAAiF;IACjF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAoFF,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,EAAE,CAa3E;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACxC,YAAY,EAAE,SAAS,sBAAsB,EAAE,EAC/C,OAAO,EAAE,IAAI,CACZ,wBAAwB,EACxB,WAAW,GAAG,eAAe,GAAG,aAAa,CAC7C,GACC,sBAAsB,EAAE,CA2C1B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAC/B,QAAQ,EAAE,SAAS,YAAY,EAAE,EACjC,KAAK,EAAE,SAAS,qBAAqB,EAAE,EACvC,OAAO,GAAE,wBAA6B,GACpC;IACF,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAC/C,CAgIA"}
|
|
@@ -6,6 +6,16 @@ import { inRunOrder } from "./evidence/_run-order.js";
|
|
|
6
6
|
import { caseKeyId, evidenceFromArchives } from "./evidence/evidence.js";
|
|
7
7
|
import { benchExitCode } from "./exit-code.js";
|
|
8
8
|
import { settleGate, testGate } from "./test/test-gate.js";
|
|
9
|
+
/**
|
|
10
|
+
* The run diagnostics that stand for a scope that never ran: a bench file that
|
|
11
|
+
* did not load, a runtime that could not be created or prepared. Each is a
|
|
12
|
+
* failed scope (exit 3) like a failed case; a usage error recorded in the
|
|
13
|
+
* archive (`baseline`, `gate-declaration`, …) is not.
|
|
14
|
+
*/
|
|
15
|
+
const FAILED_EXECUTION_CODES_ = new Set([
|
|
16
|
+
"load-error",
|
|
17
|
+
"runtime-failed",
|
|
18
|
+
]);
|
|
9
19
|
/**
|
|
10
20
|
* Every case of the pool, once per fork unit. A case is selected when any run
|
|
11
21
|
* selected it (see {@link evidenceFromArchives} for what each run then
|
|
@@ -34,18 +44,7 @@ function catalogOf_(archives, baselines) {
|
|
|
34
44
|
}
|
|
35
45
|
return {
|
|
36
46
|
cases: [...cases.values()],
|
|
37
|
-
...(baselines.length === 0
|
|
38
|
-
? {}
|
|
39
|
-
: {
|
|
40
|
-
baseline: baselines.flatMap((archive) => archive.conditions.flatMap((condition) => condition.cases
|
|
41
|
-
.filter((archived) => archived.selected)
|
|
42
|
-
.map((archived) => ({
|
|
43
|
-
runtime: condition.runtime,
|
|
44
|
-
file: condition.file,
|
|
45
|
-
conditionTitles: condition.titles,
|
|
46
|
-
caseTitle: archived.title,
|
|
47
|
-
})))),
|
|
48
|
-
}),
|
|
47
|
+
...(baselines.length === 0 ? {} : { baseline: baselineCases(baselines) }),
|
|
49
48
|
};
|
|
50
49
|
}
|
|
51
50
|
/** The archives among `pool` whose executions `evidence` holds for `keys`. */
|
|
@@ -54,20 +53,42 @@ function contributorsOf_(pool, evidence, keys) {
|
|
|
54
53
|
return pool.filter((archive) => runs.has(archive.run.id));
|
|
55
54
|
}
|
|
56
55
|
function declarationsOf_(archives, extra, options) {
|
|
56
|
+
return effectiveGateDeclarations([
|
|
57
|
+
...archives.flatMap((archive) => archive.gates),
|
|
58
|
+
...extra.map((declaration) => ({
|
|
59
|
+
origin: "config",
|
|
60
|
+
declaration,
|
|
61
|
+
})),
|
|
62
|
+
], options);
|
|
63
|
+
}
|
|
64
|
+
/** Every case the baselines selected: what a subject-less baseline gate covers. */
|
|
65
|
+
export function baselineCases(baselines) {
|
|
66
|
+
return baselines.flatMap((archive) => archive.conditions.flatMap((condition) => condition.cases
|
|
67
|
+
.filter((archived) => archived.selected)
|
|
68
|
+
.map((archived) => ({
|
|
69
|
+
runtime: condition.runtime,
|
|
70
|
+
file: condition.file,
|
|
71
|
+
conditionTitles: condition.titles,
|
|
72
|
+
caseTitle: archived.title,
|
|
73
|
+
}))));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The declarations a run with baselines evaluates: `declarations`, each
|
|
77
|
+
* baseline gate given the default `normalizeBy` it lacks, plus — when there are
|
|
78
|
+
* baselines and no declaration is a baseline gate — one baseline gate over
|
|
79
|
+
* every case (`maxRegression` its threshold, if any), duplicates removed. What
|
|
80
|
+
* the run checks before measuring and `evaluateArchives` evaluates afterwards,
|
|
81
|
+
* so both instantiate the same gates.
|
|
82
|
+
*/
|
|
83
|
+
export function effectiveGateDeclarations(declarations, options) {
|
|
57
84
|
const withNormalizer = (declaration) => declaration.kind === "baseline" &&
|
|
58
85
|
declaration.normalizeBy === undefined &&
|
|
59
86
|
options.normalizeBy !== undefined
|
|
60
87
|
? { ...declaration, normalizeBy: options.normalizeBy }
|
|
61
88
|
: declaration;
|
|
62
|
-
const all =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
: { ...gate, declaration: withNormalizer(gate.declaration) })),
|
|
66
|
-
...extra.map((declaration) => ({
|
|
67
|
-
origin: "config",
|
|
68
|
-
declaration: withNormalizer(declaration),
|
|
69
|
-
})),
|
|
70
|
-
];
|
|
89
|
+
const all = declarations.map((gate) => gate.origin === "suite"
|
|
90
|
+
? gate
|
|
91
|
+
: { ...gate, declaration: withNormalizer(gate.declaration) });
|
|
71
92
|
if ((options.baselines?.length ?? 0) > 0 &&
|
|
72
93
|
!all.some((gate) => gate.declaration.kind === "baseline")) {
|
|
73
94
|
all.push({
|
|
@@ -176,7 +197,9 @@ export function evaluateArchives(archives, extra, options = {}) {
|
|
|
176
197
|
.filter((condition) => condition.status === "failed").length +
|
|
177
198
|
archives
|
|
178
199
|
.flatMap((archive) => archive.diagnostics)
|
|
179
|
-
.filter((diagnostic) => diagnostic.
|
|
200
|
+
.filter((diagnostic) => diagnostic.severity === "error" &&
|
|
201
|
+
diagnostic.code !== undefined &&
|
|
202
|
+
FAILED_EXECUTION_CODES_.has(diagnostic.code)).length;
|
|
180
203
|
return {
|
|
181
204
|
verdicts,
|
|
182
205
|
errors,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-archives.js","sourceRoot":"","sources":["../src/evaluate-archives.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAkB3D;;;;GAIG;AACH,SAAS,UAAU,CAClB,QAAiC,EACjC,SAAkC;IAElC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IAE7C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAChC,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YAC5C,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;gBACxC,MAAM,GAAG,GAAG;oBACX,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1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;aACxC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM;QAC7D,QAAQ;aACN,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;aACzC,MAAM,CACN,CAAC,UAAU,EAAE,EAAE,CACd,UAAU,CAAC,QAAQ,KAAK,OAAO;YAC/B,UAAU,CAAC,IAAI,KAAK,SAAS;YAC7B,uBAAuB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAC7C,CAAC,MAAM,CAAC;IAEX,OAAO;QACN,QAAQ;QACR,MAAM;QACN,QAAQ,EAAE,aAAa,CACtB;YACC,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,MAAM,CAAC,MAAM;YAC1B,YAAY;YACZ,QAAQ;YACR,aAAa,EAAE,KAAK,CAAC,MAAM,CAC1B,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,KAAK,UAAU,CAC5C,CAAC,MAAM;SACR,EACD;YACC,iBAAiB,EAChB,OAAO,CAAC,iBAAiB;gBACzB,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC;SAC1D,CACD;KACD,CAAC;AACH,CAAC"}
|
package/dist/exit-code.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export declare const BENCH_EXIT_CODES: {
|
|
|
10
10
|
*/
|
|
11
11
|
readonly inconclusive: 2;
|
|
12
12
|
/**
|
|
13
|
-
* A case, condition or child failed, a file did not load,
|
|
14
|
-
* is missing.
|
|
13
|
+
* A case, condition or child failed, a file did not load, a runtime could not
|
|
14
|
+
* start, or a gate's subject is missing.
|
|
15
15
|
*/
|
|
16
16
|
readonly measurementError: 3;
|
|
17
17
|
/**
|
|
@@ -29,7 +29,7 @@ export type RunSummary = {
|
|
|
29
29
|
readonly interrupted: boolean;
|
|
30
30
|
/** Bad flags, config or declarations, and gate references that do not resolve. */
|
|
31
31
|
readonly usageErrors: number;
|
|
32
|
-
/** Cases, conditions, children and
|
|
32
|
+
/** Cases, conditions, children, files and runtimes that failed. */
|
|
33
33
|
readonly failedScopes: number;
|
|
34
34
|
readonly verdicts: readonly GateVerdict[];
|
|
35
35
|
readonly measuredCases: number;
|
package/dist/exit-code.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit-code.d.ts","sourceRoot":"","sources":["../src/exit-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,eAAO,MAAM,gBAAgB;IAC5B,gEAAgE;aAChE,OAAO,EAAE,CAAC;IACV,iFAAiF;aACjF,UAAU,EAAE,CAAC;IACb;;;OAGG;aACH,YAAY,EAAE,CAAC;IACf;;;OAGG;aACH,gBAAgB,EAAE,CAAC;IACnB;;;OAGG;aACH,UAAU,EAAE,CAAC;IACb,4DAA4D;aAC5D,UAAU,EAAE,CAAC;IACb,cAAc;aACd,WAAW,EAAE,GAAG;CACP,CAAC;AACX,MAAM,MAAM,aAAa,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG;IACxB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,
|
|
1
|
+
{"version":3,"file":"exit-code.d.ts","sourceRoot":"","sources":["../src/exit-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,eAAO,MAAM,gBAAgB;IAC5B,gEAAgE;aAChE,OAAO,EAAE,CAAC;IACV,iFAAiF;aACjF,UAAU,EAAE,CAAC;IACb;;;OAGG;aACH,YAAY,EAAE,CAAC;IACf;;;OAGG;aACH,gBAAgB,EAAE,CAAC;IACnB;;;OAGG;aACH,UAAU,EAAE,CAAC;IACb,4DAA4D;aAC5D,UAAU,EAAE,CAAC;IACb,cAAc;aACd,WAAW,EAAE,GAAG;CACP,CAAC;AACX,MAAM,MAAM,aAAa,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG;IACxB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,UAAU,EACnB,OAAO,GAAE;IAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GACpD,aAAa,CA2Bf"}
|
package/dist/exit-code.js
CHANGED
|
@@ -9,8 +9,8 @@ export const BENCH_EXIT_CODES = {
|
|
|
9
9
|
*/
|
|
10
10
|
inconclusive: 2,
|
|
11
11
|
/**
|
|
12
|
-
* A case, condition or child failed, a file did not load,
|
|
13
|
-
* is missing.
|
|
12
|
+
* A case, condition or child failed, a file did not load, a runtime could not
|
|
13
|
+
* start, or a gate's subject is missing.
|
|
14
14
|
*/
|
|
15
15
|
measurementError: 3,
|
|
16
16
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./baseline/compare-environments.js";
|
|
2
|
+
export * from "./baseline/fingerprint.js";
|
|
3
|
+
export * from "./baseline/runtime-flags.js";
|
|
2
4
|
export * from "./decision/decide.js";
|
|
3
5
|
export * from "./decision/needs-more-evidence.js";
|
|
4
6
|
export * from "./declaration/instantiate.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAEpC,YAAY,EACX,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAEpC,YAAY,EACX,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./baseline/compare-environments.js";
|
|
2
|
+
export * from "./baseline/fingerprint.js";
|
|
3
|
+
export * from "./baseline/runtime-flags.js";
|
|
2
4
|
export * from "./decision/decide.js";
|
|
3
5
|
export * from "./decision/needs-more-evidence.js";
|
|
4
6
|
export * from "./declaration/instantiate.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AASpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AASpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ac-bench/gate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Gate evaluation for @ac-bench: instantiates gate declarations against discovered cases, tests each against the executions' evidence, decides with multiplicity control, advises escalation, compares baselines and evaluates archives offline.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"benchmark",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"regression",
|
|
9
9
|
"statistics"
|
|
10
10
|
],
|
|
11
|
-
"homepage": "https://
|
|
11
|
+
"homepage": "https://anthochamp.pages.grenadine.io/node-essentials/bench/reference/api/gate/",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://git.grenadine.io/anthochamp/node-essentials/issues"
|
|
14
14
|
},
|
|
@@ -44,18 +44,19 @@
|
|
|
44
44
|
"prepack": "yarn build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ac-bench/core": "^0.
|
|
48
|
-
"@ac-kit/core": "^0.
|
|
49
|
-
"@ac-kit/
|
|
50
|
-
"@ac-kit/
|
|
47
|
+
"@ac-bench/core": "^0.5.0",
|
|
48
|
+
"@ac-kit/core": "^0.14.0",
|
|
49
|
+
"@ac-kit/crypto-hash": "^0.2.0",
|
|
50
|
+
"@ac-kit/format-glob": "^0.3.4",
|
|
51
|
+
"@ac-kit/math-stats": "^0.7.0",
|
|
51
52
|
"@types/web": "^0.0.367"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
|
-
"@ac-kit/algo": "^0.
|
|
55
|
-
"@ac-kit/math-random": "^0.4.
|
|
55
|
+
"@ac-kit/algo": "^0.7.0",
|
|
56
|
+
"@ac-kit/math-random": "^0.4.2",
|
|
56
57
|
"@ac-kit/tsconfig": "0.1.0",
|
|
57
58
|
"@ac-kit/typedoc-config": "0.1.0",
|
|
58
|
-
"@ac-kit/vitest-config": "0.
|
|
59
|
+
"@ac-kit/vitest-config": "0.3.0",
|
|
59
60
|
"@types/node": "26.6.11",
|
|
60
61
|
"@typescript/native": "typescript@7.0.2",
|
|
61
62
|
"rimraf": "6.1.4",
|