-
Notifications
You must be signed in to change notification settings - Fork 920
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
Attestation performance metrics #7709
Attestation performance metrics #7709
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7709 +/- ##
==========================================
+ Coverage 62.10% 62.12% +0.01%
==========================================
Files 429 429
Lines 30365 30379 +14
==========================================
+ Hits 18859 18873 +14
Misses 8566 8566
Partials 2940 2940 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly concerned on how this will increase the cardinality of the metrics page significantly and require tsdb to store much more data than before.
Is a gauge the most appropriate format?
We track overall inclusion distance with a histogram in the beacon node, should we use a histogram?
validator/client/metrics.go
Outdated
"pubkey", | ||
}, | ||
) | ||
// ValidatorCorrectlyVotedHeadGaugeVec used to keep track of validator's accuracy on voting target by public key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ValidatorCorrectlyVotedHeadGaugeVec used to keep track of validator's accuracy on voting target by public key. | |
// ValidatorCorrectlyVotedHeadGaugeVec used to keep track of validator's accuracy on voting head by public key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh thanks for catching this. As for the gauge @prestonvanloon is worried about the same. Gauge is needed to get a time series which you need if you want to collect the table above. Getting a histogram is only useful to get averages. This as gauge replicates the table in beaconcha.in. The prometheus dbase can then later be pruned can't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few changes that seem unrelated. Please explain additional changes
validator/client/metrics.go
Outdated
if (slot+1)%params.BeaconConfig().SlotsPerEpoch != 0 || slot <= params.BeaconConfig().SlotsPerEpoch { | ||
// Do nothing unless we are at the end of the epoch, and not in the first epoch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
37bc6fa
to
c6091ae
Compare
Fixes #7694 |
@terencechain PTAL |
What type of PR is this?
Feature
Fixes #7694
What does this PR do? Why is it needed?
This PR exports 5 metrics by pubkey: the attested slot, the inclusion distance, the correctness of the vote on head,target and source. In order to be correct however this is now based on #7708 since otherwise it would suffer from #7699
Other notes for review
The attested slot is always one epoch ahead with this PR. This has to be taken into account when producing tables like this one
I have checked the above for over a day with beaconcha.in now that it is working.