Whole generated-wrapper instructions

The PocketIC16 client has no per-update instruction-total endpoint. This probe therefore appends a small Wasm wrapper to the actual existing measure and benchmark_warmup exports of the canonical four-way artifacts. The wrapper calls the original function unchanged, waits for its return, and reads performance_counter(0). It records the result in six mutable globals, with no linear-memory writes during the observation. Original functions, imports, data, memory, tables and metadata remain unchanged.

The counter includes ordinary decoding, application work, response encoding, reply and executor cleanup. It also includes the small observer/wrapper cost; the IC can precharge the tail of a metering block. Call it the metered generated wrapper prefix through return, not an exact uninstrumented total. Do not subtract noop or derive instruction counts from cycles. This measures the normal Request-vector endpoint, not a different scalar Candid endpoint.

Use the existing five controls, three sizes and three trials. All populations commit in earlier updates. Snapshot the observer globals before the required noop, run an isolated operation or all 32 updates, then query globals once after the entire interval. No query or extra update intervenes between those 32 calls. Separate measure/noop accumulators make each delta exact. Validate count deltas, all results and discarded temporary memory growth in the observer query. Original endpoint body/hot counters are retained and compared against the prior uninstrumented run to detect changed work.

Raw and upgrade suites are intentionally skipped: this campaign answers the instruction-budget question for normal calls. These diagnostic exports are outside the original production Candid metadata. No SDK implementation changes.

To repeat against a qualified archive containing the canonical Wasms:

FOUR_WAY_ORIGINALS=/absolute/path/to/four-way/archive \
  bash bench/four-way/instructions.sh

Use a short in-repository TMPDIR in a deeply nested worktree. The command verifies exact original compiled inputs, hashes original and instrumented Wasms, and freezes current runner/instrumenter source around the run.