Skip to content

feat: subnet_metrics management canister method and million_round_instructions_total - #399

Closed
mraszyk wants to merge 1 commit into
mainfrom
docs/subnet-metrics-round-instructions
Closed

mraszyk wants to merge 1 commit into
mainfrom
docs/subnet-metrics-round-instructions

Conversation

@mraszyk

@mraszyk mraszyk commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents dfinity/ic#11587, which adds the million_round_instructions_total field to the subnet_metrics management canister endpoint.

The endpoint itself was added by dfinity/ic#11032 (merged 2026-09-02) and had never been documented here, so there was nothing for the new field to attach to. This PR therefore covers both: the method and all six of its result fields.

Interface specification

  • New subnet_metrics method section in management-canister.md: canisters-only, EXPERIMENTAL, routed by the subnet_id in the argument so a canister can read another subnet's metrics, and free (no cycles, and serving it does not contribute to million_round_instructions_total).
  • Per-field semantics and staleness: only block_height is current; the aggregates are as of the end of the previous round, and canister_state_bytes is only recomputed every 10 rounds.
  • Which fields can be verified against a certificate: the four aggregates are the same values read_state serves under /subnet/<subnet_id>/metrics, while block_height and million_round_instructions_total have no path there.
  • million_round_instructions_total is described as what it is: instructions in units of one million, rounded up, covering the scheduler's per-execution and per-canister overheads and non-Wasm charges (compilation, chunk assembly, snapshots), so not a Wasm instruction meter. Its counter starts when a subnet's replica begins tracking it, not at subnet creation.
  • New transition rule in abstract-behavior.md, matching the shape of the node metrics rule (metrics values are implementation-specific).
  • Pointer from the state tree's /subnet/<subnet_id>/metrics path in index.md to the method.
  • public/references/ic.did: subnet_metrics_args, subnet_metrics_result, and the service method.
  • Changelog entry 0.69.0.

Reference

  • docs/references/management-canister.md: the method under "Subnet and node information", beside node_metrics_history and subnet_info.

Verification

  • didc check public/references/ic.did passes.
  • npm run build was not run: npm is unavailable in the environment this was written in. The validator's em-dash, forbidden-pattern, and internal link/anchor checks were run by hand over the five changed pages and are clean. CI is the gate.

🤖 Generated with Claude Code

…tructions_total

Documents dfinity/ic#11587, which adds the `million_round_instructions_total`
field to the `subnet_metrics` management canister endpoint, plus dfinity/ic#11032,
which added the endpoint itself and had not yet been documented here.

- `public/references/ic.did`: `subnet_metrics_args`, `subnet_metrics_result`
  with all six fields, and the service method.
- Interface spec: new `subnet_metrics` method section (fields, per-field
  staleness, which fields have a `/subnet/<subnet_id>/metrics` counterpart,
  and that the call is free), a transition rule in the abstract behavior, a
  pointer from the state tree's subnet metrics path, and changelog 0.69.0.
- `docs/references/management-canister.md`: the method in the reference table
  of subnet and node information methods.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mraszyk
mraszyk requested review from a team as code owners September 17, 2026 09:53
@github-actions github-actions Bot added the interface-spec Changes to the IC interface specification label Sep 17, 2026
@mraszyk

mraszyk commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: this duplicated the outstanding #333, which already specifies the subnet_metrics endpoint. The million_round_instructions_total field from dfinity/ic#11587 has been folded into #333 instead.

@mraszyk mraszyk closed this Sep 17, 2026
@mraszyk
mraszyk deleted the docs/subnet-metrics-round-instructions branch September 17, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interface-spec Changes to the IC interface specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant