@camstack/addon-benchmark 1.2.21 → 1.2.22
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/dist/{MotionZonesSettings-DK2mygZ0.mjs → MotionZonesSettings-BpOw7ODD.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-DnVmCxKv.mjs → PrivacyMaskSettings-CjWrB0Qk.mjs} +4 -4
- package/dist/{SceneMonitorEditor-DsJusZqo.mjs → SceneMonitorEditor-SaNRH6n-.mjs} +3 -3
- package/dist/_stub.js +9176 -8970
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-DWAVFK8i.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-DkrfpU7S.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BQ4apLX0.mjs +26 -0
- package/dist/addon-benchmark.css +1 -1
- package/dist/{hostInit-itKGbaVf.mjs → hostInit-bAoD5Sw6.mjs} +2 -2
- package/dist/index.js +49 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -11
- package/dist/index.mjs.map +1 -1
- package/dist/{player-overlays-B__t-VcT.mjs → player-overlays-ih4nyGLV.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DQC7AlIS.mjs → responsive-B3IWvenH.mjs} +1 -1
- package/dist/{square-B8jQlWTL.mjs → square-CRFDJnqj.mjs} +1 -1
- package/dist/{trash-2-DCcqBmuH.mjs → trash-2-Cn8tz9C7.mjs} +1 -1
- package/dist/{use-device-snapshot-DJOso5vd.mjs → use-device-snapshot-CsFBDadE.mjs} +1 -1
- 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-CchueAb6.mjs} +1 -1
- package/package.json +2 -1
- 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.mjs
CHANGED
|
@@ -5,9 +5,9 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/benchmark-addon.ts
|
|
8
|
+
import * as fs2 from "fs";
|
|
8
9
|
import { fileURLToPath } from "url";
|
|
9
10
|
import * as path2 from "path";
|
|
10
|
-
import * as fs2 from "fs";
|
|
11
11
|
import { BaseAddon, addonPagesSourceCapability, parseJsonUnknown, errMsg } from "@camstack/types";
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/zod/v4/classic/external.js
|
|
@@ -14524,6 +14524,9 @@ function date4(params) {
|
|
|
14524
14524
|
// ../../node_modules/zod/v4/classic/external.js
|
|
14525
14525
|
config(en_default());
|
|
14526
14526
|
|
|
14527
|
+
// src/benchmark-actions.ts
|
|
14528
|
+
import { customAction, defineCustomActions, PipelineRunResultBridge } from "@camstack/types";
|
|
14529
|
+
|
|
14527
14530
|
// src/benchmark-schemas.ts
|
|
14528
14531
|
import { HWACCEL_OPTIONS, PipelineStepInputSchema } from "@camstack/types";
|
|
14529
14532
|
var PipelineBenchmarkHistoryEntrySchema = external_exports.object({
|
|
@@ -14540,8 +14543,17 @@ var PipelineBenchmarkHistoryEntrySchema = external_exports.object({
|
|
|
14540
14543
|
medianMs: external_exports.number(),
|
|
14541
14544
|
p95Ms: external_exports.number(),
|
|
14542
14545
|
p99Ms: external_exports.number(),
|
|
14543
|
-
|
|
14544
|
-
|
|
14546
|
+
/**
|
|
14547
|
+
* OPTIONAL, and absent on every entry the page writes.
|
|
14548
|
+
* `pipeline-runner.runSyntheticBench` reports mean / p50 / p95 / p99 and
|
|
14549
|
+
* measures no per-call min or max. They were required here while nothing
|
|
14550
|
+
* in the page ever called `saveBenchmarkResult`, so nothing noticed; the
|
|
14551
|
+
* moment it does, a required field can only be satisfied by inventing a
|
|
14552
|
+
* number, and a fabricated latency in the history table is worse than a
|
|
14553
|
+
* blank one.
|
|
14554
|
+
*/
|
|
14555
|
+
minMs: external_exports.number().optional(),
|
|
14556
|
+
maxMs: external_exports.number().optional(),
|
|
14545
14557
|
avgDetections: external_exports.number(),
|
|
14546
14558
|
referenceImage: external_exports.string().optional(),
|
|
14547
14559
|
/** Number of concurrent runs aggregated into this entry; 1 = single run. */
|
|
@@ -14693,7 +14705,9 @@ var PipelineRunInputSchema = external_exports.object({
|
|
|
14693
14705
|
backend: external_exports.string(),
|
|
14694
14706
|
format: external_exports.enum(["onnx", "coreml", "openvino", "tflite"]),
|
|
14695
14707
|
device: external_exports.string().optional()
|
|
14696
|
-
}).optional()
|
|
14708
|
+
}).optional(),
|
|
14709
|
+
deviceKey: external_exports.string().optional(),
|
|
14710
|
+
plane: external_exports.enum(["full", "frame"]).optional()
|
|
14697
14711
|
});
|
|
14698
14712
|
var PipelineRunBatchInputSchema = external_exports.object({
|
|
14699
14713
|
steps: external_exports.array(PipelineStepInputSchema).readonly(),
|
|
@@ -14799,7 +14813,6 @@ var SustainedThroughputResultSchema = external_exports.object({
|
|
|
14799
14813
|
});
|
|
14800
14814
|
|
|
14801
14815
|
// src/benchmark-actions.ts
|
|
14802
|
-
import { customAction, defineCustomActions, PipelineRunResultBridge } from "@camstack/types";
|
|
14803
14816
|
var benchmarkActions = defineCustomActions({
|
|
14804
14817
|
// Pipeline tester
|
|
14805
14818
|
runPipelineTest: customAction(PipelineRunInputSchema, PipelineRunResultBridge, {
|
|
@@ -14829,6 +14842,11 @@ var benchmarkActions = defineCustomActions({
|
|
|
14829
14842
|
* addon, then forwards N FrameInputs to the target node in a single
|
|
14830
14843
|
* `pipelineExecutor.runPipelineBatch` cap call. Returns N
|
|
14831
14844
|
* `FrameResult`s plus aggregate timing.
|
|
14845
|
+
*
|
|
14846
|
+
* NO UI CALLER — and it is NOT dead. `scripts/bench-pool-ceiling.mts` and
|
|
14847
|
+
* `scripts/bench-pipeline-investigation.mts` drive it directly. Do not
|
|
14848
|
+
* delete it on the strength of an in-package grep; those scripts break
|
|
14849
|
+
* silently and nothing in CI runs them.
|
|
14832
14850
|
*/
|
|
14833
14851
|
runPipelineBatchTest: customAction(PipelineRunBatchInputSchema, PipelineRunBatchResultSchema, {
|
|
14834
14852
|
kind: "mutation"
|
|
@@ -14839,6 +14857,9 @@ var benchmarkActions = defineCustomActions({
|
|
|
14839
14857
|
* issuing a configurable mix of batched + single cap calls). Returns
|
|
14840
14858
|
* only aggregate detection-rate stats. Used to measure the pool's
|
|
14841
14859
|
* true throughput ceiling without per-call tRPC overhead.
|
|
14860
|
+
*
|
|
14861
|
+
* NO UI CALLER — and it is NOT dead. `scripts/bench-pool-inprocess.mts`
|
|
14862
|
+
* drives it directly. Same warning as `runPipelineBatchTest` above.
|
|
14842
14863
|
*/
|
|
14843
14864
|
runMultiCameraStressTest: customAction(
|
|
14844
14865
|
MultiCameraStressInputSchema,
|
|
@@ -14864,8 +14885,16 @@ var benchmarkActions = defineCustomActions({
|
|
|
14864
14885
|
external_exports.object({ aborted: external_exports.boolean() }),
|
|
14865
14886
|
{ kind: "mutation" }
|
|
14866
14887
|
),
|
|
14867
|
-
|
|
14868
|
-
|
|
14888
|
+
/**
|
|
14889
|
+
* History (shared across pipeline + decoder-perf entries).
|
|
14890
|
+
*
|
|
14891
|
+
* `z.object({})`, never `z.void()`: the `addons.custom` envelope insists
|
|
14892
|
+
* on an `input` object, and a `z.void()` schema REJECTS `{}` — so the
|
|
14893
|
+
* action resolved and could never actually be called, not from a settings
|
|
14894
|
+
* button and not from `hub.mjs`. The tabs only got away with it by
|
|
14895
|
+
* sending `input: undefined`.
|
|
14896
|
+
*/
|
|
14897
|
+
listBenchmarkHistory: customAction(external_exports.object({}), external_exports.array(HistoryEntrySchema).readonly()),
|
|
14869
14898
|
saveBenchmarkResult: customAction(
|
|
14870
14899
|
PipelineBenchmarkHistoryEntryInputSchema,
|
|
14871
14900
|
PipelineBenchmarkHistoryEntrySchema,
|
|
@@ -14881,11 +14910,12 @@ var benchmarkActions = defineCustomActions({
|
|
|
14881
14910
|
external_exports.object({ success: external_exports.literal(true) }),
|
|
14882
14911
|
{ kind: "mutation" }
|
|
14883
14912
|
),
|
|
14884
|
-
clearBenchmarkHistory: customAction(external_exports.
|
|
14913
|
+
clearBenchmarkHistory: customAction(external_exports.object({}), external_exports.object({ success: external_exports.literal(true) }), {
|
|
14885
14914
|
kind: "mutation"
|
|
14886
14915
|
}),
|
|
14887
|
-
// Decoder perf — fixture discovery + run control
|
|
14888
|
-
|
|
14916
|
+
// Decoder perf — fixture discovery + run control.
|
|
14917
|
+
// `z.object({})` for the same reason as `listBenchmarkHistory` above.
|
|
14918
|
+
listDecoderFixtures: customAction(external_exports.object({}), external_exports.array(DecoderFixtureSchema).readonly()),
|
|
14889
14919
|
runDecoderPerformanceTest: customAction(DecoderPerfInputSchema, DecoderPerfResultSchema, {
|
|
14890
14920
|
kind: "mutation"
|
|
14891
14921
|
}),
|
|
@@ -15433,9 +15463,12 @@ var BenchmarkAddon = class extends BaseAddon {
|
|
|
15433
15463
|
}
|
|
15434
15464
|
async runPipelineTest(input) {
|
|
15435
15465
|
const { nodeId, steps, imageBase64, referenceImage, frameId, sessionId, engine } = input;
|
|
15466
|
+
const { deviceKey, plane } = input;
|
|
15436
15467
|
this.ctx.logger.debug("runPipelineTest payload", {
|
|
15437
15468
|
meta: {
|
|
15438
15469
|
nodeId: nodeId ?? null,
|
|
15470
|
+
deviceKey: deviceKey ?? null,
|
|
15471
|
+
plane: plane ?? null,
|
|
15439
15472
|
sessionId: sessionId ?? null,
|
|
15440
15473
|
engine: engine ?? null,
|
|
15441
15474
|
stepsCount: steps.length,
|
|
@@ -15469,7 +15502,12 @@ var BenchmarkAddon = class extends BaseAddon {
|
|
|
15469
15502
|
...!image && imageBase64 ? { imageBase64 } : {},
|
|
15470
15503
|
referenceImage,
|
|
15471
15504
|
sessionId,
|
|
15472
|
-
...engine ? { engine } : {}
|
|
15505
|
+
...engine ? { engine } : {},
|
|
15506
|
+
// Absent, never present-and-undefined: the generated router takes
|
|
15507
|
+
// `.loose()` input and an explicit `undefined` is not the same thing
|
|
15508
|
+
// as "the node's default pool" / "the cap's default plane".
|
|
15509
|
+
...deviceKey ? { deviceKey } : {},
|
|
15510
|
+
...plane ? { plane } : {}
|
|
15473
15511
|
}),
|
|
15474
15512
|
BENCH_RUN_TIMEOUT_MS,
|
|
15475
15513
|
"runPipelineTest"
|