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

More metrics #372

Merged
merged 3 commits into from
Feb 14, 2025
Merged

More metrics #372

merged 3 commits into from
Feb 14, 2025

Conversation

Davidson-Souza
Copy link
Collaborator

What is the purpose of this pull request?

  • Bug fix
  • Documentation update
  • New feature
  • Test
  • Other:

Which crates are being modified?

  • floresta-chain
  • floresta-cli
  • floresta-common
  • floresta-compact-filters
  • floresta-electrum
  • floresta-watch-only
  • floresta-wire
  • floresta
  • florestad
  • Other: metrics

Description

Add a few new metrics endpoints for prometheus: number of peers, average time to validate a block and a histogram for peer latency

Notes to the reviewers

Each commit fully implements one metric

Checklist

  • I've signed all my commits
  • I ran just lint
  • I ran cargo test
  • I've checked the integration tests
  • I've followed the contribution guidelines
  • I'm linking the issue being fixed by this PR (if any)

Copy link
Contributor

@jaoleal jaoleal left a comment

Choose a reason for hiding this comment

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

ACK

Copy link
Contributor

@JoseSK999 JoseSK999 left a comment

Choose a reason for hiding this comment

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

Overall looks good to me! Two minor things.

This metric returns the an average of how long does it take to validate
a single block. The average is computed in as a rolling fraction that
keeps a sum of the elements with a denomator telling how many blocks
we've checked. To get the average, simply dive the two and get a normal
arithmetic mean, in seconds.
This histogram will show how long peers are taking to reply our
messages, in seconds
@JoseSK999
Copy link
Contributor

Nice, ACK

@Davidson-Souza Davidson-Souza merged commit 27a42bd into vinteumorg:master Feb 14, 2025
7 checks passed
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.

3 participants