Skip to content

Commit

Permalink
misc/metrics/src/kad: Set query_duration lowest bucket to 0.1 sec (#2219
Browse files Browse the repository at this point in the history
)

Probability for a Kademlia query to return in less than 100 milliseconds
is low, thus increasing the lower bucket to improve accuracy within the
higher ranges.
  • Loading branch information
mxinden authored Sep 8, 2021
1 parent 67722c5 commit 9b1f405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/metrics/src/kad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Metrics {
);

let query_result_duration =
Family::new_with_constructor(|| Histogram::new(exponential_buckets(0.001, 2.0, 12)));
Family::new_with_constructor(|| Histogram::new(exponential_buckets(0.1, 2.0, 10)));
sub_registry.register_with_unit(
"query_result_duration",
"Duration of a Kademlia query.",
Expand Down

0 comments on commit 9b1f405

Please sign in to comment.