@overkill-dev/reporter-benchmark-html 0.0.0-stage → 0.0.2

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 (44) hide show
  1. package/LICENSE +21 -0
  2. package/bench/benchmark-host-snapshot.js +83 -0
  3. package/bench/benchmark-host-snapshot.js.map +1 -0
  4. package/bench/benchmark-run-report.js +55 -0
  5. package/bench/benchmark-run-report.js.map +1 -0
  6. package/bench/benchmark-sample-report.js +92 -0
  7. package/bench/benchmark-sample-report.js.map +1 -0
  8. package/bench/metric-normalization-evidence.js +7 -0
  9. package/bench/metric-normalization-evidence.js.map +1 -0
  10. package/bench/process-evidence-query.js +27 -0
  11. package/bench/process-evidence-query.js.map +1 -0
  12. package/bench/statistical-primitives.js +32 -0
  13. package/bench/statistical-primitives.js.map +1 -0
  14. package/bench/timeline-report.js +41 -0
  15. package/bench/timeline-report.js.map +1 -0
  16. package/bench/timeline-schema.js +28 -0
  17. package/bench/timeline-schema.js.map +1 -0
  18. package/config/benchmark-host.js +21 -0
  19. package/config/benchmark-host.js.map +1 -0
  20. package/file-store.js +48 -0
  21. package/file-store.js.map +1 -0
  22. package/package.json +43 -4
  23. package/packages/reporter-benchmark-html/reporter-benchmark-html.entry-point.d.ts +3 -0
  24. package/packages/reporter-benchmark-html/reporter-benchmark-html.entry-point.d.ts.map +1 -0
  25. package/packages/reporter-benchmark-html/reporter-benchmark-html.entry-point.js +2 -0
  26. package/packages/reporter-benchmark-html/reporter-benchmark-html.entry-point.js.map +1 -0
  27. package/readme.md +49 -0
  28. package/reporters/benchmark-deltas.js +17 -0
  29. package/reporters/benchmark-deltas.js.map +1 -0
  30. package/reporters/benchmark-html-assets/client.txt +337 -0
  31. package/reporters/benchmark-html-distribution.js +65 -0
  32. package/reporters/benchmark-html-distribution.js.map +1 -0
  33. package/reporters/benchmark-html-document.js +272 -0
  34. package/reporters/benchmark-html-document.js.map +1 -0
  35. package/reporters/benchmark-html-metrics.js +121 -0
  36. package/reporters/benchmark-html-metrics.js.map +1 -0
  37. package/reporters/benchmark-html-model.js +97 -0
  38. package/reporters/benchmark-html-model.js.map +1 -0
  39. package/reporters/benchmark-html-reporter.d.ts +7 -0
  40. package/reporters/benchmark-html-reporter.d.ts.map +1 -0
  41. package/reporters/benchmark-html-reporter.js +46 -0
  42. package/reporters/benchmark-html-reporter.js.map +1 -0
  43. package/software-bill-of-materials.cyclonedx.json +101 -0
  44. package/README.md +0 -3
package/readme.md ADDED
@@ -0,0 +1,49 @@
1
+ # Benchmark HTML reporter
2
+
3
+ Create an offline, interactive HTML report from a benchmark profile:
4
+
5
+ ```ts
6
+ import { createBenchmarkHtmlReporter } from '@overkill-dev/test/reporters';
7
+
8
+ const reporters = [
9
+ createBenchmarkHtmlReporter({ outputFile: 'reports/benchmarks.html' })
10
+ ];
11
+ ```
12
+
13
+ The same factory is available from `@overkill-dev/reporter-benchmark-html`.
14
+ Set this list on the benchmark profile's `reporters` property.
15
+ Run the selected profile with `overkill bench run --profile <name>`.
16
+ Relative output paths resolve when the factory is created. Reports replace the
17
+ configured file atomically; file sinks are exclusive.
18
+
19
+ Reports include workload/runtime metric tables, retained-sample distributions,
20
+ empirical box plots, budget estimates and uncertainty intervals, baseline
21
+ comparisons, policy outcomes, and recorded machine/process metadata. Use the
22
+ metric and workload selectors, chart sliders, and tooltips to explore results.
23
+ All scripts and styles are embedded. Tables remain readable without JavaScript.
24
+
25
+ Budget tables and tooltips include signed deltas from each configured bound in
26
+ the displayed raw or normalized scale. Percentage deltas divide by the absolute
27
+ bound and remain unavailable for zero or missing bounds. Deltas never determine
28
+ pass/fail; recorded budget intervals and decisions remain authoritative.
29
+
30
+ Opt-in benchmark timelines provide workload, phase, sample, and clock-domain
31
+ selectors plus static event tables. Separate process clocks retain their own
32
+ origins. Missing attachments, historical absence, and omitted events are explicit.
33
+
34
+ Charts embed aggregated data, not individual samples. Original sample artifacts
35
+ remain under runner retention policy. Missing or omitted samples have an
36
+ explicit reason; summary statistics and budget outcomes remain available.
37
+ Observed sample quartiles are descriptive, not confidence intervals. Budget
38
+ intervals and decisions come directly from benchmark execution.
39
+
40
+ Performance adapters may implement `describeMetrics({ actual, expected })` to
41
+ supply typed chart values, units, point/range references, and raw or normalized
42
+ scale labels. Adapters own normalization and comparison policy. Existing JSON
43
+ adapters continue working with structured comparison diagnostics. Chart metadata
44
+ errors fail infrastructure reporting after valid baseline operations, preserving
45
+ completed writes. Saved legacy reports have no chart metadata.
46
+
47
+ The reporter uses the existing 100 ms callback limit. Write failures and timeouts
48
+ are reported through the normal reporter error pipeline. Direct engine execution
49
+ must provide benchmark run facts; missing host metadata is labeled as unrecorded.
@@ -0,0 +1,17 @@
1
+ const percentMultiplier = 100;
2
+ export function difference(actual, expected) {
3
+ if (actual === null || expected === null) {
4
+ return null;
5
+ }
6
+ const delta = actual - expected;
7
+ return Number.isFinite(delta) ? delta : null;
8
+ }
9
+ export function percentDifference(actual, expected) {
10
+ const delta = difference(actual, expected);
11
+ if (delta === null || expected === null || expected === 0) {
12
+ return null;
13
+ }
14
+ const percent = delta / Math.abs(expected) * percentMultiplier;
15
+ return Number.isFinite(percent) ? percent : null;
16
+ }
17
+ //# sourceMappingURL=benchmark-deltas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benchmark-deltas.js","sourceRoot":"","sources":["../../../../source/reporters/benchmark-deltas.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,UAAU,UAAU,CAAC,MAAqB,EAAE,QAAuB;IACrE,IAAI,MAAM,KAAK,IAAI,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC;AACD,MAAM,UAAU,iBAAiB,CAAC,MAAqB,EAAE,QAAuB;IAC5E,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C,IAAI,KAAK,KAAK,IAAI,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,iBAAiB,CAAC;IAC/D,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC"}