mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
report: add queue info for udp
PR-URL: https://github.com/nodejs/node/pull/44345 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
1 parent
e7b51fbdaf
commit
d9b2d2c0dd
2 files changed
+10
-1
No files matched your search
@@ -261,7 +261,14 @@ void WalkHandle(uv_handle_t* h, void* arg) {
|
||||
writer->json_keyvalue("writable",
|
||||
static_cast<bool>(uv_is_writable(&handle->stream)));
|
||||
}
|
||||
|
||||
if (h->type == UV_UDP) {
|
||||
writer->json_keyvalue(
|
||||
"writeQueueSize",
|
||||
uv_udp_get_send_queue_size(reinterpret_cast<uv_udp_t*>(h)));
|
||||
writer->json_keyvalue(
|
||||
"writeQueueCount",
|
||||
uv_udp_get_send_queue_count(reinterpret_cast<uv_udp_t*>(h)));
|
||||
}
|
||||
writer->json_end();
|
||||
}
|
||||
|
||||
|
||||
@@ -260,6 +260,8 @@ if (process.argv[2] === 'child') {
|
||||
found_udp.push('connected');
|
||||
}
|
||||
assert(handle.is_referenced);
|
||||
assert.strictEqual(handle.writeQueueSize, 0);
|
||||
assert.strictEqual(handle.writeQueueCount, 0);
|
||||
}, 2),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user