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

avoid redundant recomputation of fee histogram bins #971

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

conduition
Copy link
Contributor

Extracted from #970. This PR is a prereq of #970.

FeeHistogram was being recomputed from scratch on every call to Mempool::sync. This was unnecessary. Instead we can mutate the existing histogram bin state once on each new transaction added to or removed from the mempool.

Prometheus mempool metrics are only updated once per bin at the end of every sync.

FeeHistogram was being recomputed from scratch on every
mempool.sync call. This was unnecessary. Instead we can
mutate the existing histogram state for each new
transaction added or removed from the mempool.
@romanz romanz merged commit c228115 into romanz:master Dec 11, 2023
4 checks passed
Copy link
Owner

@romanz romanz left a comment

Choose a reason for hiding this comment

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

Thanks!

@conduition conduition deleted the fee-histogram-perf branch December 12, 2023 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants