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.
Files changed (60) hide show
  1. package/README.md +4 -4
  2. package/docs/agent-protocol.md +13 -9
  3. package/docs/cli.md +90 -73
  4. package/docs/config.md +2 -2
  5. package/docs/document-schema.md +14 -12
  6. package/docs/library.md +17 -15
  7. package/docs/preload-recipes.md +4 -4
  8. package/docs/statistics.md +10 -10
  9. package/index.d.ts +197 -126
  10. package/package.json +1 -1
  11. package/src/ab/ab-runner.ts +6 -6
  12. package/src/ab/index.ts +15 -6
  13. package/src/bench/index.ts +12 -3
  14. package/src/bench/registry.ts +9 -7
  15. package/src/bench/run-tasks.ts +2 -2
  16. package/src/bench/runner.ts +2 -2
  17. package/src/bench/support.ts +8 -4
  18. package/src/bench/sweep.ts +3 -3
  19. package/src/cache/fingerprint.ts +2 -2
  20. package/src/capture/bunflags.ts +2 -2
  21. package/src/capture/cpu.ts +2 -2
  22. package/src/capture/heap-parse.ts +2 -2
  23. package/src/ci/index.ts +7 -6
  24. package/src/cli/agent.ts +54 -0
  25. package/src/cli/flags.ts +50 -9
  26. package/src/cli/help.ts +29 -11
  27. package/src/cli/output.ts +6 -3
  28. package/src/cli/run.ts +29 -5
  29. package/src/compare/index.ts +4 -4
  30. package/src/config/index.ts +14 -10
  31. package/src/config/validate.ts +4 -4
  32. package/src/glob.ts +2 -2
  33. package/src/index.ts +18 -1
  34. package/src/ir/document.ts +2 -2
  35. package/src/ir/types.ts +50 -27
  36. package/src/measure/alloc.ts +2 -2
  37. package/src/measure/cpu.ts +2 -2
  38. package/src/measure/environment.ts +11 -6
  39. package/src/measure/inprocess.ts +14 -10
  40. package/src/measure/instructions.ts +2 -2
  41. package/src/measure/noise.ts +51 -13
  42. package/src/measure/paired.ts +2 -2
  43. package/src/measure/peak.ts +4 -4
  44. package/src/measure/timing.ts +18 -3
  45. package/src/profile.ts +6 -4
  46. package/src/renderers/collapsed.ts +2 -2
  47. package/src/renderers/concise.ts +148 -0
  48. package/src/renderers/format.ts +13 -4
  49. package/src/renderers/index.ts +6 -0
  50. package/src/renderers/markdown.ts +2 -2
  51. package/src/renderers/mermaid.ts +2 -2
  52. package/src/renderers/minimal.ts +11 -10
  53. package/src/renderers/relative.ts +2 -2
  54. package/src/renderers/select.ts +2 -2
  55. package/src/renderers/terminal.ts +6 -3
  56. package/src/renderers/types.ts +3 -0
  57. package/src/spawn/index.ts +47 -14
  58. package/src/stats/bootstrap.ts +2 -2
  59. package/src/stats/index.ts +2 -2
  60. package/src/time.ts +75 -10
@@ -1,7 +1,7 @@
1
1
  # Statistics
2
2
 
3
- How ostia samples, summarizes, and decides whether a change is a
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 as
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 assuming
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 and the p-value is above
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 the
218
- code.
217
+ differing fields: the delta may reflect the machine rather than
218
+ the code.