mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-23 16:11:19 +00:00
Currently the `libp2p_swarm_connections_establishment_duration` metric has the following buckets: ``` // exponential_buckets(1e-3, 2., 10) [0.001, 0.002, 0.004, 0.008, 0.016, 0.032, 0.064, 0.128, 0.256, 0.512] ``` It is unlikely that a connection is established in 1ms, even within a datacenter. It is very likely that libp2p connection establishment takes longer than 512ms over the internet. This commit proposes the following buckets: ``` // exponential_buckets(0.01, 1.5, 20) [0.01, 0.015, 0.0225, 0.03375, 0.050625, 0.0759375, 0.11390625, 0.170859375, 0.2562890625, 0.38443359375, 0.576650390625, 0.8649755859375, 1.29746337890625, 1.946195068359375, 2.9192926025390626, 4.378938903808594, 6.568408355712891, 9.852612533569337, 14.778918800354004, 22.168378200531006] ``` - Buckets start at 10ms. - Reasonably high resolution in the sub-second area. - Largest bucket at 22s, e.g. for a relayed connection. - Unfortunately rather obscure numbers.
For a Grafana dashboard displaying the metrics exposed through this crate, see https://kademlia-exporter.max-inden.de/d/Pfr0Fj6Mk/rust-libp2p