ostia 0.3.1 → 0.5.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/README.md +4 -4
- package/docs/agent-protocol.md +13 -9
- package/docs/cli.md +90 -73
- package/docs/config.md +2 -2
- package/docs/document-schema.md +14 -12
- package/docs/library.md +17 -15
- package/docs/preload-recipes.md +4 -4
- package/docs/statistics.md +10 -10
- package/index.d.ts +197 -126
- package/package.json +1 -1
- package/src/ab/ab-runner.ts +6 -6
- package/src/ab/index.ts +15 -6
- package/src/bench/index.ts +12 -3
- package/src/bench/registry.ts +9 -7
- package/src/bench/run-tasks.ts +2 -2
- package/src/bench/runner.ts +2 -2
- package/src/bench/support.ts +8 -4
- package/src/bench/sweep.ts +3 -3
- package/src/cache/fingerprint.ts +2 -2
- package/src/capture/bunflags.ts +2 -2
- package/src/capture/cpu.ts +2 -2
- package/src/capture/heap-parse.ts +2 -2
- package/src/ci/index.ts +7 -6
- package/src/cli/agent.ts +54 -0
- package/src/cli/flags.ts +50 -9
- package/src/cli/help.ts +29 -11
- package/src/cli/output.ts +6 -3
- package/src/cli/run.ts +29 -5
- package/src/compare/index.ts +4 -4
- package/src/config/index.ts +14 -10
- package/src/config/validate.ts +4 -4
- package/src/glob.ts +2 -2
- package/src/index.ts +18 -1
- package/src/ir/document.ts +2 -2
- package/src/ir/types.ts +50 -27
- package/src/measure/alloc.ts +2 -2
- package/src/measure/cpu.ts +2 -2
- package/src/measure/environment.ts +11 -6
- package/src/measure/inprocess.ts +14 -10
- package/src/measure/instructions.ts +2 -2
- package/src/measure/noise.ts +51 -13
- package/src/measure/paired.ts +2 -2
- package/src/measure/peak.ts +4 -4
- package/src/measure/timing.ts +18 -3
- package/src/profile.ts +6 -4
- package/src/renderers/collapsed.ts +2 -2
- package/src/renderers/concise.ts +148 -0
- package/src/renderers/format.ts +13 -4
- package/src/renderers/index.ts +6 -0
- package/src/renderers/markdown.ts +2 -2
- package/src/renderers/mermaid.ts +2 -2
- package/src/renderers/minimal.ts +11 -10
- package/src/renderers/relative.ts +2 -2
- package/src/renderers/select.ts +2 -2
- package/src/renderers/terminal.ts +6 -3
- package/src/renderers/types.ts +3 -0
- package/src/spawn/index.ts +47 -14
- package/src/stats/bootstrap.ts +2 -2
- package/src/stats/index.ts +2 -2
- package/src/time.ts +75 -10
package/docs/statistics.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Statistics
|
|
2
2
|
|
|
3
|
-
How ostia samples, summarizes, and decides whether a change is
|
|
4
|
-
regression.
|
|
3
|
+
How ostia samples, summarizes, and decides whether a change is
|
|
4
|
+
a regression.
|
|
5
5
|
|
|
6
6
|
## Summary statistics
|
|
7
7
|
|
|
@@ -58,8 +58,8 @@ For the most comparable numbers, run tasks with `isolate`.
|
|
|
58
58
|
|
|
59
59
|
Before measuring, `time()`, `bench()` and `ostia ci` each run a fixed,
|
|
60
60
|
allocation-free hash loop for about 200ms, once per call,
|
|
61
|
-
and record `mad / median` of its trial times
|
|
62
|
-
`environment.noise.floorPct`.
|
|
61
|
+
and record `mad / median` of its trial times
|
|
62
|
+
as `environment.noise.floorPct`.
|
|
63
63
|
This is how much this machine's timings vary at the moment,
|
|
64
64
|
independent of the workload.
|
|
65
65
|
`noiseCheck: false` / `--no-noise-check` skips it
|
|
@@ -89,8 +89,8 @@ each side, runs two tests on the raw samples:
|
|
|
89
89
|
first, which bounds the cost.
|
|
90
90
|
- **Mann-Whitney U test**, two-sided, tie-corrected,
|
|
91
91
|
normal approximation, reported as `pValue`.
|
|
92
|
-
It tests whether the two distributions differ without
|
|
93
|
-
normality.
|
|
92
|
+
It tests whether the two distributions differ without
|
|
93
|
+
assuming normality.
|
|
94
94
|
|
|
95
95
|
The bootstrap PRNG is seeded from a hash of the two sample arrays,
|
|
96
96
|
so the same two documents always produce the same interval and verdict.
|
|
@@ -108,8 +108,8 @@ Let `T = effectiveTimingPct` (below).
|
|
|
108
108
|
A large point estimate is not enough.
|
|
109
109
|
For example, `+21.4% median, 95% CI [+5.6%, +23.9%], p=0.023` against
|
|
110
110
|
`T = 10` and `alpha = 0.01` is `unchanged`:
|
|
111
|
-
the interval reaches below the threshold
|
|
112
|
-
`alpha`.
|
|
111
|
+
the interval reaches below the threshold
|
|
112
|
+
and the p-value is above `alpha`.
|
|
113
113
|
|
|
114
114
|
With fewer than 5 samples on either side,
|
|
115
115
|
the tests are skipped and the verdict uses the median change alone
|
|
@@ -214,5 +214,5 @@ which is why the quartile rule and confirmation stay.
|
|
|
214
214
|
When base and candidate differ in OS, architecture, Bun version,
|
|
215
215
|
or (when both have it) CPU model or core count,
|
|
216
216
|
every comparison carries an `environment-mismatch` warning with the
|
|
217
|
-
differing fields: the delta may reflect the machine rather than
|
|
218
|
-
code.
|
|
217
|
+
differing fields: the delta may reflect the machine rather than
|
|
218
|
+
the code.
|