diff --git a/rs/bitcoin/ckbtc/kyt/src/main.rs b/rs/bitcoin/ckbtc/kyt/src/main.rs index 2ac32803d85..617608cd4d2 100644 --- a/rs/bitcoin/ckbtc/kyt/src/main.rs +++ b/rs/bitcoin/ckbtc/kyt/src/main.rs @@ -613,7 +613,7 @@ fn http_request(req: http::HttpRequest) -> http::HttpResponse { writer .encode_gauge( "stable_memory_bytes", - ic_cdk::api::stable::stable_size() as f64 * 65536.0, + ic_cdk::api::stable::stable64_size() as f64 * 65536.0, "Size of the stable memory allocated by this canister.", ) .unwrap(); diff --git a/rs/bitcoin/ckbtc/minter/src/metrics.rs b/rs/bitcoin/ckbtc/minter/src/metrics.rs index d5bfdc5ac16..cc2306d0c95 100644 --- a/rs/bitcoin/ckbtc/minter/src/metrics.rs +++ b/rs/bitcoin/ckbtc/minter/src/metrics.rs @@ -13,7 +13,7 @@ pub fn encode_metrics( metrics.encode_gauge( "ckbtc_minter_stable_memory_bytes", - ic_cdk::api::stable::stable_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, + ic_cdk::api::stable::stable64_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, "Size of the stable memory allocated by this canister.", )?; diff --git a/rs/ethereum/cketh/minter/src/main.rs b/rs/ethereum/cketh/minter/src/main.rs index 1e68ae2eb65..f3a79d80b55 100644 --- a/rs/ethereum/cketh/minter/src/main.rs +++ b/rs/ethereum/cketh/minter/src/main.rs @@ -813,7 +813,7 @@ fn http_request(req: HttpRequest) -> HttpResponse { read_state(|s| { w.encode_gauge( "cketh_minter_stable_memory_bytes", - ic_cdk::api::stable::stable_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, + ic_cdk::api::stable::stable64_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, "Size of the stable memory allocated by this canister.", )?; diff --git a/rs/ethereum/ledger-suite-orchestrator/src/main.rs b/rs/ethereum/ledger-suite-orchestrator/src/main.rs index 3ce98803706..7f4076f8032 100644 --- a/rs/ethereum/ledger-suite-orchestrator/src/main.rs +++ b/rs/ethereum/ledger-suite-orchestrator/src/main.rs @@ -174,7 +174,7 @@ fn http_request( w.encode_gauge( "ledger_suite_orchestrator_stable_memory_bytes", - ic_cdk::api::stable::stable_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, + ic_cdk::api::stable::stable64_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, "Size of the stable memory allocated by this canister.", )?; diff --git a/rs/rosetta-api/icp_ledger/index/src/main.rs b/rs/rosetta-api/icp_ledger/index/src/main.rs index 0095bdcb79a..16b1cd306c0 100644 --- a/rs/rosetta-api/icp_ledger/index/src/main.rs +++ b/rs/rosetta-api/icp_ledger/index/src/main.rs @@ -531,12 +531,12 @@ fn get_oldest_tx_id(account_identifier: AccountIdentifier) -> Option pub fn encode_metrics(w: &mut ic_metrics_encoder::MetricsEncoder>) -> std::io::Result<()> { w.encode_gauge( "index_stable_memory_pages", - ic_cdk::api::stable::stable_size() as f64, + ic_cdk::api::stable::stable64_size() as f64, "Size of the stable memory allocated by this canister measured in 64K Wasm pages.", )?; w.encode_gauge( "index_stable_memory_bytes", - (ic_cdk::api::stable::stable_size() * 64 * 1024) as f64, + (ic_cdk::api::stable::stable64_size() * 64 * 1024) as f64, "Size of the stable memory allocated by this canister.", )?; diff --git a/rs/rosetta-api/icrc1/archive/src/main.rs b/rs/rosetta-api/icrc1/archive/src/main.rs index 5a7f47a324a..c50b1cc999f 100644 --- a/rs/rosetta-api/icrc1/archive/src/main.rs +++ b/rs/rosetta-api/icrc1/archive/src/main.rs @@ -359,12 +359,12 @@ fn __get_candid_interface_tmp_hack() -> &'static str { fn encode_metrics(w: &mut ic_metrics_encoder::MetricsEncoder>) -> std::io::Result<()> { w.encode_gauge( "archive_stable_memory_pages", - ic_cdk::api::stable::stable_size() as f64, + ic_cdk::api::stable::stable64_size() as f64, "Size of the stable memory allocated by this canister measured in 64K Wasm pages.", )?; w.encode_gauge( "archive_stable_memory_bytes", - ic_cdk::api::stable::stable_size() as f64 * 65536f64, + ic_cdk::api::stable::stable64_size() as f64 * 65536f64, "Size of the stable memory allocated by this canister.", )?; diff --git a/rs/rosetta-api/icrc1/benchmark/generator/src/lib.rs b/rs/rosetta-api/icrc1/benchmark/generator/src/lib.rs index 55f711267b2..8f6767eaab4 100644 --- a/rs/rosetta-api/icrc1/benchmark/generator/src/lib.rs +++ b/rs/rosetta-api/icrc1/benchmark/generator/src/lib.rs @@ -131,7 +131,7 @@ pub fn encode_metrics( ) -> std::io::Result<()> { metrics.encode_gauge( "icrc1_benchmark_generator_stable_memory_bytes", - ic_cdk::api::stable::stable_size() as f64, + ic_cdk::api::stable::stable64_size() as f64, "Size of the stable memory allocated by this canister.", )?; Ok(()) diff --git a/rs/rosetta-api/icrc1/index-ng/src/main.rs b/rs/rosetta-api/icrc1/index-ng/src/main.rs index 142b464fab3..f3f96e184f5 100644 --- a/rs/rosetta-api/icrc1/index-ng/src/main.rs +++ b/rs/rosetta-api/icrc1/index-ng/src/main.rs @@ -1107,12 +1107,12 @@ fn http_request(req: HttpRequest) -> HttpResponse { pub fn encode_metrics(w: &mut ic_metrics_encoder::MetricsEncoder>) -> std::io::Result<()> { w.encode_gauge( "index_stable_memory_pages", - ic_cdk::api::stable::stable_size() as f64, + ic_cdk::api::stable::stable64_size() as f64, "Size of the stable memory allocated by this canister measured in 64K Wasm pages.", )?; w.encode_gauge( "index_stable_memory_bytes", - (ic_cdk::api::stable::stable_size() * 64 * 1024) as f64, + (ic_cdk::api::stable::stable64_size() * 64 * 1024) as f64, "Size of the stable memory allocated by this canister.", )?; diff --git a/rs/rosetta-api/icrc1/index/src/lib.rs b/rs/rosetta-api/icrc1/index/src/lib.rs index 3dc77722c23..a6bfa775e95 100644 --- a/rs/rosetta-api/icrc1/index/src/lib.rs +++ b/rs/rosetta-api/icrc1/index/src/lib.rs @@ -446,12 +446,12 @@ fn get_oldest_txid(account: &Account) -> Option { pub fn encode_metrics(w: &mut ic_metrics_encoder::MetricsEncoder>) -> std::io::Result<()> { w.encode_gauge( "index_stable_memory_pages", - ic_cdk::api::stable::stable_size() as f64, + ic_cdk::api::stable::stable64_size() as f64, "Size of the stable memory allocated by this canister measured in 64K Wasm pages.", )?; w.encode_gauge( "index_stable_memory_bytes", - (ic_cdk::api::stable::stable_size() * 64 * 1024) as f64, + (ic_cdk::api::stable::stable64_size() * 64 * 1024) as f64, "Size of the stable memory allocated by this canister.", )?; diff --git a/rs/rosetta-api/tvl/src/metrics.rs b/rs/rosetta-api/tvl/src/metrics.rs index 02b14ee6a9e..1f6c3bc4ed6 100644 --- a/rs/rosetta-api/tvl/src/metrics.rs +++ b/rs/rosetta-api/tvl/src/metrics.rs @@ -3,12 +3,12 @@ pub fn encode_metrics(w: &mut ic_metrics_encoder::MetricsEncoder>) -> st w.encode_gauge( "tvl_stable_memory_pages", - ic_cdk::api::stable::stable_size() as f64, + ic_cdk::api::stable::stable64_size() as f64, "Size of the stable memory allocated by this canister measured in 64K Wasm pages.", )?; w.encode_gauge( "tvl_stable_memory_bytes", - ic_cdk::api::stable::stable_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, + ic_cdk::api::stable::stable64_size() as f64 * WASM_PAGE_SIZE_IN_BYTES, "Size of the stable memory allocated by this canister.", )?; w.encode_gauge(