From 3d7c1dcd2d08753c0860fdde762355f320b72d67 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Mon, 22 Aug 2022 23:38:58 +0800 Subject: [PATCH] report: add queue info for udp --- src/node_report_utils.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index 322bc7d5d8579a..b8f32beb203f6d 100644 --- a/src/node_report_utils.cc +++ b/src/node_report_utils.cc @@ -261,7 +261,14 @@ void WalkHandle(uv_handle_t* h, void* arg) { writer->json_keyvalue("writable", static_cast(uv_is_writable(&handle->stream))); } - + if (h->type == UV_UDP) { + writer->json_keyvalue( + "writeQueueSize", + uv_udp_get_send_queue_size(reinterpret_cast(h))); + writer->json_keyvalue( + "writeQueueCount", + uv_udp_get_send_queue_count(reinterpret_cast(h))); + } writer->json_end(); }