Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
update interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk committed Sep 4, 2023
1 parent 78b015b commit 10ed1a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions spec/_attachments/ic.did
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down Expand Up @@ -197,6 +196,7 @@ service ic : {
metrics : (record {
subnet_id : principal;
}) -> (record {
timestamp_nanos : nat64;
metrics : vec metrics;
});

Expand Down
8 changes: 5 additions & 3 deletions spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 10ed1a7

Please sign in to comment.