ostia 0.4.0 → 0.6.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 +31 -30
- package/docs/agent-protocol.md +13 -9
- package/docs/cli.md +174 -126
- package/docs/config.md +2 -2
- package/docs/document-schema.md +15 -12
- package/docs/library.md +32 -21
- package/docs/preload-recipes.md +4 -4
- package/docs/statistics.md +14 -13
- package/index.d.ts +202 -60
- package/package.json +1 -1
- package/src/ab/ab-runner.ts +6 -6
- package/src/ab/index.ts +56 -6
- package/src/ab/unpaired.ts +54 -0
- package/src/bench/index.ts +40 -3
- package/src/bench/registry.ts +6 -4
- package/src/bench/run-tasks.ts +16 -2
- package/src/bench/runner.ts +10 -3
- package/src/bench/support.ts +8 -4
- package/src/bench/sweep.ts +2 -2
- 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 +39 -48
- package/src/cli/agent.ts +54 -0
- package/src/cli/flags.ts +58 -9
- package/src/cli/help.ts +670 -245
- package/src/cli/main.ts +2 -3
- package/src/cli/output.ts +17 -14
- package/src/cli/run.ts +317 -92
- 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 +3 -2
- package/src/ir/document.ts +2 -2
- package/src/ir/types.ts +49 -24
- 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 +27 -6
- 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/human.ts +402 -0
- package/src/renderers/index.ts +9 -2
- package/src/renderers/markdown.ts +2 -2
- package/src/renderers/mermaid.ts +2 -2
- package/src/renderers/minimal.ts +8 -7
- package/src/renderers/relative.ts +2 -2
- package/src/renderers/select.ts +2 -2
- package/src/renderers/terminal.ts +1178 -383
- 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/terminal.ts +321 -0
- package/src/time.ts +124 -20
package/src/renderers/minimal.ts
CHANGED
|
@@ -112,8 +112,8 @@ export interface MinimalRunLine {
|
|
|
112
112
|
groupDescription?: string;
|
|
113
113
|
params?: Record<string, string | number | boolean>;
|
|
114
114
|
/**
|
|
115
|
-
* `task.skip()` / `group.skip()`: no measurement, so every stats field
|
|
116
|
-
* absent.
|
|
115
|
+
* `task.skip()` / `group.skip()`: no measurement, so every stats field
|
|
116
|
+
* is absent.
|
|
117
117
|
*/
|
|
118
118
|
skipped?: true;
|
|
119
119
|
unit?: "ns";
|
|
@@ -207,8 +207,8 @@ export interface MinimalSummaryLine {
|
|
|
207
207
|
/** `ab` only: the gate on `geomeanPct`. */
|
|
208
208
|
geomeanThresholdPct?: number;
|
|
209
209
|
/**
|
|
210
|
-
* `ab` only: flagged in the first process but not reproduced; counted
|
|
211
|
-
* `unchanged`.
|
|
210
|
+
* `ab` only: flagged in the first process but not reproduced; counted
|
|
211
|
+
* in `unchanged`.
|
|
212
212
|
*/
|
|
213
213
|
unconfirmed?: number;
|
|
214
214
|
/**
|
|
@@ -239,8 +239,9 @@ export type MinimalEvent =
|
|
|
239
239
|
/**
|
|
240
240
|
* What the `unmatched`/`summary` events need beyond one `ProfileDocument`.
|
|
241
241
|
* The CLI builds it for `compare`/`ci`/`ab`; without it `minimal` emits
|
|
242
|
-
* only `run` lines. `exitCode` is inline because the CLI decides it
|
|
243
|
-
* rendering.
|
|
242
|
+
* only `run` lines. `exitCode` is inline because the CLI decides it
|
|
243
|
+
* after rendering.
|
|
244
|
+
*/
|
|
244
245
|
export interface MinimalProtocolContext {
|
|
245
246
|
command: "compare" | "ci" | "ab";
|
|
246
247
|
exitCode: number;
|
|
@@ -584,7 +585,7 @@ function summaryLine(
|
|
|
584
585
|
}
|
|
585
586
|
|
|
586
587
|
export const minimalRenderer: Renderer<MinimalRenderOptions> = {
|
|
587
|
-
name: "
|
|
588
|
+
name: "events",
|
|
588
589
|
render(
|
|
589
590
|
doc: ProfileDocument,
|
|
590
591
|
options: MinimalRenderOptions = {},
|
|
@@ -7,8 +7,8 @@ export interface TimingRow {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// The explicit `entry.group` the bench runner records, else the
|
|
10
|
-
// "group/name" id split on its last "/" (documents from before that
|
|
11
|
-
// existed).
|
|
10
|
+
// "group/name" id split on its last "/" (documents from before that
|
|
11
|
+
// field existed).
|
|
12
12
|
export function groupOf(workload: Workload | undefined): string | undefined {
|
|
13
13
|
if (!workload?.entry) return undefined;
|
|
14
14
|
if (workload.entry.group !== undefined) return workload.entry.group;
|
package/src/renderers/select.ts
CHANGED
|
@@ -224,8 +224,8 @@ function rebuildCompared(doc: ProfileDocument): ComparedTask[] {
|
|
|
224
224
|
];
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
// Heap readings move with GC timing, so a small change is noise, not
|
|
228
|
-
// line.
|
|
227
|
+
// Heap readings move with GC timing, so a small change is noise, not
|
|
228
|
+
// a line.
|
|
229
229
|
const MIN_MEMORY_DISPLAY_PCT = 10;
|
|
230
230
|
|
|
231
231
|
const MEMORY_READING_LABELS: Record<MemoryDelta["reading"], string> = {
|