-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add vote instruction count metrics #35015
Add vote instruction count metrics #35015
Conversation
755e480
to
7226901
Compare
7226901
to
5ec4dab
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #35015 +/- ##
=======================================
Coverage 81.6% 81.6%
=======================================
Files 830 830
Lines 224841 224854 +13
=======================================
+ Hits 183486 183524 +38
+ Misses 41355 41330 -25 |
We may port this to BPF in the future, will this strategy work in a world where the program is a standard bpf program? |
lazy_static is not ideal also, but I can see the benefit of accumulating the counters closer to where we do the actual vote processing |
No, it won't work with a standard bpf program. But it will work for any other builtin programs. For standard bfp program, we could collect and report the matrics at a higher level in the call stack here. |
Yes. Not ideal. I had thought about to attach the metrics to |
What are the objections to |
lazy_static is like global variable. And global varaible make code smells. |
I'm not familiar with these metrics/how they are used, so I've removed myself as a reviewer. I defer to the subject matter experts here. |
I'm fine with the lazy_static, just wanted to make sure we considered all the options since as haoran said it's like a global variable and we should avoid it if possible. And it could give incorrect metrics within the same process if you had multiple validators running. |
Yes, it won't give you vote instruction metrics for individual validators. But it can provide the aggregated vote metric all the validators. |
I think it will 'give you vote instruction metrics for individual validators', as long as you aren't running multiple validators concurrently in the same process, right? |
@behzadnouri had mentioned these metrics would be useful to restore, I believe. |
This repository is no longer in use. Please re-open this pull request in the agave repo: https://github.com/anza-xyz/agave |
Moved to agave #90 |
Problem
In #24696, we removed the processed vote instruction counters because of spamming.
However, it is useful to know how many vote instructions per second are processed by the validator.
Summary of Changes
Add vote instruction counter metrics.
Fixes #