From 10ed1a7fa11288f2e7a1de9fdafa33dc261dc2fb Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Mon, 4 Sep 2023 12:35:42 +0200 Subject: [PATCH] update interface --- spec/_attachments/ic.did | 6 +++--- spec/index.md | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/spec/_attachments/ic.did b/spec/_attachments/ic.did index f2c51fec8..f838cafa2 100644 --- a/spec/_attachments/ic.did +++ b/spec/_attachments/ic.did @@ -114,9 +114,8 @@ type millisatoshi_per_byte = nat64; type metrics = variant { node_metrics : record { node_id : principal; - start_timestamp_nanos : nat64; - end_timestamp_nanos : nat64; - num_proposed_blocks : nat; + num_blocks : nat64; + num_block_failures : nat64; } }; @@ -197,6 +196,7 @@ service ic : { metrics : (record { subnet_id : principal; }) -> (record { + timestamp_nanos : nat64; metrics : vec metrics; }); diff --git a/spec/index.md b/spec/index.md index 80980b63c..fb075276d 100644 --- a/spec/index.md +++ b/spec/index.md @@ -2122,13 +2122,15 @@ The metrics management canister API is considered EXPERIMENTAL. Canister develop ::: -Given a subnet ID as input, this method returns a collection of metrics for the given subnet. +Given a subnet ID as input, this method returns a collection of metrics for the given subnet (field `metrics`) and a timestamp provided in nanoseconds since 1970-01-01 (field `timestamp_nanos`) at which the metrics are sampled. A single metric entry is of an enumeration type with a single variant (in the future, more variants might be added): -- `node_metrics`: provides metrics for a node characterized by its principal (field `node_id`), for a period of time characterized by start and end timestamps in nanoseconds since 1970-01-01 (fields `start_timestamp_nanos` and `end_timestamp_nanos`), and the actual metrics values: +- `node_metrics`: provides metrics for a node characterized by its principal (field `node_id`) and the actual metrics values: - - `num_proposed_blocks` (`nat`): the number of blocks proposed by this node. + - `num_blocks` (`nat64`): the number of blocks proposed by this node; + + - `num_block_failures` (`nat64`): the number of failed block proposals by this node. ## Certification {#certification}