Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sishan/basic metrics #1852

Merged
merged 24 commits into from
Oct 11, 2023
Merged

Sishan/basic metrics #1852

merged 24 commits into from
Oct 11, 2023

Conversation

dailinsubjam
Copy link
Contributor

@dailinsubjam dailinsubjam commented Oct 2, 2023

This PR revokes metrics for

  • NetworkingMetrics
    • Number of how many peers are connected
    • Number of messages have been received directly
    • Number of messages have been received by broadcast
    • Number of messages have been send directly
    • Number of messages have been send by broadcast
    • Number of messages failed to send
  • ConsensusMetrics
    • The number of last synced synced block height
    • The number of last decided view
    • The current view
    • Number of views that are in-flight since the last decided view
    • Number of views that are in-flight since the last anchor view
    • Number of invalid QCs we've seen since the last commit
    • Number of rejected transactions
    • Number of outstanding transactions
    • Memory size in bytes of the serialized transactions still outstanding
    • Number of views that timed out

The main parts for review are:
crates/types/src/consensus.rs, crates/task-impls/src/consensus.rs, and crates/hotshot/src/traits/networking.rs.

@dailinsubjam dailinsubjam linked an issue Oct 2, 2023 that may be closed by this pull request
7 tasks
crates/task-impls/src/consensus.rs Show resolved Hide resolved
crates/task-impls/src/transactions.rs Outdated Show resolved Hide resolved
@@ -1075,6 +1096,8 @@ where
"We received a timeout event in the consensus task for view {}!",
*view
);
let consensus = self.consensus.read().await;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we reset this metric? I think we should reset it once we have a view that succeeds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for resetting the consensus metric number_of_timeouts, and will not be used for any other place. The whole consensus thing is wrapped in an Arc, therefore as long as we know which one to change it should be okay (like here we simply want to get self.consensus).

crates/task-impls/src/consensus.rs Show resolved Hide resolved
crates/types/src/consensus.rs Outdated Show resolved Hide resolved
@dailinsubjam dailinsubjam merged commit cb42183 into develop Oct 11, 2023
4 checks passed
@dailinsubjam dailinsubjam deleted the sishan/basic_metrics branch October 11, 2023 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Basic metrics to support outside validators
3 participants