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

Add metrics comparing the V1 and V2 routing protocols #10060

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

saketh-are
Copy link
Collaborator

Generally, we expect both routing protocols to achieve the exact same distances. Collecting these metrics will help us further validate the performance of the V2 protocol as we prepare to deprecate V1.

@saketh-are saketh-are marked this pull request as ready for review November 1, 2023 14:12
@saketh-are saketh-are requested a review from a team as a code owner November 1, 2023 14:12
@saketh-are saketh-are requested a review from nikurt November 1, 2023 14:12
Copy link
Contributor

@nikurt nikurt left a comment

Choose a reason for hiding this comment

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

The code looks good.
Have a naming suggestion.


match (v1_dist, v2_dist) {
(None, None) => {
metrics::NETWORK_ROUTED_MSG_DISTANCES.with_label_values(&["v1, v2 NONE"]).inc();
Copy link
Contributor

Choose a reason for hiding this comment

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

How about the following?
NONE
v1 ONLY
v2 ONLY

I find it confusing to mention v1 or v2 when they are not present.

@saketh-are saketh-are added this pull request to the merge queue Nov 1, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 1, 2023
@saketh-are saketh-are added this pull request to the merge queue Nov 1, 2023
Merged via the queue into near:master with commit b5980cc Nov 1, 2023
@saketh-are saketh-are deleted the routing-metrics branch November 1, 2023 17:51
@@ -144,13 +144,41 @@ impl NetworkState {
.unwrap_or(Ok(()))
}

fn record_routing_protocol_metrics(&self, target: &PeerId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a value of knowing what the actual delta is?

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