-
Notifications
You must be signed in to change notification settings - Fork 295
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
Repair metrics #4511
base: master
Are you sure you want to change the base?
Repair metrics #4511
Conversation
49fe722
to
7b96b48
Compare
("get-votes-elapsed", self.get_votes_elapsed, i64), | ||
("add-votes-elapsed", self.add_votes_elapsed, i64), | ||
( | ||
"purge-outstanding-repairs", |
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.
this is 1 of 2 new metrics added. Everything else should just be cosmetic change
i64 | ||
), | ||
( | ||
"handle-popular-pruned-forks", |
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.
this is the 2nd metric changed
|
||
impl RepairMetrics { | ||
pub fn maybe_report(&mut self) { | ||
if self.last_report.elapsed().as_secs() > 2 { |
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 don't like this style since it's easy to think we report every 2 seconds but it's actually 3... but decided to not change it with this PR
924bfbb
to
fa8ed8d
Compare
fa8ed8d
to
420dbd4
Compare
Problem
fn RepairService::run
is giant and unwieldy. Shrinking this down a bit would help with parsing more quickly.There are also multiple metrics structs intertwined together, and some missing timing metrics.
Trying to unspaghettify™️ part of this code
Summary of Changes
RepairMetrics
struct to wrap existing metrics