@camstack/addon-benchmark 1.2.21 → 1.2.23

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 (21) hide show
  1. package/dist/{MotionZonesSettings-DK2mygZ0.mjs → MotionZonesSettings-Cv4TmMdX.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DnVmCxKv.mjs → PrivacyMaskSettings-BSmsxYVM.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-DsJusZqo.mjs → SceneMonitorEditor-ChbeJhbn.mjs} +3 -3
  4. package/dist/_stub.js +9176 -8970
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-DWAVFK8i.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-Cdo0XQjH.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Dr91v2M3.mjs +26 -0
  7. package/dist/addon-benchmark.css +1 -1
  8. package/dist/{hostInit-itKGbaVf.mjs → hostInit-g_8xXNEb.mjs} +3 -3
  9. package/dist/index.js +49 -11
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +49 -11
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/{player-overlays-B__t-VcT.mjs → player-overlays-DJ3TkP_o.mjs} +1 -1
  14. package/dist/remoteEntry.js +1 -1
  15. package/dist/{responsive-DQC7AlIS.mjs → responsive-B5G4Qi88.mjs} +1 -1
  16. package/dist/{square-B8jQlWTL.mjs → square-B5iHgY-X.mjs} +1 -1
  17. package/dist/{trash-2-DCcqBmuH.mjs → trash-2-B-RRj1DD.mjs} +1 -1
  18. package/dist/{use-device-snapshot-DJOso5vd.mjs → use-device-snapshot-zwEkDKtj.mjs} +1 -1
  19. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-Bg5gdOMG.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-CWakPvah.mjs} +1 -1
  20. package/package.json +2 -1
  21. package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BmZwllZF.mjs +0 -26
package/dist/index.js CHANGED
@@ -40,9 +40,9 @@ var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${_
40
40
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
41
41
 
42
42
  // src/benchmark-addon.ts
43
+ var fs2 = __toESM(require("fs"));
43
44
  var import_node_url = require("url");
44
45
  var path2 = __toESM(require("path"));
45
- var fs2 = __toESM(require("fs"));
46
46
  var import_types4 = require("@camstack/types");
47
47
 
48
48
  // ../../node_modules/zod/v4/classic/external.js
@@ -14559,6 +14559,9 @@ function date4(params) {
14559
14559
  // ../../node_modules/zod/v4/classic/external.js
14560
14560
  config(en_default());
14561
14561
 
14562
+ // src/benchmark-actions.ts
14563
+ var import_types2 = require("@camstack/types");
14564
+
14562
14565
  // src/benchmark-schemas.ts
14563
14566
  var import_types = require("@camstack/types");
14564
14567
  var PipelineBenchmarkHistoryEntrySchema = external_exports.object({
@@ -14575,8 +14578,17 @@ var PipelineBenchmarkHistoryEntrySchema = external_exports.object({
14575
14578
  medianMs: external_exports.number(),
14576
14579
  p95Ms: external_exports.number(),
14577
14580
  p99Ms: external_exports.number(),
14578
- minMs: external_exports.number(),
14579
- maxMs: external_exports.number(),
14581
+ /**
14582
+ * OPTIONAL, and absent on every entry the page writes.
14583
+ * `pipeline-runner.runSyntheticBench` reports mean / p50 / p95 / p99 and
14584
+ * measures no per-call min or max. They were required here while nothing
14585
+ * in the page ever called `saveBenchmarkResult`, so nothing noticed; the
14586
+ * moment it does, a required field can only be satisfied by inventing a
14587
+ * number, and a fabricated latency in the history table is worse than a
14588
+ * blank one.
14589
+ */
14590
+ minMs: external_exports.number().optional(),
14591
+ maxMs: external_exports.number().optional(),
14580
14592
  avgDetections: external_exports.number(),
14581
14593
  referenceImage: external_exports.string().optional(),
14582
14594
  /** Number of concurrent runs aggregated into this entry; 1 = single run. */
@@ -14728,7 +14740,9 @@ var PipelineRunInputSchema = external_exports.object({
14728
14740
  backend: external_exports.string(),
14729
14741
  format: external_exports.enum(["onnx", "coreml", "openvino", "tflite"]),
14730
14742
  device: external_exports.string().optional()
14731
- }).optional()
14743
+ }).optional(),
14744
+ deviceKey: external_exports.string().optional(),
14745
+ plane: external_exports.enum(["full", "frame"]).optional()
14732
14746
  });
14733
14747
  var PipelineRunBatchInputSchema = external_exports.object({
14734
14748
  steps: external_exports.array(import_types.PipelineStepInputSchema).readonly(),
@@ -14834,7 +14848,6 @@ var SustainedThroughputResultSchema = external_exports.object({
14834
14848
  });
14835
14849
 
14836
14850
  // src/benchmark-actions.ts
14837
- var import_types2 = require("@camstack/types");
14838
14851
  var benchmarkActions = (0, import_types2.defineCustomActions)({
14839
14852
  // Pipeline tester
14840
14853
  runPipelineTest: (0, import_types2.customAction)(PipelineRunInputSchema, import_types2.PipelineRunResultBridge, {
@@ -14864,6 +14877,11 @@ var benchmarkActions = (0, import_types2.defineCustomActions)({
14864
14877
  * addon, then forwards N FrameInputs to the target node in a single
14865
14878
  * `pipelineExecutor.runPipelineBatch` cap call. Returns N
14866
14879
  * `FrameResult`s plus aggregate timing.
14880
+ *
14881
+ * NO UI CALLER — and it is NOT dead. `scripts/bench-pool-ceiling.mts` and
14882
+ * `scripts/bench-pipeline-investigation.mts` drive it directly. Do not
14883
+ * delete it on the strength of an in-package grep; those scripts break
14884
+ * silently and nothing in CI runs them.
14867
14885
  */
14868
14886
  runPipelineBatchTest: (0, import_types2.customAction)(PipelineRunBatchInputSchema, PipelineRunBatchResultSchema, {
14869
14887
  kind: "mutation"
@@ -14874,6 +14892,9 @@ var benchmarkActions = (0, import_types2.defineCustomActions)({
14874
14892
  * issuing a configurable mix of batched + single cap calls). Returns
14875
14893
  * only aggregate detection-rate stats. Used to measure the pool's
14876
14894
  * true throughput ceiling without per-call tRPC overhead.
14895
+ *
14896
+ * NO UI CALLER — and it is NOT dead. `scripts/bench-pool-inprocess.mts`
14897
+ * drives it directly. Same warning as `runPipelineBatchTest` above.
14877
14898
  */
14878
14899
  runMultiCameraStressTest: (0, import_types2.customAction)(
14879
14900
  MultiCameraStressInputSchema,
@@ -14899,8 +14920,16 @@ var benchmarkActions = (0, import_types2.defineCustomActions)({
14899
14920
  external_exports.object({ aborted: external_exports.boolean() }),
14900
14921
  { kind: "mutation" }
14901
14922
  ),
14902
- // History (shared across pipeline + decoder-perf entries)
14903
- listBenchmarkHistory: (0, import_types2.customAction)(external_exports.void(), external_exports.array(HistoryEntrySchema).readonly()),
14923
+ /**
14924
+ * History (shared across pipeline + decoder-perf entries).
14925
+ *
14926
+ * `z.object({})`, never `z.void()`: the `addons.custom` envelope insists
14927
+ * on an `input` object, and a `z.void()` schema REJECTS `{}` — so the
14928
+ * action resolved and could never actually be called, not from a settings
14929
+ * button and not from `hub.mjs`. The tabs only got away with it by
14930
+ * sending `input: undefined`.
14931
+ */
14932
+ listBenchmarkHistory: (0, import_types2.customAction)(external_exports.object({}), external_exports.array(HistoryEntrySchema).readonly()),
14904
14933
  saveBenchmarkResult: (0, import_types2.customAction)(
14905
14934
  PipelineBenchmarkHistoryEntryInputSchema,
14906
14935
  PipelineBenchmarkHistoryEntrySchema,
@@ -14916,11 +14945,12 @@ var benchmarkActions = (0, import_types2.defineCustomActions)({
14916
14945
  external_exports.object({ success: external_exports.literal(true) }),
14917
14946
  { kind: "mutation" }
14918
14947
  ),
14919
- clearBenchmarkHistory: (0, import_types2.customAction)(external_exports.void(), external_exports.object({ success: external_exports.literal(true) }), {
14948
+ clearBenchmarkHistory: (0, import_types2.customAction)(external_exports.object({}), external_exports.object({ success: external_exports.literal(true) }), {
14920
14949
  kind: "mutation"
14921
14950
  }),
14922
- // Decoder perf — fixture discovery + run control
14923
- listDecoderFixtures: (0, import_types2.customAction)(external_exports.void(), external_exports.array(DecoderFixtureSchema).readonly()),
14951
+ // Decoder perf — fixture discovery + run control.
14952
+ // `z.object({})` for the same reason as `listBenchmarkHistory` above.
14953
+ listDecoderFixtures: (0, import_types2.customAction)(external_exports.object({}), external_exports.array(DecoderFixtureSchema).readonly()),
14924
14954
  runDecoderPerformanceTest: (0, import_types2.customAction)(DecoderPerfInputSchema, DecoderPerfResultSchema, {
14925
14955
  kind: "mutation"
14926
14956
  }),
@@ -15468,9 +15498,12 @@ var BenchmarkAddon = class extends import_types4.BaseAddon {
15468
15498
  }
15469
15499
  async runPipelineTest(input) {
15470
15500
  const { nodeId, steps, imageBase64, referenceImage, frameId, sessionId, engine } = input;
15501
+ const { deviceKey, plane } = input;
15471
15502
  this.ctx.logger.debug("runPipelineTest payload", {
15472
15503
  meta: {
15473
15504
  nodeId: nodeId ?? null,
15505
+ deviceKey: deviceKey ?? null,
15506
+ plane: plane ?? null,
15474
15507
  sessionId: sessionId ?? null,
15475
15508
  engine: engine ?? null,
15476
15509
  stepsCount: steps.length,
@@ -15504,7 +15537,12 @@ var BenchmarkAddon = class extends import_types4.BaseAddon {
15504
15537
  ...!image && imageBase64 ? { imageBase64 } : {},
15505
15538
  referenceImage,
15506
15539
  sessionId,
15507
- ...engine ? { engine } : {}
15540
+ ...engine ? { engine } : {},
15541
+ // Absent, never present-and-undefined: the generated router takes
15542
+ // `.loose()` input and an explicit `undefined` is not the same thing
15543
+ // as "the node's default pool" / "the cap's default plane".
15544
+ ...deviceKey ? { deviceKey } : {},
15545
+ ...plane ? { plane } : {}
15508
15546
  }),
15509
15547
  BENCH_RUN_TIMEOUT_MS,
15510
15548
  "runPipelineTest"