From c1dfd5877207729f304095c8bde352110043f849 Mon Sep 17 00:00:00 2001 From: Ludovic Chenut Date: Thu, 8 Feb 2024 12:36:58 +0100 Subject: [PATCH] fix: yamux metrics (#1022) --- libp2p/muxers/yamux/yamux.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libp2p/muxers/yamux/yamux.nim b/libp2p/muxers/yamux/yamux.nim index 7f9a33f8d..4a7b39a7e 100644 --- a/libp2p/muxers/yamux/yamux.nim +++ b/libp2p/muxers/yamux/yamux.nim @@ -29,9 +29,9 @@ const when defined(libp2p_yamux_metrics): declareGauge(libp2p_yamux_channels, "yamux channels", labels = ["initiator", "peer"]) declareHistogram libp2p_yamux_send_queue, "message send queue length (in byte)", - buckets = [0.0, 100.0, 250.0, 1000.0, 2000.0, 1600.0, 6400.0, 25600.0, 256000.0] + buckets = [0.0, 100.0, 250.0, 1000.0, 2000.0, 3200.0, 6400.0, 25600.0, 256000.0] declareHistogram libp2p_yamux_recv_queue, "message recv queue length (in byte)", - buckets = [0.0, 100.0, 250.0, 1000.0, 2000.0, 1600.0, 6400.0, 25600.0, 256000.0] + buckets = [0.0, 100.0, 250.0, 1000.0, 2000.0, 3200.0, 6400.0, 25600.0, 256000.0] type YamuxError* = object of CatchableError @@ -370,7 +370,7 @@ method write*(channel: YamuxChannel, msg: seq[byte]): Future[void] = return result channel.sendQueue.add((msg, 0, result)) when defined(libp2p_yamux_metrics): - libp2p_yamux_recv_queue.observe(channel.lengthSendQueue().int64) + libp2p_yamux_send_queue.observe(channel.lengthSendQueue().int64) asyncSpawn channel.trySend() proc open(channel: YamuxChannel) {.async.} =