From f189a8059fb960d22696f23eae0afe1a274adf20 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Wed, 15 Jan 2025 22:59:06 +0800 Subject: [PATCH 1/2] Provides units for all fields of canister status. --- src/dfx/src/commands/canister/status.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dfx/src/commands/canister/status.rs b/src/dfx/src/commands/canister/status.rs index e831e0de46..d1df4c9806 100644 --- a/src/dfx/src/commands/canister/status.rs +++ b/src/dfx/src/commands/canister/status.rs @@ -81,11 +81,11 @@ async fn canister_status( Canister status call result for {canister}. Status: {status} Controllers: {controllers} -Memory allocation: {memory_allocation} -Compute allocation: {compute_allocation} -Freezing threshold: {freezing_threshold} -Idle cycles burned per day: {idle_cycles_burned_per_day} -Memory Size: {memory_size:?} +Memory allocation: {memory_allocation} Bytes +Compute allocation: {compute_allocation} % +Freezing threshold: {freezing_threshold} Seconds +Idle cycles burned per day: {idle_cycles_burned_per_day} Cycles +Memory Size: {memory_size} Bytes Balance: {balance} Cycles Reserved: {reserved} Cycles Reserved cycles limit: {reserved_cycles_limit} @@ -94,8 +94,8 @@ Wasm memory threshold: {wasm_memory_threshold} Module hash: {module_hash} Number of queries: {queries_total} Instructions spent in queries: {query_instructions_total} -Total query request payload size (bytes): {query_req_payload_total} -Total query response payload size (bytes): {query_resp_payload_total} +Total query request payload size: {query_req_payload_total} Bytes +Total query response payload size: {query_resp_payload_total} Bytes Log visibility: {log_visibility}", status = status.status, controllers = controllers.join(" "), From ad3f0e85c254858151365f011df10e08f6f2ac5b Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Wed, 15 Jan 2025 23:11:21 +0800 Subject: [PATCH 2/2] Update changelog. --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03013493ec..9a9c7ee49b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,6 +129,33 @@ Building canisters... ... ``` +### chore: Provides units for all fields of canister status. + +Provides units for all fields of canister status. + +``` +$ dfx canister status pxmfj-jaaaa-aaaan-qmmbq-cai --ic +Canister status call result for pxmfj-jaaaa-aaaan-qmmbq-cai. +Status: Running +Controllers: uom2z-lqsqq-qbn4p-nts4l-2xjfl-oeivu-oso42-4t4jh-54ikd-ewnvi-tqe yjac5-2yaaa-aaaan-qaqka-cai +Memory allocation: 0 Bytes +Compute allocation: 0 % +Freezing threshold: 2_592_000 Seconds +Idle cycles burned per day: 20_548_135 Cycles +Memory Size: 2_010_735 Bytes +Balance: 2_985_407_678_380 Cycles +Reserved: 0 Cycles +Reserved cycles limit: 5_000_000_000_000 Cycles +Wasm memory limit: 3_221_225_472 Bytes +Wasm memory threshold: 0 Bytes +Module hash: 0x4f13cceb571483ac99a9f89afc05718c0a4ab72e9fac7d49054c0a3e05c4899b +Number of queries: 0 +Instructions spent in queries: 0 +Total query request payload size: 0 Bytes +Total query response payload size: 0 Bytes +Log visibility: controllers +``` + ## Dependencies ### Frontend canister