README
¶
Whole-app profile
The real production frontend, kubernetes plugin included, profiled in Playwright Chromium
with the Wails backend faked inside the page. Where bench/render measures single screens
mounted in isolation, this measures the app as a user drives it: startup, plugin loading,
routing, and the screens running inside the full shell.
pnpm bench:app # build, then 5 runs of every scenario (~3 min)
pnpm bench:app --runs 3 --only pods # some scenarios
pnpm bench:app --no-build # reuse bench/app/dist and the plugin bundle
pnpm bench:app --headed # watch it
node bench/app/report.mjs # Markdown summary of results/latest.json again
Also task perf:app -- <args>. First run locally: pnpm install --frozen-lockfile,
task packages (providers → runtime → Vite plugin) and
pnpm exec playwright install chromium. The plugin must use the current base-ui/
editors shared-dependency cohort; the historical bundled submodule is not a
compatible source for this host.
Reproducible source cohort
CI requires OMNIVIEW_APP_PROFILE_UI_REF and
OMNIVIEW_APP_PROFILE_KUBERNETES_REF repository variables containing independently
reviewed, public full commits. It checks those sources out explicitly, rather
than changing the bundled submodule or waiting for an unpublished host npm release.
The host input is the exact checked-out PR commit.
The source builder reuses canonical workspace Init/Create/Link, native pnpm
12.14.0, the actual protocol-probe report, and the existing JavaScript build graph
and output-ownership producers in a disposable collection with its own private
home. Its manager uses the same session-aware RequireStopped guard as the real
workspace CLI; a private home is not a substitute for proving the workspace is
stopped before linking or retirement. Only the real Kubernetes UI dependency
closure is built: base-ui, ai-ui,
editors, providers, runtime, Vite plugin, then Kubernetes. The host's committed
Wails bindings are compiler inputs, just as for task packages; no native host,
plugin backend, SDK attestation or app service is substituted or launched.
Source manifests keep their declared versions. Canonical workspace:* overrides
select the reviewed sources, including an explicitly unpublished next-release
source cohort; no version is stamped by this helper and no future registry
package is fetched as a fallback. Managed local edges in standalone lockfiles
are seed inputs: their versions become actual source links in the generated
aggregate lock. A source runtime/Vite plugin 0.5.0 and Kubernetes ^0.5.0 can
therefore be profiled before npm publication, without rewriting the standalone
Kubernetes lock to claim a release exists. Refresh that consumer lock only after
the real npm release, before merging/tagging the production plugin. Registry
edges retain their lock evidence. Install scripts remain disabled and strict
peers are audited recursively.
Source install policies must agree explicitly. In particular, the reviewed host
and Kubernetes sources must both declare allowBuilds.esbuild: true, with
Kubernetes retaining unrs-resolver: false. The managed install still uses
--ignore-scripts; the builder does not rewrite policies, approve all scripts,
or relax peers. Kubernetes commit
5df15b06b80790c3a8e9255d300f40795fde9bef has the modern UI and output contracts,
but its explicit esbuild: false conflicts with the host and must not be used
unchanged for this composition. Published runtime 0.4.2 is not an alternative:
its base-ui peer range is ^0.2.1, not the host source runtime's ~0.4.3.
With installed/built host packages and the reviewed sources checked out:
A11_PROTOCOL_PROBE=1 A11_PROTOCOL_REPORT=/absolute/path/link-protocol.json \
GOWORK=off GOFLAGS= go test -tags server ./internal/devworkspace \
-run '^TestLinkPinnedProtocolProbe$' -count=1
GOWORK=off GOFLAGS= go run -tags server ./bench/app/build-plugin \
--host \"$PWD\" --host-ref \"$(git rev-parse HEAD)\" \
--ui /absolute/path/ui --ui-ref \"$REVIEWED_UI_COMMIT\" \
--kubernetes /absolute/path/kubernetes --kubernetes-ref \"$REVIEWED_KUBERNETES_COMMIT\" \
--link-evidence /absolute/path/link-protocol.json -- --runs 3
The builder uses committed source refs, not uncommitted checkout edits. It keeps
the private collection alive while the original host runs pnpm bench:app,
passing the actual Kubernetes dist/assets and matching plugin.json through
OV_K8S_PLUGIN_DIST and OV_K8S_PLUGIN_METADATA. On exit it unlinks, restores
owned outputs, and retires its worktrees and branches. Ownership conflicts retain
the collection and report its path instead of deleting uncertain files.
How it works
- Build.
vite.config.tshere builds the app likevite.config.tsat the root, plus:react-dom/clientresolves toreact-dom/profilingso<Profiler>works in production React, andui/main.tsxis rewritten at build time to importpage/fake-backend.tsfirst and wrap the root inpage/profiler.tsx. The app's source is not changed. - Fake backend.
page/fake-backend.tsinstalls thebench/rendertransport and fixtures (bindings → handlers by name,emitfor backend events), and adds what the full shell asks for at startup: the installed plugin list, a connection, watch state, log sessions. The page reads its setup fromwindow.__OV_BENCH__({ plugins, pods }), set by the runner before navigation, and exposes controls onwindow.__ovBench. Calls are answered in-page, so there is no IPC cost in the numbers. - Plugin. The real Kubernetes UI
dist/assetsdirectory is served at/_/plugins/kubernetes/assets/byvite preview, where the app's SystemJS loader fetches it, exactly as from~/.omniview/pluginsin the native app.OV_K8S_PLUGIN_DIST=<assets-dir>selects an explicitly built external bundle;OV_K8S_PLUGIN_METADATA=<plugin.json>selects its matching source metadata. Empty overrides and missing, empty or non-fileentry.jsentries fail before profiling. Without an override, the runner builds the bundled UI if missing; that checkout must independently satisfy the host's current consumer contract. - Startup marker. The app reports "interactive" through
ReportStartupReady, the same markertask perf:coldstartreads from the native app (first painted frame after the router's first render).
Scenarios
| Scenario | Steps |
|---|---|
cold-start |
Fresh browser context, no plugins installed, until the startup marker. |
cold-start-k8s |
As above with the kubernetes plugin; also until the plugin's home card shows. |
pods |
open: from the home page, navigate to the Pod list of a 5,000-pod cluster until a row shows. scroll: 30 one-viewport steps down, then back to top, each waiting for a painted frame. |
logs |
open: Pod row menu → Logs, until the viewer shows. stream: 10,000 lines in batches of 100, one batch per task, until the line counter reaches 10,000. scroll: 30 pages of the log viewer. drawer: minimize/expand the bottom drawer 10 times. |
Every scenario runs once as a discarded warmup, then --runs times, each in a new browser
context.
Metrics
| Column | Meaning |
|---|---|
| interactive | Startup marker, ms from navigation start. |
| wall | Time the step took, measured in the page. Scroll and toggle steps wait for a painted frame each, so wall / step cannot go below ~33 ms (two frames). |
| busy / step | Main-thread time per scroll page or toggle: the work behind each step without the frame-wait floor. Compare this one across commits. |
| main thread busy, script, layout + style | CDP Performance.getMetrics deltas (TaskDuration, ScriptDuration, LayoutDuration + RecalcStyleDuration). |
| TBT, long tasks | Total blocking time (time beyond 50 ms in each long task) and the number of long tasks. |
| React render, commits, slowest commit | <Profiler> around the app root: summed actualDuration, number of commits, the largest one. Plugin screens render in the same root and are included. |
| heap MB | JSHeapUsedSize at the end of the step. |
JSON (results/latest.json) has every run's raw values, plus page errors and backend calls
without a fixture. Compare runs on the same machine only.
Real resource boundary (verification-only)
real-resource.mjs is separate from run.mjs/perf:app. It attaches to an
authenticated CLI-managed development browser host, never a Vite asset URL
or fake backend. The workspace must explicitly select the safe
workspace-probe source, the host, UI, SDK and Kubernetes repositories. The
Kubernetes workload is a credential-free Pod fixture in the probe, not a
cluster or a released Kubernetes/cloud/container/hypervisor provider.
The canonical fixture is e2e/fixtures/workspace-probe; its explicit source
producer is e2e/scripts/prepare-workspace-probe.mjs. An existing managed probe
must receive the same fixture files byte-for-byte in its own feature worktree;
do not overwrite its registered source repository or change registry mappings.
The runner checks canonical/managed source equality. Preserve the existing
settings/click smoke behavior.
Corpus and launch
The committed pkg/resource-corpus.json snapshot is generated from SDK
da0c53be2da636d3833b7ca1e73f8a6c8d26b5c7 by:
node bench/app/export-resource-corpus.mjs \
--sdk-source /absolute/selected/plugin-sdk \
--out e2e/fixtures/workspace-probe/pkg/resource-corpus.json
Run under the approved clean environment with GOWORK=off. The exporter
requires that exact SDK HEAD and committed corpus source bytes, records source
and corpus SHA-256, imports SDK-internal data from an exclusively created
temporary SDK command, and removes that command in finally. JSON is embedded
directly from Go: do not parse/re-encode canonical native numbers in JavaScript.
No public SDK API or additional package is published.
Named canonical finite scenarios are cloud-bundled-pages,
container-bundled-events, hypervisor-bundled-vms and
kubernetes-snapshot. A second acquisition requests bounded
p02:copies:1000:0 fixture stress pages of at most 200 unchanged payload
copies. Copy ordinal is only diagnostic table identity, not a fabricated
native resource ID. Cloud and hypervisor retain their canonical page cursors
for the native finite run; hypervisor is snapshot-only. Container release is a
one-shot fixture List cursor after a ready source watch. It is coordination,
not a source continuity/ACK/replay guarantee.
Use canonical workspace up/inspect/down in a private HOME without real
credentials, kubeconfig, cloud inventory or copied production plugin state.
Before up, explicitly set OMNIVIEW_P02_METRICS_SOCKET to an absent socket
inside an already owned canonical 0700 directory. The absolute socket path
must be at most 103 bytes (Darwin limit). Pass the same variable to the managed
CLI launch environment; ordinary startup is unchanged when absent. Only a
devcontrol build starts this sampler after verified development identity and
control publication. A requested invalid sampler fails startup. Plugin child
environments exclude the socket control. No TCP endpoint or public binding is
added. On shutdown the lifecycle closes the sampler and removes only its own
socket inode; the caller owns the private parent directory.
After the controlled generation/build/install barrier, take the actual generation from authenticated inspection and run:
node bench/app/real-resource.mjs \
--dev /absolute/immutable/omniview-dev \
--workspace /absolute/managed/feature \
--workspace-id UUID --generation ACTUAL_GENERATION \
--host-metrics-socket /private/short-owned-directory/metrics.sock \
--runs 3 --copies 1000 --out /absolute/new-result.json
Use the same clean launcher for all commands. The runner rejects a changed
UUID/generation/state/source, uses only instance.endpoints.browser, verifies
the document boot identity, and records selected source commits, dirty tracked
diff hashes, exact fixture hashes, tools/hardware/viewport and browser version.
Results are written exclusively (wx), including partial failure evidence.
The runner closes Chromium and explicitly stops its fixture source
watches/connections/cache; the owner must then workspace down and inspect
the stopped generation, verify socket removal and retire the empty private
sampler directory. It never terminates another owner's workspace/process.
Metric meanings and limitations
- Real finite page roundtrips, rows, decoded payload bytes and visible table bodies are separate from sparse-event work. Current SDK/JS numeric losses, clamped unknown totals and absent coverage/freshness transport are not repaired with out-of-band raw-body strings.
- CDP records actual Wails HTTP encoded response transfer bytes, serialized request-body bytes and WebSocket payload bytes by request/frame. These exclude socket/TLS/WS framing and are not gRPC protobuf-wire byte counts. Native body byte counters and re-serialized decoded JSON bytes are separately labeled.
- Browser main-thread task/script/layout/style work, long tasks and heap are Chromium measurements. Visible expected table content plus two animation frames is a rendering-opportunity bound, not compositor/native pixel proof.
- The private sampler reports actual host Go heap allocation/in-use/object
totals, allocations/frees, GC and goroutines with host identity. Explicit
GC-then-snapshot happens only outside timed action phases. Ordinary snapshots
include
samplingNanos; account for instrumentation overhead. Explicit retention snapshots also take a bounded (4096 goroutines, one attempt, 64 expanded frames per stack) runtime goroutine profile. Exact matched host watch-event/connection-event listener function counts are background-listener observations, not open gRPC streams. Concurrent growth, depth truncation and unmatched/renamed functions remain explicit unavailable or lower-bound observations, never invented zero stream counts. Provider heap and source gauges are labeled provider-only.pssupplies actual host cumulative CPU/RSS; RSS is not retained heap. - Typing, scrolling, grouping/detail expansion and repeated mounts exercise a diagnostic existing base-ui DataTable, not a new product resource view. Its immediate local text filtering is not the default Resources 500 ms debounce, host CEL execution or a global-inventory query. Stress copies exercise payload/render cost only. Inactive React Query cache retention is sampled before explicit owned-cache removal.
- The container diagnostic deliberately supplies the existing hook's
idAccessor; default Resources still omits it and remains unsubscribed. Native engine-local ID collisions and legacy first-match cache behavior remain limitations. No old listener fix, atomic List/watch cutover or scope identity claim is made. - Source watches, source rows copied, frontend subscription calls, host
forwarding refcounts, persistent gRPC listener streams and future query
leases are different quantities. Only available counters/observations are
reported; unavailable query semantics/counts are not measured zero.
Current
IsResourceWatchRunninghas no SDK gRPC RPC despite its generated host binding. Cleanup instead invokes the supportedStopResourceWatch, waits on the actual provider's source-watch gauge over the real List path, then stops connections. It does not suppress the unavailable inspection surface or infer source cleanup from frontend unmount. Table-onlywindow.__p02.unmount()intentionally retains sources and inactive queries for retention sampling. Toggling off the entire diagnostic or leaving its route instead drains pending connection/watch starts, stops every owned source and clears only its diagnostic caches. This root cleanup uses its own effect-local control, not the deleted global. Cleanup failures are reported and do not skip remaining connections or cache removal. The fixture also emits numericp02Lifecyclestderr observations under its source mutex at client destruction and watch termination. Correlate new log records to the authenticated owned plugin process/generation and root-stop boundary to observe final connections/watch counts after the last client is destroyed; a new List call cannot inspect a stopped client. These fixture-only observations contain no resource IDs/bodies and do not add a public API. - A clean HOME is not network isolation. The fixture has no external source client, but startup marketplace/telemetry behavior needs separate egress policy/evidence before claiming a network-free host.
Keep pnpm bench:app, bench/render, and UI packages/benchmarks results in
separate artifacts labeled fake-backend/isolated renderer, with their own
source/environment provenance. Never combine their timings with this real IPC
path or claim Chromium results measure native WebView performance. No budget
or production-provider acceptance is implied by either harness.
Preserved baseline receipt (2026-10-24)
resource-baseline-2026-10-24.json
is a portable allowlisted projection of the preserved accepted run, not a new
measurement. It contains all 111 timed action observations, 24 retention
observations, 18 native page observations, host/provider counters, per-action
network indices and numerical network observations, source/fixture hashes,
environment pins and the separately labeled unchanged JSDOM renderer result.
Original raw-result SHA-256 is
0fd77e9bf167964aa95ed4ff5c9ecf737d1f3e4fbfb8e39389fa286377ce7992;
renderer SHA-256 is
853d6c41d263f395cac555ff2094a028f595184e919a564ff4f1aa1edb3a7ea1.
Private paths, process identities/PIDs, network addresses, screenshots and
visible body text are excluded; original private raw artifacts remain intact.
Native finite page arithmetic medians are cloud 1.350 ms, container 2.100 ms, hypervisor 1.300 ms and Kubernetes 2.200 ms. Cloud and hypervisor each have six pages: average their two central sorted observations, rather than taking the upper-middle sample. These correct earlier prose summaries; no baseline was rerun. Stress-copy pages are not included in those populations. The receipt preserves full-precision page timestamps and roundtrip summaries.
The later root-component cleanup correction is not measured by this historical run. Its source validation is a separate coordinator-controlled barrier; do not relabel historical timings as corrected-source performance. The lifecycle unit test uses provider/runtime/table boundary doubles only and does not replace an actual managed host/provider smoke. From the host root, under the approved clean launcher and only after that barrier:
node node_modules/vitest/vitest.mjs run \
--config bench/app/resource-benchmark.vitest.config.ts --configLoader runner
node --test bench/app/resource-measurements.test.mjs
Use the supported runner config loader above, not the default bundled loader:
bundling creates node_modules/.vite-temp outside the managed producer ledger.
The dedicated config disables Vitest's result cache so this unit command also
does not create unowned node_modules/.vite/vitest output. Never run standalone
pnpm run or pnpm exec in a managed feature: pnpm12 may auto-install its
standalone graph. Use these installed Node entrypoints under the clean launcher.
resource-cleanup-2026-10-24.json
separately records the later current-host/SDK functional root-cleanup proof:
whole-root unmount observes actual provider 0/0 plus cache/DOM zero,
table-only unmount retains its intended source/inactive cache, and immediate
root remount leaves the new source active. Its fixture stderr observations are
correlated within the authenticated provider process lifetime, followed by
canonical down/unlink and sampler retirement. This is not a new latency run and
does not change or relabel the preserved historical baseline above.
Directories
¶
| Path | Synopsis |
|---|---|
|
Build the real Kubernetes UI in a disposable canonical source composition, profile the caller's installed host frontend against it, then retire it.
|
Build the real Kubernetes UI in a disposable canonical source composition, profile the caller's installed host frontend against it, then retire it. |