feat: Export million_round_instructions_total in subnet_metrics - #11587
Merged
Merged
Conversation
This commit adds an addition field returned with the subnet_metrics management canister endpoint. It tracks the existing prometheus metric execution_round_instructions, except that it does not get reset on replica start. One user of the existing metric and the new value are the public dashboards, with the off-chain dashboard currently relying on the prometheus metric. The new value starts at 0 with the introduction of this commit. Like the metric, the new field counts the executed wasm instructions, plus instruction overheads the scheduler uses (e.g. there is a base overhead per message). While the instructions are tracked exactly internally, they are only exported in millions of instructions. As a drive-by, this commit also fixes an issue where the metric/new total was not correctly tracked in the edge case of heap delta rate limiting kicking in.
Contributor
Author
|
Intended follow-up once this is rolled out: #11586 |
|
✅ No security or compliance issues detected. Reviewed everything up to c6df79f. Security Overview
Detected Code Changes
|
mraszyk
reviewed
Sep 16, 2026
mraszyk
reviewed
Sep 16, 2026
mraszyk
reviewed
Sep 16, 2026
mraszyk
reviewed
Sep 16, 2026
mraszyk
approved these changes
Sep 16, 2026
mraszyk
reviewed
Sep 16, 2026
mraszyk
added a commit
to dfinity/developer-docs
that referenced
this pull request
Sep 17, 2026
Documents dfinity/ic#11587, which adds a sixth field to the endpoint this branch specifies. It reports the total instructions the subnet accounted for across the execution phases of all rounds, in units of one million and rounded up, and unlike the four aggregates it has no path under `/subnet/<subnet_id>/metrics` in the certified state tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds an addition field returned with the subnet_metrics management canister endpoint. It tracks the existing prometheus metric execution_round_instructions, except that it does not get reset on replica start.
One user of the existing metric and the new value are the public dashboards, with the off-chain dashboard currently relying on the prometheus metric.
The new value starts at 0 with the introduction of this commit. Like the metric, the new field counts the executed wasm instructions, plus instruction overheads the scheduler uses (e.g. there is a base overhead per message).
While the instructions are tracked exactly internally, they are only exported in millions of instructions.
As a drive-by, this commit also fixes an issue where the metric/new total was not correctly tracked in the edge case of heap delta rate limiting kicking in.