Skip to content

feat: Add detailed memory usage metrics to CanisterStatusResultV2 #4106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dsarlis
Copy link
Member

@dsarlis dsarlis commented Feb 25, 2025

  • Introduced new memory metrics fields in CanisterStatusResultV2, including:

    • wasm_memory_size
    • stable_memory_size
    • global_memory_size
    • wasm_binary_size
    • custom_sections_size
    • canister_history_size
    • wasm_chunk_store_size
    • snapshots_size
  • Updated CanisterManager and CanisterState to compute and track these new metrics.

  • Refactored ExecutionState to provide individual methods for retrieving specific memory usage values.

  • Modified tests to validate the new memory metrics in canister status responses.

This change improves visibility into canister memory consumption, aiding debugging and resource management.

Refer to PR portal#5240 for more details.

Acknowledgements

This change was championed and implemented by @q-uint and @ByronBecker.

- Introduced new memory metrics fields in `CanisterStatusResultV2`, including:
  - `wasm_memory_size`
  - `stable_memory_size`
  - `global_memory_size`
  - `wasm_binary_size`
  - `custom_sections_size`
  - `canister_history_size`
  - `wasm_chunk_store_size`
  - `snapshots_size`
 
- Updated `CanisterManager` and `CanisterState` to compute and track these new metrics.
- Refactored `ExecutionState` to provide individual methods for retrieving specific memory usage values.
- Modified tests to validate the new memory metrics in canister status responses.

This change improves visibility into canister memory consumption, aiding debugging and resource management.

Refer to [PR portal#5240](dfinity/portal#5240) for more details.
@dsarlis dsarlis requested review from a team as code owners February 25, 2025 10:47
@dsarlis dsarlis closed this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants