diff --git a/Cargo.toml b/Cargo.toml index aa4449921..1c88fbe34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ ic-cdk-bindgen = { path = "ic-cdk-bindgen", version = "0.2.0" } ic-cdk-timers = { path = "ic-cdk-timers", version = "1.0.0" } ic-cdk-executor = { path = "ic-cdk-executor", version = "2.0.0" } ic-cdk-management-canister = { path = "ic-cdk-management-canister", version = "0.1.0" } -ic-management-canister-types = { path = "ic-management-canister-types", version = "0.7.0" } +ic-management-canister-types = { path = "ic-management-canister-types", version = "0.7.1" } candid = "0.10.18" # sync with the doc comment in ic-cdk/README.md candid_parser = "0.2.1" diff --git a/e2e-tests/src/bin/management_canister.rs b/e2e-tests/src/bin/management_canister.rs index 29e6dc3c3..8ef6be4a7 100644 --- a/e2e-tests/src/bin/management_canister.rs +++ b/e2e-tests/src/bin/management_canister.rs @@ -48,6 +48,22 @@ async fn basic() { assert_eq!(definite_canister_setting.log_memory_limit, 0u8); assert_eq!(definite_canister_setting.wasm_memory_limit, 0u8); assert_eq!(definite_canister_setting.wasm_memory_threshold, 0u8); + // memory_metrics + let mm = &result.memory_metrics; + assert_eq!(mm.wasm_memory_size, 0u8); + assert_eq!(mm.stable_memory_size, 0u8); + assert_eq!(mm.global_memory_size, 0u8); + assert_eq!(mm.wasm_binary_size, 0u8); + assert_eq!(mm.custom_sections_size, 0u8); + assert!(mm.canister_history_size > 0u8); + assert_eq!(mm.wasm_chunk_store_size, 0u8); + assert_eq!(mm.snapshots_size, 0u8); + assert_eq!(mm.log_memory_store_size, 0u8); + // query_stats + assert_eq!(result.query_stats.num_calls_total, 0u8); + assert_eq!(result.query_stats.num_instructions_total, 0u8); + assert_eq!(result.query_stats.request_payload_bytes_total, 0u8); + assert_eq!(result.query_stats.response_payload_bytes_total, 0u8); // update_settings let arg = UpdateSettingsArgs { diff --git a/ic-management-canister-types/CHANGELOG.md b/ic-management-canister-types/CHANGELOG.md index 21465b749..4d18200f7 100644 --- a/ic-management-canister-types/CHANGELOG.md +++ b/ic-management-canister-types/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] -## [0.7.0] - 2026-03-02 +## [0.7.1] - 2026-03-03 + +This release supersedes 0.7.0, which has been yanked because it was missing the `log_memory_store_size` field in `MemoryMetrics`. ### Changed @@ -15,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `filter` field to `FetchCanisterLogsArgs`. - `FetchCanisterLogsArgs` is now a struct instead of a type alias for `CanisterIdRecord`. - Added the type `CanisterLogFilter`. +- Added `log_memory_store_size` field to `MemoryMetrics`. + +## [0.7.0] - 2026-03-02 [YANKED] ## [0.6.0] - 2026-01-09 diff --git a/ic-management-canister-types/Cargo.toml b/ic-management-canister-types/Cargo.toml index e846bac51..e1f1e74a7 100644 --- a/ic-management-canister-types/Cargo.toml +++ b/ic-management-canister-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-management-canister-types" -version = "0.7.0" +version = "0.7.1" authors.workspace = true edition.workspace = true repository.workspace = true diff --git a/ic-management-canister-types/src/lib.rs b/ic-management-canister-types/src/lib.rs index ed9d32d6d..ece346ca1 100644 --- a/ic-management-canister-types/src/lib.rs +++ b/ic-management-canister-types/src/lib.rs @@ -477,6 +477,8 @@ pub struct MemoryMetrics { pub wasm_chunk_store_size: Nat, /// Represents the memory consumed by all snapshots that belong to this canister. pub snapshots_size: Nat, + /// Represents the memory used by the canister's log store. + pub log_memory_store_size: Nat, } /// # Query Stats diff --git a/ic-management-canister-types/tests/ic.did b/ic-management-canister-types/tests/ic.did index 16d4e5793..68330e983 100644 --- a/ic-management-canister-types/tests/ic.did +++ b/ic-management-canister-types/tests/ic.did @@ -294,6 +294,7 @@ type canister_status_result = record { canister_history_size : nat; wasm_chunk_store_size : nat; snapshots_size : nat; + log_memory_store_size : nat; }; cycles : nat; reserved_cycles : nat;