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

[checkpoint] Log the size of checkpoint fragment message #4641

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Sep 14, 2022

We can tell how big a fragment typically gets.

@lxfind lxfind merged commit 5b6fffc into main Sep 15, 2022
@lxfind lxfind deleted the add-fragment-message-size-metric branch September 15, 2022 00:12
debug!(
?tracking_id,
?cp_seq,
size=?serialized.len(),
"Checkpoint fragment consensus message created. Proposer: {}, Other: {}",
proposer,
Copy link
Contributor

Choose a reason for hiding this comment

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

These could be put into fields too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I mean that you could move proposer and the Other field up before the text so they are key=value pairs as well.... instead of using Proposer: {} Other: {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh they are different though. With {} it will trigger the Display implementation. While putting in the fields would be equivalent to {:?} which is not desired in this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not true that fields is equivalent to {:?}. That is true only if you put ?var or key =? var... if you do just var or key=var then it uses Display or Value. However if it is Value then one has to implement Value for our types which is a bit of a pain I guess.

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